Changes

379 bytes added ,  11:30, 7 October 2019
no edit summary
Line 96: Line 96:  
[[Image:Configuration examples mqtt publisher_new_design.png.png]]
 
[[Image:Configuration examples mqtt publisher_new_design.png.png]]
   −
<b>NOTE</b>: If you configring a TRB14x devices, it's default hostname is 192.168.2.1.
+
<b>NOTE</b>: If you configuring a TRB14x devices, it's default hostname is 192.168.2.1.
      Line 109: Line 109:  
==Subscribing and Publishing==
 
==Subscribing and Publishing==
   −
Now you can use set up Brokers and Clients on your PC. In order to Publish commands and Subscribe to topics on a RUT router, you'll need to know the router's '''Serial Number'''. You can find your router's serial number in the '''Status → Device''' section of the router's WebUI. Or you can subscribe to the topic '''router/id''' and publish the message '''id''' to the topic '''router/get'''. To do so, enter these commands in separate Terminal windows:
+
Now you can use set up Brokers and Clients on your PC. In order to Publish commands and Subscribe to topics on a TRB14x devices and RUT routers, you'll need to know the device's '''Serial Number''' and '''TYPE'''. For  TRB14x device's you'll need to use '''device''' type and for RUT router's you'll need to use '''router''' type. Router's serial number you can find in the '''Status → Device''' section of the router's WebUI. For TRB14x devices serial number you can find in the '''Status → System''' section of the device WebUI. Or you can subscribe to the topic '''<TYPE>/id''' and publish the message '''id''' to the topic '''<TYPE>/get'''. To do so, enter these commands in separate Terminal windows:
    
'''Subscribe:'''
 
'''Subscribe:'''
  $ mosquitto_sub -h 192.168.1.1 -p 1833 -u user -P pass -t router/id
+
  $ mosquitto_sub -h 192.168.1.1 -p 1833 -u user -P pass -t <TYPE>/id
    
'''Publish:'''
 
'''Publish:'''
  $ mosquitto_pub -h 192.168.1.1 -p 1833 -u user -P pass -t router/get -m id
+
  $ mosquitto_pub -h 192.168.1.1 -p 1833 -u user -P pass -t <TYPE>/get -m id
    +
In image below is presented example of how to get RUT router serial number by subscribing and publishing parameter '''id''':
    
[[Image:Configuration examples mqtt router id v7.png]]
 
[[Image:Configuration examples mqtt router id v7.png]]
0

edits

Navigation menu