diff --git a/.gitbook/assets/01_webhook_integration.png b/.gitbook/assets/01_webhook_integration.png new file mode 100644 index 0000000..ad647ed Binary files /dev/null and b/.gitbook/assets/01_webhook_integration.png differ diff --git a/.gitbook/assets/02_webhook_integration.png b/.gitbook/assets/02_webhook_integration.png new file mode 100644 index 0000000..70c70a3 Binary files /dev/null and b/.gitbook/assets/02_webhook_integration.png differ diff --git a/.gitbook/assets/03_webhook_integration.png b/.gitbook/assets/03_webhook_integration.png new file mode 100644 index 0000000..9bc20ef Binary files /dev/null and b/.gitbook/assets/03_webhook_integration.png differ diff --git a/.gitbook/assets/04_azure_integration.png b/.gitbook/assets/04_azure_integration.png new file mode 100644 index 0000000..0199cb2 Binary files /dev/null and b/.gitbook/assets/04_azure_integration.png differ diff --git a/.gitbook/assets/05_azure_integration.png b/.gitbook/assets/05_azure_integration.png new file mode 100644 index 0000000..ef9f627 Binary files /dev/null and b/.gitbook/assets/05_azure_integration.png differ diff --git a/.gitbook/assets/06_azure_integration.png b/.gitbook/assets/06_azure_integration.png index 6ea35e5..803091a 100644 Binary files a/.gitbook/assets/06_azure_integration.png and b/.gitbook/assets/06_azure_integration.png differ diff --git a/pybytes/integrations/README.md b/pybytes/integrations/README.md index f245734..932d842 100644 --- a/pybytes/integrations/README.md +++ b/pybytes/integrations/README.md @@ -6,3 +6,5 @@ Pybytes offers a way to interact with external IoT platform or custom services, * [AWS IoT](amazon-iot.md): a managed cloud platform that lets connected devices easily and securely interact with cloud applications and other devices * [Microsoft Azure](azure.md): it's a comprehensive collection of services and solutions designed to help you create end-to-end IoT applications on Azure. +* [Web Hooks](webhooks.md): user-defined HTTP callbacks to a defined remote destination. All elements of +the requests (headers, query string parameters, etc) are customizable. diff --git a/pybytes/integrations/amazon-iot.md b/pybytes/integrations/amazon-iot.md index f57a75f..2eb6cee 100644 --- a/pybytes/integrations/amazon-iot.md +++ b/pybytes/integrations/amazon-iot.md @@ -1,6 +1,6 @@ # Amazon IoT -Whenever one of your integrated devices sends a message to our broker, we republish the binary payload to the endpoint specified for its integration. +Whenever one of your integrated devices sends a signal to our broker, we republish the binary payload to the endpoint specified for its integration. ## Integrate your devices diff --git a/pybytes/integrations/azure.md b/pybytes/integrations/azure.md index 116bf6d..62ad727 100644 --- a/pybytes/integrations/azure.md +++ b/pybytes/integrations/azure.md @@ -1,6 +1,6 @@ # Azure -Whenever one of your integrated devices sends a message to our broker, we republish the binary payload to the endpoint specified for its integration through [Azure IoT Hub SDK](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks). +Whenever one of your integrated devices sends a signal to our broker, we republish the binary payload to the endpoint specified for its integration through [Azure IoT Hub SDK](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks). ## Integrate your devices @@ -19,16 +19,16 @@ Whenever one of your integrated devices sends a message to our broker, we republ 3. Now go into Pybytes and click on *Integrations* > *New Integration* and choose *Microsoft Azure*. Paste the IoT Hub Connection String copied from the previous step and click *Login* -![Copy the connection string](../../.gitbook/assets/02_azure_integration.png) +![Login](../../.gitbook/assets/03_azure_integration.png) 4. This step requires you to create a custom MQTT topic and the devices you want to bind to this Azure IoT hub. All the messages sent by your devices, will be republished to the Azure's MQTT broker with the topic specified here. When you're ready, click _Create_ -show photo +![Specify topic and name](../../.gitbook/assets/04_azure_integration.png) 5. If everything's worked as expected, you should be able to see a summary of your integration like the following: -show photo +![Azure integration's summary](../../.gitbook/assets/05_azure_integration.png) 6. The corresponding device has been created in Azure as well, you just have to [log in to the portal](https://portal.azure.com/), click on its IoT Hub and then click on the device just created. You should be able to see all the device's details, also the connection string which will be saved encrypted in our database and used to republish your data to your Azure IoT Hub. @@ -36,12 +36,12 @@ show photo 7. Try to send some signal messages with your device. You should be able to see in the dashboard that the system has received them. More information on testing device's connectivity could be found [here](https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-connectivity). -![Test device connectivity](../../.gitbook/assets/06_azure_integration.png) +![Test device connectivity](../../.gitbook/assets/07_azure_integration.png) ## Final considerations -In order to see the data sent to Azure, you could do different things, depending on the scope of your work:.Please refer to these two official examples: +In order to see the data sent to Azure, you could do different things, depending on the scope of your work. Please refer to these official examples: - [Visualize real-time sensor data from Azure IoT Hub using Power BI](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-power-bi) - [Visualize real-time sensor data from your Azure IoT hub by using the Web Apps feature of Azure App Service](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-web-apps) - [Read the telemetry from the hub with a back-end application (Node.js)](https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-node) diff --git a/pybytes/integrations/webhooks.md b/pybytes/integrations/webhooks.md new file mode 100644 index 0000000..e5fd410 --- /dev/null +++ b/pybytes/integrations/webhooks.md @@ -0,0 +1,24 @@ +# Web hooks + +Whenever one of your integrated devices sends a signal to our broker, we perform an HTTP request defined by the user. You can use some presets (`DEVICE_TOKEN`, `USER_ID`, etc), which will act like placeholders and will be dinamically replaced at the moment of performing the request with the relative content. + +## Integrate your devices + +1. Go in the sidebar, click on _New Integration_ and then on _Webhook_ + +![New Web Hook integration](../../.gitbook/assets/01_webhook_integration.png) + +2. Fill in the form specifying the following information: + 1. The remote URL to which we will send the data + 2. An event name + 3. The HTTP method + 4. The request format. Please note that we will prefill some headers whenever you change the format. The prefilled headers are not modifiable. + 5. You can optionally add some more headers and query parameters. There's also an eased interface for basci HTTP auth. + +Once you're done, you'll see a preview of the request at the bottom of the page. Remember to choose the devices you want to bind to this service. + +![Web Hook definition](../../.gitbook/assets/02_webhook_integration.png) + +3. If everything's worked as expected, you should be able to see a summary of your integration like the following: + +![Creation process result](../../.gitbook/assets/03_webhook_integration.png)