Changes

m
border test 3
Line 14: Line 14:  
#Enter device ID
 
#Enter device ID
 
#Press '''Save & Apply'''
 
#Press '''Save & Apply'''
[[File:Networking_MQTT_MODBUS_flespi_configuration_slave1_v1.png|border|class=tlt-border]]
+
[[File:Networking_MQTT_MODBUS_flespi_configuration_slave1_v1.png|border|class=tlt-border|1044x1044px]]
    
''*In this config LAN port is used so “Allow Remote Access” is not needed''
 
''*In this config LAN port is used so “Allow Remote Access” is not needed''
Line 20: Line 20:  
''Modbus TCP Slave RUT955 is now configured''.
 
''Modbus TCP Slave RUT955 is now configured''.
   −
===Configuring RUT955 Modbus TCP Master===
+
===Configuring RUT955 Modbus TCP Master ===
 
----
 
----
 
Go to '''Services > Modbus > Modbus TCP Master'''
 
Go to '''Services > Modbus > Modbus TCP Master'''
    
#Press '''Add'''
 
#Press '''Add'''
# Check '''Enable'''
+
#Check '''Enable'''
 
#Enter name for slave device
 
#Enter name for slave device
 
#Slave ID must match with previously configured Slave device ID
 
#Slave ID must match with previously configured Slave device ID
# Enter IP address of Modbus TCP Slave device
+
#Enter IP address of Modbus TCP Slave device
 
#Chose same Port as in Slave device - 502
 
#Chose same Port as in Slave device - 502
#Enter Period in seconds, how often requests will be sent to Slave device
+
# Enter Period in seconds, how often requests will be sent to 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 WAN IP address of the slave device is used.
 
#Press Test button in Request Configuration Testing to see if Slave device respond to requests, response similar to image below should be shown.
 
#Press Test button in Request Configuration Testing to see if Slave device respond to requests, response similar to image below should be shown.
# Press Save & Apply
+
#Press Save & Apply
 
[[File:Networking_MQTT_MODBUS_flespi_configuration_master_add_v1.png|alt=|border|1136x1136px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_afteradd_step_234567_v1.png|alt=|border|736x736px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_req_config8up_v1.png|alt=|border|1111x1111px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_req_testing_v1.png|alt=|border|1109x1109px]]
 
[[File:Networking_MQTT_MODBUS_flespi_configuration_master_add_v1.png|alt=|border|1136x1136px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_afteradd_step_234567_v1.png|alt=|border|736x736px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_req_config8up_v1.png|alt=|border|1111x1111px]][[File:Networking_MQTT_MODBUS_flespi_configuration_master_req_testing_v1.png|alt=|border|1109x1109px]]
   Line 46: Line 46:     
#Navigate to MQTT Board on the left side of the screen and press it.                                              [[File:Networking MQTT Modbus flespi board.png|301x301px]]
 
#Navigate to MQTT Board on the left side of the screen and press it.                                              [[File:Networking MQTT Modbus flespi board.png|301x301px]]
#On the right hand panel, top right corner, next to the name of the MQTT board, press the cogwheel looking icon to open ''Connection Settings''
+
# On the right hand panel, top right corner, next to the name of the MQTT board, press the cogwheel looking icon to open ''Connection Settings''
 
#In the opened window, press "Get flespi token" to generate an username
 
#In the opened window, press "Get flespi token" to generate an username
#Enter Client name
+
# Enter Client name
 
#Copy Host address
 
#Copy Host address
 
#Copy Username
 
#Copy Username
Line 61: Line 61:  
#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
   −
[[File:Networking MQTT Modbus Rut configuration Mqtt gateway v1.png|border|1152x1152px]]
+
[[File:Networking MQTT Modbus Rut configuration Mqtt gateway v1.png|border|class=tlt-border|1152x1152px]]
    
''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 ===
 
----
 
----
 
Format is in text - heavier and slower, but less difficult to edit.
 
Format is in text - heavier and slower, but less difficult to edit.
Line 88: Line 88:  
|-
 
|-
 
|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 160: Line 160:  
#Host: '''Enter Public IP address of MQTT Broker (RUT240)'''
 
#Host: '''Enter Public IP address of MQTT Broker (RUT240)'''
 
#Username: '''N/A'''
 
#Username: '''N/A'''
# Password: '''N/A'''
+
#Password: '''N/A'''
# Press '''Save & Apply'''
+
#Press '''Save & Apply'''
   −
[[File:Networking MQTT Modbus MQTT gateway config v1.png|border|1130x1130px]]
+
[[File:Networking MQTT Modbus MQTT gateway config v1.png|border|class=tlt-border|1130x1130px]]
   −
===Configuring RUT240 MQTT Broker ===
+
===Configuring RUT240 MQTT Broker===
 
----
 
----
   Line 172: Line 172:  
#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|1133x1133px]]
+
[[File:Networking MQTT Modbus MQTT Broker RUTos config v1.png|border|class=tlt-border|1133x1133px]]
   −
===Testing MQTT Gateway ===
+
===Testing MQTT Gateway===
 
----
 
----
   Line 187: Line 187:  
<blockquote>''mosquito_sub -h [Host_address] -p [Port] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Subscriber in terminal v1.png]]
 
<blockquote>''mosquito_sub -h [Host_address] -p [Port] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Subscriber in terminal v1.png]]
   −
* Open second terminal, which will act as '''Publisher.''' Type in:
+
*Open second terminal, which will act as '''Publisher.''' Type in:
    
<blockquote>''mosquito_pub -h [Host] -h [Host_address] -p [Port] -m [‘Message’] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Publisher testing v1.png]]
 
<blockquote>''mosquito_pub -h [Host] -h [Host_address] -p [Port] -m [‘Message’] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Publisher testing v1.png]]
   −
* On the first window - '''Subscriber''', a response should appear
+
*On the first window - '''Subscriber''', a response should appear
    
[[File:Networking MQTT Modbus Subscriber response ubuntu v1.png]]
 
[[File:Networking MQTT Modbus Subscriber response ubuntu v1.png]]

Navigation menu