Docs for Azure and webhooks integration

This commit is contained in:
Christian Castelli
2018-11-29 18:05:59 +01:00
parent 9c779d94b5
commit e40d276583
10 changed files with 33 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 235 KiB

View File

@@ -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.

View File

@@ -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

View File

@@ -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)

View File

@@ -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)