Changes

m
no edit summary
Line 53: Line 53:  
#Log in or create an account on https://flespi.io
 
#Log in or create an account on https://flespi.io
   −
[[File:Networking MQTT Modbus flespiio login.png|842x842px]]
+
[[File:Networking MQTT Modbus flespiio login.png|border|class=tlt-border|842x842px]]
    
Once logged in:
 
Once logged in:
Line 65: Line 65:  
#Create a password
 
#Create a password
 
#Press Save
 
#Press Save
[[File:Networking MQTT modbus fespi Connection settings v1.png|544x544px|alt=|border]] [[File:Networking MQTT Modbus flespi board.png|border|class=tlt-border|544x544px]]   
+
[[File:Networking MQTT modbus fespi Connection settings v1.png|border|class=tlt-border|544x544px]] [[File:Networking MQTT Modbus flespi board.png|border|class=tlt-border|544x544px]]   
    
=== Configuring MQTT Gateway on RUT955 Modbus TCP Master===
 
=== Configuring MQTT Gateway on RUT955 Modbus TCP Master===
Line 117: Line 117:  
If function is 16 - from '''1''' to '''123''' (first register + registry value can not go out of range), Registry values separated by commas without spaces. Example.: '''1,2,3,654,21,789'''. There has to be as many values, as specified number of registers, and each value must be between '''0''' and '''65535'''. If number of registries is 0, there should be '''no registry values'''
 
If function is 16 - from '''1''' to '''123''' (first register + registry value can not go out of range), Registry values separated by commas without spaces. Example.: '''1,2,3,654,21,789'''. There has to be as many values, as specified number of registers, and each value must be between '''0''' and '''65535'''. If number of registries is 0, there should be '''no registry values'''
 
|}
 
|}
[[File:Networking MQTT modbus message format publisher v1.png]]
+
[[File:Networking MQTT modbus message format publisher v1.png|border|class=tlt-border]]
    
====Examples====
 
====Examples====
Line 140: Line 140:  
#Press '''''<nowiki/>'Subscribe'''''' button
 
#Press '''''<nowiki/>'Subscribe'''''' button
   −
[[File:Networking MQTT Modbus flespi subscriber config1 v1.png]]            [[File:Networking MQTT Modbus flespi subscriber config2 v1.png]]
+
[[File:Networking MQTT Modbus flespi subscriber config1 v1.png|border|class=tlt-border]]            [[File:Networking MQTT Modbus flespi subscriber config2 v1.png|border|class=tlt-border]]
    
Add a Publisher:
 
Add a Publisher:
Line 150: Line 150:  
#Press '''''<nowiki/>'Publish'''''' button
 
#Press '''''<nowiki/>'Publish'''''' button
   −
[[File:Networking MQTT Modbus flespi publisher config1 v1.png|434x434px]]          [[File:Networking MQTT Modbus flespi publisher config2 v1.png|365x365px]]
+
[[File:Networking MQTT Modbus flespi publisher config1 v1.png|border|class=tlt-border|434x434px]]          [[File:Networking MQTT Modbus flespi publisher config2 v1.png|border|class=tlt-border|365x365px]]
      Line 156: Line 156:       −
[[File:Networking MQTT Modbus flespi Response v2.png|931x931px]]
+
[[File:Networking MQTT Modbus flespi Response v2.png|border|class=tlt-border|931x931px]]
    
When the value climbs over 65535 the counter resets and the value held by the first register increases by '''1'''. So one way to interpret the results would be to multiply the value in the first register by '''2<sup>16</sup>''' and add it to the value of the second register. In this example: '''9 * 65536 + 3502 = 593326s''' or '''6 days 20 hours 48 minutes and 46 seconds.'''
 
When the value climbs over 65535 the counter resets and the value held by the first register increases by '''1'''. So one way to interpret the results would be to multiply the value in the first register by '''2<sup>16</sup>''' and add it to the value of the second register. In this example: '''9 * 65536 + 3502 = 593326s''' or '''6 days 20 hours 48 minutes and 46 seconds.'''
Line 200: Line 200:  
*Open first terminal, which will act as '''Subscriber'''. Type in:
 
*Open first terminal, which will act as '''Subscriber'''. Type in:
   −
<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|border|class=tlt-border]]
    
*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|border|class=tlt-border]]
    
*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|border|class=tlt-border]]
    
==See Also==
 
==See Also==
 
*[[Modbus Master RutOS configuration example]]
 
*[[Modbus Master RutOS configuration example]]
 
*[[RUT955 Monitoring via Modbus#Get Parameters]]
 
*[[RUT955 Monitoring via Modbus#Get Parameters]]

Navigation menu