Changes

m
changed images, see also new link, modbus parameters reference
Line 38: Line 38:  
#Enter Period in seconds, how often requests will be sent to the Slave device
 
#Enter Period in seconds, how often requests will be sent to the Slave device
 
#Enter new request name and press '''Add''' in Requests configurations
 
#Enter new request name and press '''Add''' in Requests configurations
#Choose Data type and Function, enter First register/coil/input to be read or written and Register count. You can name each individual configuration, and then select enable on configurations that you want to use. In this example, register to get WAN IP address of the slave device is used.
+
#Choose Data type and Function, enter First register/coil/input to be read or written and Register count. You can name each individual configuration, and then select enable on configurations that you want to use. In this example, register to get Routers name is used.
 
#Press the Test button in Request Configuration Testing to see if the Slave device responds to requests, a response similar to the image below should be shown.
 
#Press the Test button in Request Configuration Testing to see if the Slave device responds to requests, a response similar to the image below should be shown.
 
#Press Save & Apply
 
#Press Save & Apply
[[File:Networking_MQTT_MODBUS_flespi_configuration_master_add_v1.png|alt=|border|class=tlt-border|1015x1015px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_afteradd_step_234567_v1.png|alt=|border|class=tlt-border|691x691px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_req_config8up_v1.png|alt=|border|class=tlt-border|1008x1008px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_req_testing_v1.png|alt=|border|class=tlt-border|1002x1002px]]
+
''List of available Modbus parameters can be found [https://wiki.teltonika-networks.com/view/RUT955_Monitoring_via_Modbus#Get_Parameters here]''
   −
=== Configuring Flespi.io MQTT Broker===
+
[[File:Networking_MQTT_MODBUS_flespi_configuration_master_add_v1.png|alt=|border|class=tlt-border|1007x1007px]]
 +
 
 +
[[File:Networking MQTT MODBUS flespi configuration master afteradd step 234567 v2.png|border|class=tlt-border|1006x1006px]]
 +
 
 +
[[File:Networking MQTT MODBUS flespi configuration master req testing v3.png|border|class=tlt-border|1007x1007px]]
 +
 
 +
===Configuring Flespi.io MQTT Broker===
 
----
 
----
 
Login or create an account on https://flespi.io
 
Login or create an account on https://flespi.io
Line 56: Line 62:  
#Enter Client name
 
#Enter Client name
 
#Copy Host address
 
#Copy Host address
# Copy Username
+
#Copy Username
 
#Create a password
 
#Create a password
 
#Press Save
 
#Press Save
Line 66: Line 72:     
#Select Enable
 
#Select Enable
# Enter Host (copied from flespi connection settings without 'wss://' and port)
+
#Enter Host (copied from flespi connection settings without 'wss://' and port)
#Enter Username (Copied from flespi Connection settings generated token)
+
# Enter Username (Copied from flespi Connection settings generated token)
 
#Enter Password
 
#Enter Password
   Line 74: Line 80:  
''You can change Request and Response topics that you will have to publish and subscribe to get information from Modbus TCP Master through MQTT Gateway, but for this example, they are left on default topics''
 
''You can change Request and Response topics that you will have to publish and subscribe to get information from Modbus TCP Master through MQTT Gateway, but for this example, they are left on default topics''
   −
===Message format for MQTT publisher ===
+
===Message format for MQTT publisher===
 
----
 
----
 
The format is in the text - heavier and slower, but less difficult to edit.
 
The format is in the text - heavier and slower, but less difficult to edit.
Line 88: Line 94:  
|-
 
|-
 
|4. IP
 
|4. IP
|IPv6 must be in full format (for example: '''2001:0db8:0000:0000:0000:8a2e:0370:7334''')
+
| IPv6 must be in full format (for example: '''2001:0db8:0000:0000:0000:8a2e:0370:7334''')
 
|-
 
|-
 
|5. Port
 
|5. Port
Line 94: Line 100:  
|-
 
|-
 
|6. Timeout in seconds (time to wait for response)
 
|6. Timeout in seconds (time to wait for response)
|from '''1''' to '''999'''
+
| from '''1''' to '''999'''
 
|-
 
|-
 
|7. Slave ID - Indicates to which slave request is sent
 
|7. Slave ID - Indicates to which slave request is sent
Line 103: Line 109:  
|-
 
|-
 
|9. Number of first register from which information will be read or written
 
|9. Number of first register from which information will be read or written
|from '''1''' to '''65535'''
+
| from '''1''' to '''65535'''
 
|-
 
|-
 
|10. Registry value
 
|10. Registry value
Line 123: Line 129:  
|}
 
|}
   −
===Testing MQTT Publisher and Subscriber on flespi.io===
+
=== Testing MQTT Publisher and Subscriber on flespi.io===
 
----
 
----
 
Login and navigate to MQTT Board on https://flespi.io
 
Login and navigate to MQTT Board on https://flespi.io
Line 130: Line 136:     
#Press '''''<nowiki/>'+'''''' button on the top right corner
 
#Press '''''<nowiki/>'+'''''' button on the top right corner
# Select '''''<nowiki/>'Subscriber''''''
+
#Select '''''<nowiki/>'Subscriber''''''
 
#In the topic field enter '''''<nowiki/>'response''''''
 
#In the topic field enter '''''<nowiki/>'response''''''
 
#Press '''''<nowiki/>'Subscribe'''''' button
 
#Press '''''<nowiki/>'Subscribe'''''' button
Line 157: Line 163:  
[[File:Networking Topology MQTT MODBUS RUTbroker configuration v1.png|987x987px]]
 
[[File:Networking Topology MQTT MODBUS RUTbroker configuration v1.png|987x987px]]
   −
===Configuring Modbus TCP Master, MQTT Gateway MQTT Broker on RUT240 and MQTT Publisher/Subscriber on PC ===
+
===Configuring Modbus TCP Master, MQTT Gateway MQTT Broker on RUT240 and MQTT Publisher/Subscriber on PC===
 
----
 
----
 
''Same configuration will be used for Modbus TCP Master and Slave RUT955 routers as in previous example, only settings in Modbus TCP Master router RUT955 will be changed to match MQTT Broker on RUT240 router''
 
''Same configuration will be used for Modbus TCP Master and Slave RUT955 routers as in previous example, only settings in Modbus TCP Master router RUT955 will be changed to match MQTT Broker on RUT240 router''
Line 178: Line 184:  
#Select '''Enable'''
 
#Select '''Enable'''
 
#Check '''Enable Remote Access'''
 
#Check '''Enable Remote Access'''
#Press '''Save & Apply'''
+
# Press '''Save & Apply'''
    
[[File:Networking MQTT Modbus MQTT Broker RUTos config v1.png|border|class=tlt-border|1079x1079px]]
 
[[File:Networking MQTT Modbus MQTT Broker RUTos config v1.png|border|class=tlt-border|1079x1079px]]
Line 202: Line 208:     
==See Also==
 
==See Also==
*https://wiki.teltonika-networks.com/view/Modbus_Master_RutOS_configuration_example
+
*[[Modbus Master RutOS configuration example]]
 +
*[[RUT955 Monitoring via Modbus#Get Parameters]]

Navigation menu