28-03-2017, 20:53:54
(Dieser Beitrag wurde zuletzt bearbeitet: 28-03-2017, 20:58:45 von MrIngenieur.)
Code:
if [ "$(curl --silent http://192.168.xxx.yyy:8080/rest/items/Variablen-Name/state)" = 'NULL' ]
then
echo "Reconnect ON"
curl --header "Content-Type: text/plain" --request POST --data "ON" http://192.168.xxx.yyy:8080/rest/items/Reconnect_Switch
sleep 5
echo "Reconnect OFF"
curl --header "Content-Type: text/plain" --request POST --data "OFF" http://192.168.xxx.yyy:8080/rest/items/Reconnect_Switch
fi