I have another Customer who likes to get Data from “The Things Network” and display the data in OpenRemote.
What I know is The Things Network can set up an Integration Interface. Is there a Standard Procedure coming from OpenRemote to do That?
We don’t have any existing code that integrates with the Things Network; I’m not familiar with the APIs they offer for 3rd party integration but it should be possible to connect OpenRemote to it in a simple way using the built in HTTP/MQTT/Websocket agents/protocols…assuming Things Network offers any of these APIs.
Hi @Roman, LoRaWan servers like ‘The Things Network’ are usually integrated via Webhooks (HTTP) or MQTT. We’ve already ordered LoRa test equipment in order to check what’s needed to integrate OpenRemote and ‘The Things Network’.
I failed to integrate ‘The Things Network’ via the OpenRemote ‘HTTP Agent’. I think it’s currently not possible because streaming events from the server to the OpenRemote client is currently not supported (Accept: text/event-stream) .
In the TTN console select your application and select the ‘Integrations’ section on the left side in order to activate the MQTT integration
In OpenRemote create a MQTT agent with the following settings:
host: eu1.cloud.thethings.network
port: 8883
secureMode: enabled
usernamePassword:
{
“username”: “{TTN application id}@ttn”,
“password”: “NNSXS…”
}
Create an OpenRemote asset
Create an asset attribute with a suitable data type (e.g Number)
Add an ‘Agent link’ to the attribute and link it with the MQTT agent created earlier
Configure the ‘Agent link’ with the following parameters:
‘Subscription Topic’: v3/{TTN application id}@ttn/devices/eui-{DeviceEUI}/up
‘Value Filters’ of type ‘JSON Path’: $.uplink_message.decoded_payload.{name of sensor value}
I can’t get the data with OpenRemote yet, but can you see what’s wrong with this image?
I intend to set it in the same way.
“Subscription Topic” also failed with “#”.
I’ve noticed that currently a MQTT asset attribute (in your case the ‘Temperature’ attribute) doesn’t receive any updates anymore if the related MQTT agent is reconfigured or the whole server is restarted. I’ve looked at your configuration and it seems Ok except the JSON Path looks a bit strange. I think it’s a mixture of dot and bracket notation. I’ld suggest that you use the following JSON path:
$.uplink_message.decoded_payload.temperature_1
You could try the following procedure:
Check if the MQTT agent is in the ‘CONNECTED’ state
Delete the ‘temperature’ attribute
Add the ‘temperature’ attribute again with the JSON path that I’ve suggested
After this procedure you should see temperature updates.