Wattsense
Last updated
Last updated
In order to properly create a Wattsense integration with MClimate Enterprise you need configure both the particular Wattsense Tower Device you are using and your Organization within the Wattsense platform.
Log into our Wattsense Console (https://console.wattsense.com/) and open up the Tower you are going to be using to connect through.
You will need the DevEUI for one of the following configuration steps, thus you need to pull it out from the device info (or obtain it otherwise, for example via an external detabase where you keep it or via the CSV file MClimate sends when one purchases a device).
Open up the Configuration tab and click on the ":" icon, selecting the "Settings":
You can copy over the DevEUI from here:
Next, you need to edit the Properties of the devices that you want to integrate (this needs to be done for every device you want to see in Enterprise)
There are 2 properties that need to be enabled at the very least as these are what Enterprise needs to extract the data that it is to display:
Raw encoded payload
Encoded downlink message
You also need to Edit the "slug" for the Encoded downlink message property in order to make it compatible with the Enterprise structure.
Open up the property editing window and expand the Advanced menu, where you need to fill in the following field.
Slug - downlink-message-DevEUI
Refer to the image below, where an example DevEUI is shown in blue (you need to fill in your specific DevEUI that will be different).
This completes the device level configuration.
Go to the Organization section and open up the API Keys tab.
You need to create a "Service Account".
Give it a name and make sure to select "Site Manager" from the drop down menu for the permissions level.
Now that you have a Service Account with sufficient permissions you can create the actual API Key. Refer to the image below.
You can have multiple Keys, we will need a single one for this tutorial. Create one.
You need only enter a description and your set of Key and Secret will be generated (automatically downloaded in a file form).
Now that you have the Keys you need to import them into the Enterprise platform. Head over to the link https://enterprise.mclimate.eu/ and log into your account. Go to the Integrations section and create a new M-token.
Make sure and copy it as you will need it together with the Keys to create the integration (it is the very last one in the list (image above). You can click on the box to open up a window where you need to enter the set of the 3 (M-token on top, Key in the middle and Secret at the bottom field):
Your integration is now created. This will allow for the proper authentication between the Wattsense and MClimate Enterprise platforms.
In order to finalize the process you need to create a data stream. Go back to the Organizations section, but this time open up the Data Stream tab and create a Connector.
You need to fill all fields with the following values (use the image as reference if need be), only 3 of which are case specific (marked with the blue arrows)
Name - choose an appropriate one
Protocol - HTTP (webhooks)
Base URL - lorawan-broker.mclimate.eu
Event route - /wattsense
Alarms route - /wattsense-alarms
Values route - /wattsense
Secret key - the value of YOUR M-TOKEN
Authentication - API Key
Key name - m-token
Key value - the value of YOUR M-TOKEN
Key type - Header
You also need a trigger, so go and create one.
Give it a name and make sure to select the 3rd radio button (Value option), this will result in it being triggered when the two properties we made sure are enabled in the start of the tutorial send data. Finalize it by adding a Tower (you can list as many Wattsense Towers as you have here).
Finally make sure both the Connector and Trigger are enabled. The Trigger should by by default, but the Connector you need to turn on manually.
If you configured everything properly your Integration is now complete and you should be able to see data in MClimate Enterprise (provided you have registered the devices there already).