DL28 INTEGRATION INTO THINGSBOARD IOT PLATFORM

DL28 INTEGRATION INTO THINGSBOARD IOT PLATFORM

This tutorial will show you in great detail how to set up and integrate DL28 into ThingsBoard IoT platform. With this Decode marks the beginning of partnership with ThingsBoard as their Silver Partner.

MQTT (a lightweight messaging protocol) is based on „publish/subscribe“ principle of message exchange between clients over the broker. Distance clients are connected to the broker by using the TCP/IP protocol. Broker has a static IP address. Clients could have either static or dynamic IP address. Default port is 1883.

DL28 supports MQTT client, it can send-publish messages to the broker, and receive-subscribe messages from the broker.
TEXT and JSON message format
s are supported.

DL28 disposes internal MODBUS memory map, used to collect all the data from the connected devices, meters and IO modules. These data could be readout in different ways, and this time we are explaining MQTT way.

DL28 set up

Connect to the DL28 webserver using either default parameters or adequate ones in case you have changed the default parameters.

Default setup is | IP address : 192.168.0.67 | Username : admin | Password : admin |

Set all devices, meters, IO modules that are connected to the DL28. After establishing a successful communication with each, you should have all relevant data stored in the DL28 modbus map. Form the list of data that you would like to exchange over the MQTT.

Procedure will be explained using a small example based on data collected/read from GPRS Router 343 and heat meter by using a modbus RTU and M-Bus protocols, respectively. This is shown on the below screenshots.

Setting up MQTT protocol on DL28 device for communication with ThingsBoard broker:

Enable: enable/start MQTT protocol
Enable Debug: debugging over the console, accessible over the USB0 port on DL28
Broker: link or IP address of the broker, demo.thingsboard.io in this case
Port: default value is 1883
Reconnect: time interval for reconnecting to the broker, default value is 10 seconds
Keep Alive Interval: defines the time interval for sending a PING packet for keeping the TCP/IP connection active. In case of missing RESPONSE packet the connection is reestablished. Zero value, turns it off.
Clean Session: tells the broker not to keep information about the client and undelivered messages after the connection is broken.
Client ID: is „Device ID“ given by ThingsBoard
Username: is „Access Token“ generated by ThingsBoard
Password: empty by default

Choose JSON for data format.
Save the setup by clicking on Save button.

Send MQTT message

Open the MQTT → MQTT Publish List page.
Add parameter/s from the list of data that you would like to be sent.

For purpose of writing this document we have used the state of the relays on GT-900-343 in routing regime. The state of relays on modbus RTU device are located in Input registers, address 52001. Relay states are sent to the topic „v1/devices/me/telemetry“, on value change only. (Publish->OnValueChange) for 1 (Period/Treshold).

Temperature value, read from M-Bus heat meter, is sent to topic „v1/devices/me/telemetry“, periodically on every 300 seconds.

Payload Value Prefix field should contain keywords for each data (exio_relay_1, gt900_relay_1, cal_return_temp). Keywords are arbitrary and chosen by the user to reflect the real state of the equipment from the filed, in the best way.

Save the setup.

Receive MQTT message

Open MQTT Subscribe List page.
Add parameter/s that you would like to be received.

We have added a parameter for turning the relay On and Off on modbus RTU device, GT900-343.
Memory location for the relay is within Input group of the internal modbus map registers, address 52000.
The state of the relays is changed over the „v1/devices/me/rpc/request/+“ topic.
Payload Value Prefix fields is for keywords that will represent the data (exio_relay_1, gt900_relay_1). Keywords are arbitrary and chosen by the user.

Save the changes.

After setup is finished restart the application by clicking on Restart button located on Restart → Restart Application page.

MQTT Broker

