From 382579fd785b57456c76fe2141f9722e1ba34f34 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 28 Jul 2019 13:51:54 +0200 Subject: [PATCH] example for sonoff --- sonoff.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 sonoff.sh diff --git a/sonoff.sh b/sonoff.sh new file mode 100755 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" + -- 2.20.1