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:27, 31 January 2023
, 31 January 2023→Device configuration
Justas.Cip (talk | contribs) |
Justas.Cip (talk | contribs) |
||
Line 176: | Line 176: | ||
Add new request and adjust settings according to your needs. For this example, we are going to pull device name from the registers, so our configuration looks like this: | Add new request and adjust settings according to your needs. For this example, we are going to pull device name from the registers, so our configuration looks like this: | ||
# '''Name''': test (input any preferred name) | |||
# '''Data type''': ASCII (to get a string of text) | |||
# '''Function''': Read holding registers (3) | |||
# '''First register number''': 72 | |||
# '''Register count/values''': 3 | |||
# '''Brackets''': use brackets | |||
[[File:Tcp master nodered.png|border| | Press enable to enable the Modbus request | ||
[[File:Tcp master nodered.png|border|1050px|class=tlt-border]] | |||
---- | ---- | ||
Line 190: | Line 191: | ||
To finish up the device configuration, navigate to '''Services -> Data to server.''' Add new data sender and configure settings accordingly: | To finish up the device configuration, navigate to '''Services -> Data to server.''' Add new data sender and configure settings accordingly: | ||
# '''Enable''': on | |||
# '''Name''': Data_to_node (input any preferred name) | |||
# '''Data source''': MODBUS data | |||
# '''Protocol''': MQTT | |||
# '''JSON format''': {"Router name": %a} - adjust this according to your needs | |||
# '''URL/Host/Connection string''': 192.168.10.139 (virtual machine address) | |||
# '''Port''': 1883 | |||
# '''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|1000px|class=tlt-border]] |