ThingsBoard broker, demo installation (https://demo.thingsboard.io)is provided either free as ThingsBoard Community edition (CE) or as a commercial account – ThingsBoard Professional edition (PE), for this purpose we are using free account.

Go to the login page and make your own account.

Username: „your e-mail address“
Password: „password“

After log-in, click on to the Devices field in the menu and then on sign + in bottom right corner. Choose the option Add New DeviceEnter the name, type and description of the device and click on Add.

DL28 will show on the device list. Click on the field for DL28 device.

COPY DEVICE ID, to be added to DL28 as client number on DL28.
COPY ACCESS TOKEN, to be entered as Username on DL28 Settings page for MQTT.
Tab Attributes, contains incoming data that were sent to topic „v1/devices/me/attributes“ by DL28. This topic is reserved for receiving the static data like firmware version, serial number and similar.
Tab Latest Telemetry, contains data sent to topic „v1/devices/me/telemetry“ by DL28. This topic is meant for dynamic data like value for temperature, pressure, volume flow and similar, also for commands like turning the relay on/off.

Click on Dashboards field, in the left panel menu, then click a „+“ sign in bottom right corner and choose the Add new dashboard option. Enter the name and description for the dashboard you would like to create and click on Add.
Dashboard will be created under the given name and by clicking on it you will open it for further editing. To enter into the Edit mode click on a pencil sign shown in bottom right corner. Now you should add some appropriate widgets for data visualization.

Add new widget → Create new widget.

Choose the appropriate bundle from the list, in our case we will choose Control widgets and after that we will choose Switch Control.

Click on Entity alias and press ENTER.

Add DL28 in to the Entity alias list. Note that this should be done only once for all widgets that are tied to this specific device.

Advanced tab gives the possibility to set the values for data parameters.

Above defines that for switch ON, { “gt900_relay_1”: 1 } will be sent and for switching OFF { “gt900_relay_1”: 0 }. Data is sent to topic “v1/devices/me/request+”.

Same keyword, gt900_relay_1, is used for LED indicator.

We will need to add a widget for Return temperature data visualization. For this purpose we have chosen Digital gauges → TEMP widget. Just to remind you that this data is one in a menu that are received from heat meter over the MBus protocol.

After all settings are finished test how the relay is working by clicking on the switch „GT900 RL1“.

After all settings are finished test how the relay is working by clicking on the switch „GT900 RL1“.

More details about the used products are available on their pages and manuals that could be downloaded from download page.

Please feel free to get in touch with Decode Team if you have any additional questions.

0
    0
    Your Cart
    Your cart is emptyReturn to Shop
    Wer in Deutschland online spielen möchte, achtet heutzutage besonders auf faire Bonusbedingungen, eine breite Auswahl an Slots sowie seriöse Lizenzen aus Malta oder Curaçao. Moderne Anbieter ermöglichen es, bequem vom Smartphone aus Live-Tische zu besuchen oder klassische Spielautomaten mit progressiven Jackpots zu testen. Auch Zahlungsmethoden wie Trustly, Sofort und moderne E-Wallets spielen bei der Wahl eine immer größere Rolle. Einen aktuellen Überblick über neue Plattformen mit ansprechendem Willkommenspaket bietet Irwin Deutschland, wo Neukunden von regelmäßigen Aktionen und einem mehrsprachigen Support profitieren können.
    Vertaillessaan suomalaisia nettikasinoita pelaajat kiinnittävät huomiota erityisesti pelilisenssiin, maksutapojen nopeuteen ja asiakaspalvelun saatavuuteen suomeksi. Modernit kasinot tarjoavat tuhansia kolikkopelejä, progressiivisia jackpoteja sekä live-jakajien pyörittämiä pöytäpelejä, jotka toimivat saumattomasti myös mobiililaitteilla. Uudet tulokkaat houkuttelevat usein ilmaiskierroksilla ja talletusbonuksilla, joiden avulla voi tutustua sivuston valikoimaan riskittä. Kun haluat kokeilla tuoretta ja suomenkielistä vaihtoehtoa, pelaa Uuno kasinon kasinolla ja tutustu heidän monipuoliseen pelitarjontaansa sekä säännöllisiin kampanjoihinsa.
    Online gokken is de afgelopen jaren enorm populair geworden onder Nederlandse spelers die vanuit huis op zoek zijn naar spanning en vermaak. Naast honderden videoslots groeit vooral het live casino-segment, waar echte dealers via een hd-videoverbinding kaarten delen en het rad laten draaien. Wie op zoek is naar een overzichtelijk platform met een ruime keuze aan tafelspellen, vindt bij Dux Casinos live casino een gevarieerd aanbod met onder meer roulette, blackjack, baccarat en diverse game shows. De registratie verloopt vlot, stortingen worden via iDEAL verwerkt en nieuwe leden ontvangen doorgaans een welkomstbonus op hun eerste storting, zodat je direct kunt inzetten op je favoriete spellen.
    When comparing welcome packages at New Zealand-facing casinos, players often look for transparent rollover terms, weekly free-spin drops, and a tidy intro offer that lands in the account within minutes of signing up; if you are weighing Christchurch against other boutique brands, a current Christchurch bonus code is worth activating before the first deposit to make sure the matched funds and any bundled spins are tied to your registration.
    Steeds meer Nederlandse spelers kiezen voor een online casino waar ze zonder gedoe kunnen beginnen. Belangrijk is dat de website overzichtelijk is, dat er eerlijke bonussen worden aangeboden en dat de betaalopties vertrouwd aanvoelen. Een breed spelaanbod met gokkasten, tafelspellen en live dealers maakt het plaatje compleet. Wie snel aan de slag wil, vindt via Instant Сasino Login een directe route naar het speellobby.
    Wie op zoek is naar een betrouwbaar online casino in Nederland let op verschillende zaken: een geldige vergunning van de Kansspelautoriteit, een breed aanbod aan gokspellen en een vlotte uitbetaling. Veel spelers vergelijken daarom platforms op bonusvoorwaarden, spelaanbod en klantenservice voordat ze zich registreren. Een interessante aanbieder in dat overzicht is Nyx Bets Netherlands, dat zich richt op de lokale markt met een overzichtelijke interface. Daarnaast is het verstandig om altijd te spelen met een vastgesteld budget en bewust om te gaan met de risico's die bij gokken komen kijken.