browse
Here is an article about how to configure your Datastream Webhook.
A Datastream Webhook is an HTTPS communication between our Wattsense backend and your web server.
Available only with a Tower subscription, when our backend will receive either a value, an event or an alarm from the Tower, it will be automatically send to your web server.
Datastream Webhook architecture
Requirements to configure Datastream Webhook
In order to configure the Webhook communication correctly you'll have to get (from your web server parameters, Wattsense does not have them) the important informations that will allow our Backend to connect to it.
To do so, you will need :
Base URL | The base URL where your web server is accessible. |
Event / Alarm / Values route | You'll have to fill the differents finals URLs routes where you want to receive the data. |
Secret key | Key sent with the data to check the integrity of the message |
Authentication |
Here you'll see all the different authentication configurations. When you select one of them, you'll have to fill in the blanks according to your web server configuration.
|
Step by step configuration
Connector configuration
First of all, click on the "Organization" tab, select the Organization where you want to create your Webhook datastream and click on "Add a connector".
You can create several Webhook connector per datastream |
Name your Webhook Datastream and fill the blanks according to your web server requirements :
Triggers configuration
Once the communication setup is done, you'lle have to create the Triggers :
Triggers define what is required to call the connector and what values to send.
When you click on the " Create new trigger" button, here is the interface you'll have to fill:
- Select what type of trigger you want to receive in your Web server.
- Add the Tower(s) in the list in the scope of the trigger. (Note that you'll only see Towers in the current Organization, not from an other one.)
Activate the Datastream
At the end of the configuration, don't forget to activate the datastream by enabling the toggle button
Data format
The data is sent with the following structure :
deviceId: String,
property: String,
timestamp: Long,
payload: Any,
receivedAt: Long?
scaledPayload: Number?
name: String?
unit: String?
externalId: String?
propertyId: String?
equipmentId: String?
gatewayInterfaceId: String?
slug: String?
isOutOfService: Boolean?
tags: Map<String, String>
The ? at the end of the line means that the field can be null.
Here's an example :
If you need any additional information, please contact us here.
Comments
0 comments
Please sign in to leave a comment.