Some notes I wish existed in my MQTT journey
Mosquitto is a useful messaging protocol which can publish and subscribe messages to various hosts. These messages can be text, sensor data and all kidn of other things.
- subscribe to everything: mosquitto_sub -h some.host -p 8883 --capath /etc/ssl/certs/ -t "#" -v
- use ssl, but suspect the error messages will be hopeless
- To remove a retained message, send a new empty message with: mosquitto_pub -t -r -n
Using with collectd and rrdtool
SSL error messages weren't very helpful
- Interval 60 - probably required
- CACert "/etc/ssl/certs/ca-certificates.crt"
It needs to know what kind of topic you're seeing.
I got lucky and had temperature, pressure, and humidity in the defaults but not dewpoint which leads to this logfile error.
mqtt plugin: Unknown type: "dewpoint".
The solution, add this to /usr/share/collectd/types.db:
- make sure your ipv6 address works too