Line 8: |
Line 8: |
| *Flespi.io account to act as an MQTT Broker/Publisher/Subscriber (for first configuration example); | | *Flespi.io account to act as an MQTT Broker/Publisher/Subscriber (for first configuration example); |
| | | |
− | ==Configuration using flespi.io as MQTT Broker==
| + | [[File:MQTT Serial gateway topology v2.png|border|center|class=tlt-border|847x279px]] |
− | [[File:MQTT Serial gateway topology.png|border|center|class=tlt-border|847x279px]] | |
| | | |
− | ===Configuring RUT955 MQTT Gateway=== | + | RUT2 will act as a Modbus RTU slave and RUT1 as a Modbus RTU Master. On RUT1, MQTT Serial Gateway will be configured to transfer Modbus data over MQTT. Flespi.io platform will serve as an MQTT Broker |
| + | |
| + | ==RUT2 configuration== |
| + | ===Configuring Modbus RTU Slave=== |
| + | ---- |
| + | Go to Services → Modbus → Modbus RTU Slave and create a new instance. |
| + | # Enter the '''desired instance name'''; |
| + | # Select the '''desired serial interface'''. |
| + | |
| + | [[File:Modbus RTU Slave.png|border|center|class=tlt-border|855 × 308px]] |
| + | |
| + | ==RUT1 configuration== |
| + | ===Configuring MQTT Gateway=== |
| ---- | | ---- |
| Go to '''Services → Modbus → MQTT Gateway''' and there: | | Go to '''Services → Modbus → MQTT Gateway''' and there: |
Line 24: |
Line 35: |
| '''Note''': ''Everything else can be left as default or changed according to your needs.'' | | '''Note''': ''Everything else can be left as default or changed according to your needs.'' |
| | | |
− | ===Configuring RUT955 Serial Gateway=== | + | ===Configuring Serial Gateway=== |
| ---- | | ---- |
| Under the MQTT Gateway configuration, create the Serial Gateway: | | Under the MQTT Gateway configuration, create the Serial Gateway: |
Line 98: |
Line 109: |
| ====Examples==== | | ====Examples==== |
| ---- | | ---- |
− | Modbus parameters are held within registers. Each register contains 2 bytes of information. For simplification, the number of registers for storing numbers is 2 (4 bytes), while the number of registers for storing text information is 16 (32 bytes).
| |
− |
| |
− | The register numbers and corresponding system values can be found [[RUT955_Monitoring_via_Modbus#Get_Parameters|in this article]].
| |
− |
| |
| {| class="wikitable" | | {| class="wikitable" |
| |Setting relay (on) (Relay address is 202, which means 'Number of first register will be 203) | | |Setting relay (on) (Relay address is 202, which means 'Number of first register will be 203) |
Line 109: |
Line 116: |
| |'''1 1 1 1 1 3 6 2''' | | |'''1 1 1 1 1 3 6 2''' |
| |} | | |} |
− | ===Testing MQTT Publisher and Subscriber on flespi.io===
| + | Modbus parameters are held within registers. The register numbers and corresponding system values can be found [[RUT955_Monitoring_via_Modbus#Get_Parameters|'''in this article''']]. |
− | ----
| + | |
| + | ==Testing MQTT Publisher and Subscriber on flespi.io== |
| ====Adding Flespi Subscriber==== | | ====Adding Flespi Subscriber==== |
| ---- | | ---- |
Line 145: |
Line 153: |
| ==See Also== | | ==See Also== |
| *[[RUT955 Monitoring via Modbus#Get Parameters]] | | *[[RUT955 Monitoring via Modbus#Get Parameters]] |
− | *[[RUT955_Modbus#MQTT_Gateway|MQTT Gateway]] | + | *[[RUT955_Modbus#MQTT_Gateway|MQTT Gateway and Modbus]] |
| ==External links== | | ==External links== |
| [https://flespi.io/#/ Flespi.io] | | [https://flespi.io/#/ Flespi.io] |