Changes

Line 18: Line 18:  
There are a couple of different use cases with Node-RED and Teltonika devices:
 
There are a couple of different use cases with Node-RED and Teltonika devices:
   −
# [[Draft:Nodered#MQTT_Gateway | MQTT gateway using either Node-RED or Teltonika device as MQTT broker.]]
+
# [[Modbus_and_Bluetooth_data_sending_to_Node-RED#MQTT_Gateway | MQTT gateway using either Node-RED or Teltonika device as MQTT broker.]]
# [[Draft:Nodered#Modbus_Data_to_Server_via_MQTT_protocol | Modbus data to server using either Node-RED or Teltonika device as MQTT broker.]]
+
# [[Modbus_and_Bluetooth_data_sending_to_Node-RED#Modbus_Data_to_Server_via_MQTT_protocol | Modbus data to server using either Node-RED or Teltonika device as MQTT broker.]]
# [[Draft:Nodered#Bluetooth_Data_to_Server_via_MQTT_protocol | Bluetooth data to server using Node-RED as MQTT broker.]]
+
# [[Modbus_and_Bluetooth_data_sending_to_Node-RED#Bluetooth_Data_to_Server_via_MQTT_protocol | Bluetooth data to Node-RED server.]]
# [[Draft:Nodered#Modbus_Data_to_Server_via_HTTP_protocol | HTTP data to Node-RED server.]]
+
# [[Modbus_and_Bluetooth_data_sending_to_Node-RED#Modbus_Data_to_Server_via_HTTP_protocol | HTTP data to Node-RED server.]]
# [[Draft:Nodered#MQTT_gateway_using_MQTT_explorer_and_Node-RED_broker | MQTT gateway using MQTT Explorer.]]
      
==Node-RED installation and setup==
 
==Node-RED installation and setup==
Line 165: Line 164:     
To test the configuration, '''deploy''' the nodes again and send the message by clicking on the '''inject''' node.
 
To test the configuration, '''deploy''' the nodes again and send the message by clicking on the '''inject''' node.
 +
 +
===MQTT gateway using MQTT explorer and Node-RED broker===
 +
----
 +
In this example, we are going to use the same Node-RED broker configured in previous parts of this article, only this time we are going to use [http://mqtt-explorer.com/ MQTT Explorer] app to Publish and Subscribe to Modbus data.
 +
 +
Here's connection topology for this use case:
 +
 +
[[File:Nodered configurationexample topo6.png|border|800px|class=tlt-border]]
 +
 +
====Device setup====
 +
----
 +
Navigate to '''Services -> Modbus -> MQTT Gateway'''. Follow these steps for the configuration:
 +
# '''Enable''': on
 +
# '''Host''': input '''192.168.10.139''', or if you would like to use local broker on the device - input '''127.0.0.1'''
 +
Leave everything else as default, or adjust according to your needs
 +
 +
[[File:MQTT gateway settings node red local router.png|border|500px|class=tlt-border]]
 +
 +
====MQTT explorer setup and testing====
 +
----
 +
Open MQTT Explorer application and in the default screen input the '''Host IP (1)'''  of MQTT Broker, then press '''Connect (2)'''.
 +
 +
[[File:Mqtt explorer server connection to broker example.png|border|600px|class=tlt-border]]
 +
 +
Once done, locate Publish section on the right side. You can use the same settings as in previous sections of MQTT Gateway:
 +
 +
# '''Topic:''' request
 +
# '''Data:''' 0 65432 0 192.168.10.1 502 5 1 3 6 2
 +
 +
[[File:Publish from mqtt explorer node red example.png|border|500px|class=tlt-border]]
 +
 +
If everything is set up correctly, then you should be able to see response from the router:
 +
 +
[[File:Mqtt explorer response from router.png|border|400px|class=tlt-border]]
    
==Modbus Data to Server via MQTT protocol==
 
==Modbus Data to Server via MQTT protocol==
Line 216: Line 249:  
# '''Topic''': rutx (input any preferred topic, make sure to subscribe on the same topic)
 
# '''Topic''': rutx (input any preferred topic, make sure to subscribe on the same topic)
   −
[[File:Data sender settings to node red with node red broker.png|border|1000px|class=tlt-border]]
+
[[File:Data sender settings to node red with node red broker.png|border|800px|class=tlt-border]]
    
===Node-RED setup===
 
===Node-RED setup===
Line 264: Line 297:  
# '''Topic''': beacon (input any preferred topic, make sure to subscribe on the same topic)
 
# '''Topic''': beacon (input any preferred topic, make sure to subscribe on the same topic)
   −
[[File:Bluetooth data sender settings rutx11.png|border|600px|class=tlt-border]]
+
[[File:Bluetooth data sender settings rutx11.png|border|800px|class=tlt-border]]
    
===Node-RED setup===
 
===Node-RED setup===
Line 310: Line 343:     
[[File:Nodered configurationexample httpData incoming v1.png|border|400px|class=tlt-border]]
 
[[File:Nodered configurationexample httpData incoming v1.png|border|400px|class=tlt-border]]
  −
==MQTT gateway using MQTT explorer and Node-RED broker==
  −
  −
In this example, we are going to use the same Node-RED broker configured in previous parts of this article, only this time we are going to use [http://mqtt-explorer.com/ MQTT Explorer] app to Publish and Subscribe to Modbus data.
  −
  −
Here's connection topology for this use case:
  −
  −
[[File:Nodered configurationexample topo6.png|border|800px|class=tlt-border]]
  −
  −
===Device setup===
  −
----
  −
Navigate to '''Services -> Modbus -> MQTT Gateway'''. Follow these steps for the configuration:
  −
# '''Enable''': on
  −
# '''Host''': input '''192.168.10.139''', or if you would like to use local broker on the device - input '''127.0.0.1'''
  −
Leave everything else as default, or adjust according to your needs
  −
  −
[[File:MQTT gateway settings node red local router.png|border|500px|class=tlt-border]]
  −
  −
===MQTT explorer setup and testing===
  −
----
  −
Open MQTT Explorer application and in the default screen input the '''Host IP (1)'''  of MQTT Broker, then press '''Connect (2)'''.
  −
  −
[[File:Mqtt explorer server connection to broker example.png|border|600px|class=tlt-border]]
  −
  −
Once done, locate Publish section on the right side. You can use the same settings as in previous sections of MQTT Gateway:
  −
  −
# '''Topic:''' request
  −
# '''Data:''' 0 65432 0 192.168.10.1 502 5 1 3 6 2
  −
  −
[[File:Publish from mqtt explorer node red example.png|border|500px|class=tlt-border]]
  −
  −
If everything is set up correctly, then you should be able to see response from the router:
  −
  −
[[File:Mqtt explorer response from router.png|border|400px|class=tlt-border]]
      
==Summary==
 
==Summary==