I have two LoRaWAN gateways connected to TheThingsNetwork with several node sensors and I would like to manage everything from a single platform like thingsboard.io. I have been reviewing different connection options such as HTTP or even creating a Thingsboard gateway to connect by MQTT but without success.
Here is a simple mqtt-config.json for ThingsBoard IoT Gateway which will subscibe to TTN’s mqtt broker. This allows for direct device communication from TTN > Thingsboard IoT Gateway. Devices for your application will be created automatically in ThingsBoard.
Example shows a TTN app named ttn-example-app. Devices in this example return temperature and humidity. Valid types are string, boolean, double or long.
edit: one important note - the gateway insists that all values defined are reported in every message, so make sure your TTN decoder is kicking out humidity and temperature in every message or it won’t be processed. This is pretty annoying behavior and I’m actively looking for a suitable workaround. The problem has been addressed in this commit, but is not yet available in the current 1.2.1 release.
Allright after some struggles I have successfully built ThingsBoard master and ThingsBoard Gateway develop/1.2.2 which fixes the issue mentioned above, where the JSON parser fails to work unless all fields are present in all packets.
Here is the build process that worked for me:
Build host: Ubuntu 17.10, no less than 8GB RAM (failed w/ 2GB and 4GB)
And then you can run sudo systemctl start tb-gateway to have a working configuration.
Once you have the releases built I have found that this platform works well on a 2GB system for small/demo environment use. Simply copy the build packages (.deb|.rpm|.exe) to your target server and deploy as normal. For my testing, I built the packages on a local Ubuntu VM then deployed to a 2GB system on Azure for not much money at all. Works well so far!
I have done the TTN integration in Thingsboard. I have registered a device in TTN and simulated some uplink message. This has created a device in Thingsboard. How this happened? and what is the use of access token of the device and how it will be used?