I’m using a shell script to control a Belkin Wemo (WiFi) Switch. Everything is working fine by using a shellswitch as a device in pimatic. But sometimes the switch is loosing the wifi connection and the getstatecommand of the shellswitch can’t be executed without an error.
2017-02-09 08:52:09error [pimatic-shell-execute,ShellSwitch]: Error getting attribute value WEMO_Switch.state: undefined
Is there a possiblity to handle the error within the shell script? Perhaps by an exit state? Right now I’m just using the output of the script.
echo $(/home/pi/Scripte/WEMO.sh 192.168.xxx.xxx GETSTATE)