Open main menu

DAVE Developer's Wiki β

Changes

MISC-TN-021: SBCSPG and ThingsBoard IoT

326 bytes added, 18:40, 4 February 2022
no edit summary
As an example, the following configuration was set up:
[[File:MISC-TN-021-block-diagram.png|center|thumb|600x600px]]
TBD  ''ThingsBoard IoT Gateway'' is interfaced to the a local MQTT broker (''[https://mosquitto.org/ Mosquitto]'') via the [https://thingsboard.io/docs/iot-gateway/config/mqtt/ MQTT connector]. On the network side, it ''ThingsBoard IoT Gateway'' is connected to an instance of ''[https://thingsboard.io/docs/ ThingsBoard IoT platform Community Edition]''. For the sake of simplicity, this instance was installed on a server PC. The PC and the SBCSPG gateway connected to the same LAN. Obviously, in a more realistic scenario, it the ThingsBoard IoT platform would be installed on a remote server or on a cloud infrastructure. See [https://thingsboard.io/docs/user-guide/install/installation-options/ this page] for more information about installation options.
==Installing ''ThingsBoard IoT Gateway''==
The unit used for this TN was equipped with [[MISC-TN-004: Running Debian (armbian) on SBCSPG|Debian Buster]].  To As such, to install ''ThingsBoard IoT Gateway'' , it is possible to make use of the <code>.deb</code> package as described in the [https://thingsboard.io/docs/iot-gateway/install/deb-installation/ official documentation]. In order to run the software, it It was also necessary to upgrade manually the package <code>protobuf</code> as shown in the following boxto prevent a fatal error upon ''ThingsBoard IoT Gateway'' starting: <pre class="board-terminal">
$ sudo pip3 install --upgrade protobuf
Requirement already satisfied: protobuf in /usr/local/lib/python3.7/dist-packages (3.10.0)
== Testing ==
To test the configuration, one can it is possible to publish some data with the help of the <code>mosquitto_pub </code> client tool. In the following example, two data points are published associated to the variables ''temperature'' and ''humidity'':
<pre class="board-terminal">
</pre>
By setting the logging level of the broker to <code>all</code>, a lot of useful messages are printed . For example, they come to understand help for understanding if the data is are received properly by the ''ThingsBoard IoT Gateway''<nowiki/>'s MQTT connector:
<pre class="board-terminal">
</pre>
In turn, ''ThingsBoard IoT Gateway '' finally manages to send the data to the ''ThingsBoard IoT platform as well'':
[[File:SBCSPG-ThingsBoard-1.png|center|thumb|723x723px]]
=== Remote logging ===
''ThingsBoard '' provides the ''Remote logging'' functionality too. It can be extremely helpful when it comes to debug connections issues, for instance. It can be enable enabled as describe [https://thingsboard.io/docs/iot-gateway/guides/how-to-enable-remote-logging/ here].
The following image shows how it looks like in a ''Timeseries widget'' in the ''ThingsBoard platform '' environment.
[[File:SBCSPG-ThingsBoard-2.png|center|thumb|800x800px]]
4,650
edits