projects
/
mqtt-homehub
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
convert ir-ctl -r output into sigrok file for pulseview
[mqtt-homehub]
/
mqtt-tasmota.sh
1
#!/bin/sh -xe
2
3
mqtt="-h rpi2"
4
5
cmnd=$1
6
test -z "$cmnd" && cmnd="status"
7
8
trap "trap - TERM && kill -- -$$" INT TERM EXIT
9
10
mosquitto_sub $mqtt -t "stat/#" -v | tee /dev/shm/mqtt.$cmnd &
11
12
mosquitto_pub $mqtt -t "cmnd/sonoffs/$cmnd" -m 0
13
sleep 1