Dobrica Pavlinušić's random unstructured stuff
MQTT: Revision 4
monitor all messagesdpavlin@nuc:~$ mosquitto_sub -h rpi2 -v -t '#' mosquittoconfigure websocketspi@rpi2 /etc/mosquitto/conf.d $ cat rpi2.conf log_type debug listener 1883 listener 9001 protocol websockets shell clientspi@rpi2 ~ $ cat mqtt-tvservice.sh #!/bin/sh -xe host=`hostname -s` mosquitto_sub -t cmnd/$host/tvservice | xargs -i sh -xc 'tvservice {}' | mosquitto_pub -t stat/$host/tvservice sonoffdpavlin@nuc:~$ mosquitto_pub -h rpi2 -t cmnd/sonoff2/power -m 0 dpavlin@nuc:~$ mosquitto_pub -h rpi2 -t cmnd/sonoff/power -m 1 dpavlin@nuc:~$ mosquitto_pub -h rpi2 -t cmnd/sonoff/ledstate -m 0 dpavlin@nuc:~$ mosquitto_pub -h rpi2 -t cmnd/sonoff/ledstate -m 1 |