Modbus and Bluetooth data sending to Node-RED: Difference between revisions
Modbus and Bluetooth data sending to Node-RED (view source)
Revision as of 15:41, 20 February 2023
, 20 February 2023→Device configuration
Justas.Cip (talk | contribs) No edit summary |
Justas.Cip (talk | contribs) |
||
(7 intermediate revisions by the same user not shown) | |||
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: | ||
# [[ | # [[Modbus_and_Bluetooth_data_sending_to_Node-RED#MQTT_Gateway | MQTT gateway 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.]] | ||
# [[ | # [[Modbus_and_Bluetooth_data_sending_to_Node-RED#Bluetooth_Data_to_Server_via_MQTT_protocol | Bluetooth 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.]] | ||
==Node-RED installation and setup== | ==Node-RED installation and setup== | ||
Line 166: | Line 165: | ||
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== | ===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. | 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. | ||
Line 174: | Line 173: | ||
[[File:Nodered configurationexample topo6.png|border|800px|class=tlt-border]] | [[File:Nodered configurationexample topo6.png|border|800px|class=tlt-border]] | ||
===Device setup=== | ====Device setup==== | ||
---- | ---- | ||
Navigate to '''Services -> Modbus -> MQTT Gateway'''. Follow these steps for the configuration: | Navigate to '''Services -> Modbus -> MQTT Gateway'''. Follow these steps for the configuration: | ||
Line 183: | Line 182: | ||
[[File:MQTT gateway settings node red local router.png|border|500px|class=tlt-border]] | [[File:MQTT gateway settings node red local router.png|border|500px|class=tlt-border]] | ||
===MQTT explorer setup and testing=== | ====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)'''. | Open MQTT Explorer application and in the default screen input the '''Host IP (1)''' of MQTT Broker, then press '''Connect (2)'''. | ||
Line 199: | Line 198: | ||
[[File:Mqtt explorer response from router.png|border|400px|class=tlt-border]] | [[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 251: | 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| | [[File:Data sender settings to node red with node red broker.png|border|800px|class=tlt-border]] | ||
===Node-RED setup=== | ===Node-RED setup=== | ||
Line 299: | 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| | [[File:Bluetooth data sender settings rutx11.png|border|800px|class=tlt-border]] | ||
===Node-RED setup=== | ===Node-RED setup=== |