Adding Mosquitto MQTT messages to Conky
|Adding Mosquitto MQTT messages to Conky took a bit of thinking about but turned out to be incredibly simple. It just needed the addition of this line to .conkyrc:
${texeci 60 mosquitto_sub -C 1 -h 192.168.1.94 -t mqtt/topic}
texeci
executes the command inside a thread which allows conky to load before the command has finished-h 192.168.1.94
should be changed to the IP address of your mosquitto clientmqtt/topic
should be replaced with the MQTT topic you are interested in
One Comment
The perfect trick! But here it seems I can only get (null) in return. I’ve got to investigate a little..