Changes

310 bytes added ,  15:30, 29 April 2019
no edit summary
Line 74: Line 74:  
[[Image:Configuration examples mqtt publisher.png]]
 
[[Image:Configuration examples mqtt publisher.png]]
   −
==Subscribing and Publishing==
+
==Configuring the PC==
   −
Once the Broker is up, you'll need install '''Mosquitto''' and '''Mosquitto Clients'''. To do so, open the Linux '''Terminal''' app and enter this command:
+
Once the Broker is up, you'll need to install '''Mosquitto''' and '''Mosquitto Clients''' on your PC. To do so, open the Linux '''Terminal''' app and enter this command:
    
  $ sudo apt-get install mosquitto mosquitto-clients
 
  $ sudo apt-get install mosquitto mosquitto-clients
 +
 +
<b>NOTE</b>: this software was chosen because it suits the needs of this example and is easily accessible to most users. It is not the only application compatible with RUT MQTT, so if you're using your own software for your solution, it is not mandatory to install this.
 +
 +
==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 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:

Navigation menu