diff --git a/mystrom-off.sh b/mystrom-off.sh new file mode 100755 index 0000000..7268e90 --- /dev/null +++ b/mystrom-off.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# 2020-12-07, Nico Schottelius + +if [ $# -lt 1 ]; then + echo "$0 hostname [hostname...]" + echo " hostname: which mystrom to connect to" + exit 1 +fi + +while [ $# -ge 1 ]; do + hostname=$1; shift + + curl --location \ + --request GET \ + "http://${hostname}/relay?state=0" + +done diff --git a/mystrom-on.sh b/mystrom-on.sh index 7019f8f..37c439d 100755 --- a/mystrom-on.sh +++ b/mystrom-on.sh @@ -3,7 +3,7 @@ if [ $# -lt 1 ]; then echo "$0 hostname [hostname...]" - echo " hostname: which mystrom to turn on" + echo " hostname: which mystrom to connect to" exit 1 fi diff --git a/mystrom-status.sh b/mystrom-status.sh new file mode 100755 index 0000000..01f7366 --- /dev/null +++ b/mystrom-status.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# 2020-12-07, Nico Schottelius + +if [ $# -lt 1 ]; then + echo "$0 hostname [hostname...]" + echo " hostname: which mystrom to connect to" + exit 1 +fi + +while [ $# -ge 1 ]; do + hostname=$1; shift + + http --json "http://${hostname}/report" + +done diff --git a/mystrom-temperature.sh b/mystrom-temperature.sh new file mode 100755 index 0000000..a51ed03 --- /dev/null +++ b/mystrom-temperature.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# 2020-12-07, Nico Schottelius + +if [ $# -lt 1 ]; then + echo "$0 hostname [hostname...]" + echo " hostname: which mystrom to connect to" + exit 1 +fi + +while [ $# -ge 1 ]; do + hostname=$1; shift + + http --json "http://${hostname}/temp" + +done