[mystrom] add supporting scripts

This commit is contained in:
Nico Schottelius 2020-12-07 13:47:34 +01:00
parent b038bcfee7
commit a2894395ac
4 changed files with 48 additions and 1 deletions

17
mystrom-off.sh Executable file
View File

@ -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

View File

@ -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

15
mystrom-status.sh Executable file
View File

@ -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

15
mystrom-temperature.sh Executable file
View File

@ -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