Changes

no edit summary
Line 55: Line 55:     
==MQTT Gateway==
 
==MQTT Gateway==
 +
 +
MQTT Gateway allows to query the device from MQTT Clients, in this section we will configure it to work with the Node-RED.
 +
 
===Using Teltonika device as an MQTT broker===
 
===Using Teltonika device as an MQTT broker===
 
----
 
----
Line 253: Line 256:  
===Device configuration===
 
===Device configuration===
 
----
 
----
 +
Look into Modbus data to server via MQTT section for Modbus Slave and Master setup. Navigate to navigate to '''Services -> Data to server.''' Add new data sender and configure settings accordingly:
 +
 +
*'''Enable''': on
 +
*'''Name''': tcp (input any preferred name)
 +
*'''Data source''': MODBUS data
 +
*'''Protocol''': HTTP(S)
 +
*'''JSON format''': {"Data": %a} - adjust this according to your needs
 +
*'''Segment count''': 1
 +
*'''URL/Host/Connection string''': 192.168.10.139:8080 (virtual machine address and port number)
 +
 +
[[File:Modbus data http to node red.png|border|800px|class=tlt-border]]
 +
 +
===Node-RED setup===
 +
----
 +
For this configuration we are going to need two nodes: '''TCP''' and '''debug'''. Drag in both nodes and click on TCP node. Adjust settings accordingly:
 +
*'''Type''': Listen on port '''8080'''
 +
*'''Output''': stream of '''String''' payload
 +
 +
[[File:Tcp listening on port 8080 node settings.png|border|500px|class=tlt-border]]

Navigation menu