Dobrica Pavlinušić's random unstructured stuff
MQTT: Revision 3
# listen to all events dpavlin@nuc:~$ mosquitto_sub -h rpi2 -v -t '#' pi@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 -l dpavlin@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 |