This is the new version of my old website. You can find the old website here: old.dl2sba.com. If you miss any information or you find bugs, please let me know by E-Mail

Some basic config stuff for the RASPI & MQTT

 

/etc/mosquitto/mosquitto.conf

# Place your local configuration in /etc/mosquitto/conf.d/
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
connection_messages true
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d

/etc/mosquitto/conf.d/dl2sba.conf

password_file /etc/mosquitto/conf.d/pwfile
allow_anonymous false
sys_interval 60

Start/Stop/Status

sudo service mosquitto status

sudo service mosquitto stop

sudo service mosquitto start

Tipps

http://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices

 Posting a lifesign to Web-Hub

mosquitto_pub -h 127.0.0.1 -q 1 -u USER -P PASS -t "dl2sba.de/sensorData/40000/1" -m ` cat /proc/uptime | awk -F" " '{ print $1 }'`

 Execute as cronjob every 15min with "crontab -e"

0,15,30,45 * * * * /home/dietmar/bin/postLifesign.sh

Get status of broker

mosquitto_sub -d -h 127.0.0.1 -u user -P password -v -t \$SYS/#

 

 

 

(c) Dietmar Krause, DL2SBA 2026 Impressum Datenschutz
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Quantcast
Save