Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howto:mqtt [2022/12/12 17:16] nelginhowto:mqtt [2023/08/04 20:29] – It's "MQTT" digital man
Line 1: Line 1:
-====== Mqtt ======+====== MQTT ======
 This is a bit of a stub for MQTT but it'll help you get going, on Ubuntu at least. This is a bit of a stub for MQTT but it'll help you get going, on Ubuntu at least.
  
Line 6: Line 6:
 Once compiled and installed, run scfg, make some small change and then save. This will now add a mqtt section to main.ini. Change the host and port (default to 127.0.0.1 port 1883) Once compiled and installed, run scfg, make some small change and then save. This will now add a mqtt section to main.ini. Change the host and port (default to 127.0.0.1 port 1883)
  
-   apt install mosquitto mosquitto-clients+   sudo apt install mosquitto mosquitto-clients
  
 Additionally, if you wish to use an X based mqtt client to receive messages, install libnss3 and xdg-utils Additionally, if you wish to use an X based mqtt client to receive messages, install libnss3 and xdg-utils
Line 12: Line 12:
 Mosquitto will install and start automatically but you won't see any messages. If you wish to see them, then stop the broker Mosquitto will install and start automatically but you won't see any messages. If you wish to see them, then stop the broker
  
-   systemctl stop mosquitto+   sudo systemctl stop mosquitto
  
 and run it manually and run it manually
  
-   mosquitto -v+   sudo mosquitto -v 
 + 
 +To continue running as a service CTRL-C to stop mosquitto and then restart 
 + 
 +   sudo systemctl start mosquitto 
 + 
 + 
 +At this point you should probably rebuild sbbs so that libmosquitto will be picked up and included in libsbbs.so. You can verify this with the following command: 
 + 
 +   bbs@bbs:/var/log/apt$ ldd /sbbs/exec/libsbbs.so|grep mosquitto 
 +        libmosquitto.so.1 => /usr/lib/x86_64-linux-gnu/libmosquitto.so.1 (0x00007fbf8c582000) 
 + 
 +If there is no response to the command, then a recompile is necessary. 
  
 Now start sbbs and you should see the following lines in your log Now start sbbs and you should see the following lines in your log
Line 23: Line 36:
    Dec 12 02:13:08 bbs synchronet: MQTT lib: mosquitto 1.6.9    Dec 12 02:13:08 bbs synchronet: MQTT lib: mosquitto 1.6.9
    Dec 12 02:13:08 bbs synchronet: MQTT connecting to broker 127.0.0.1:1883    Dec 12 02:13:08 bbs synchronet: MQTT connecting to broker 127.0.0.1:1883
-   +
 If you see a "failure: 14" message then your broker isn't running. If you see a "failure: 14" message then your broker isn't running.
  
Line 75: Line 88:
    Documentation=man:sbbs    Documentation=man:sbbs
    After=syslog.target network.target mosquitto.service    After=syslog.target network.target mosquitto.service
-   +
 After making changes to your sbbs service file, Be sure to run After making changes to your sbbs service file, Be sure to run
-   systemctl daemon-reload 
-    
- This is a list of data points captured during a short run. Obviously if you use these, replace your BBS's system name and hostname. 
  
-```+   sudo systemctl daemon-reload 
 + 
 +This is a list of data points captured during a short run. Obviously if you use these, replace your BBS's system name and hostname. 
 + 
 +<file>
 sbbs/EOTLBBS/bbs.endofthelinebbs.com/client_count sbbs/EOTLBBS/bbs.endofthelinebbs.com/client_count
 sbbs/EOTLBBS/bbs.endofthelinebbs.com/client_list sbbs/EOTLBBS/bbs.endofthelinebbs.com/client_list
Line 102: Line 116:
 sbbs/EOTLBBS/node1/status sbbs/EOTLBBS/node1/status
 sbbs/EOTLBBS/node1/terminal sbbs/EOTLBBS/node1/terminal
-```+</file>
  
 Note, the numbers at the end of the log outputs is the log level. These may be subject to change in future and may be added to or removed. Note, the numbers at the end of the log outputs is the log level. These may be subject to change in future and may be added to or removed.
Line 110: Line 124:
 ===== See Also ===== ===== See Also =====
   * [[:howto:|howto index]]   * [[:howto:|howto index]]
 +  * [[:ref:mqtt|Synchronet MQTT Topic Naming and Payload Scheme]]
  
-{{tag>}}+{{tag>mqtt}}