projects
/
mqtt-homehub
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
example for sonoff
[mqtt-homehub]
/
sonoff.sh
diff --git a/sonoff.sh
b/sonoff.sh
new file mode 100755
(executable)
index 0000000..
c73d4f6
--- /dev/null
+++ b/
sonoff.sh
@@ -0,0
+1,5
@@
+#!/bin/sh -xe
+test -z "$1" && echo "usage: $0 light|ledstate on|off" && exit 1
+device=`basename $0 | cut -d. -f1`
+mosquitto_pub -h rpi2 -t "cmnd/$device/$1" -m "$2"
+