example of irsend for tasmota
[mqtt-homehub] / ota-upgrade.sh
1 mosquitto_sub -h rpi2 -t stat/sonoff/otaurl -C 2 &
2 mosquitto_pub -h rpi2 -t cmnd/sonoff/otaurl -m ''
3 mosquitto_pub -h rpi2 -t cmnd/sonoff/otaurl -m 'http://'`hostname -s`':8000'
4
5 file=`ls -t /tmp/*.tmp/sonoff.ino.bin | head`
6
7 socat -vv TCP-LISTEN:8000,crlf,reuseaddr,fork SYSTEM:"echo HTTP/1.0 200; echo Content-Type\: application/octet-stream; echo Content-Length\: `stat --format %s $file` ; echo ; cat $file"
8
9