#!/bin/bash 
# Author: Helle
# Version 0.1

result=$(curl http://xxx.xxx.xxx.xxx:1400/status/perf |grep currently | awk '{print $2}')
if [ "$result" = "PLAYING" ]; then
curl "https://my.zipato.com/zipato-web/remoting/attribute/XXXXXXstate=true"
elif [ "$result" = "STOPPED" ]; then
curl "https://my.zipato.com/zipato-web/remoting/attribute/XXXXXXstate=false"
else
  echo "Sonos nicht verbunden"
  exit 1
fi
