Page 1 of 1

Unreliable on/off action with bash script

Posted: Friday 23 January 2015 12:55
by superczar
I created a basic script to control a wemo switch
Using a library , I can run the following on the command line and the switch works everytime

Code: Select all

$ wemo switch "Wemo Switch" on
I order to trigger this from a dummy switch, i created a script called say wemo_on.sh

Code: Select all

#!/bin/sh
wemo switch "Wemo Switch" on
and made it executable - when I run this from a ssh shell - ./wemo_on.sh , it works as expected

However, when I added the same to a dummy switch under on action , it does not work reliably
Sometimes it works but more often than not, it doesn't

It's a rather odd issue and the only possibility I can think of is that the actual command takes a long time (5-6 seconds) to execute and the on action times out by then
HHow can I fix this?

Re: Unreliable on/off action with bash script

Posted: Thursday 24 December 2015 20:29
by TomC
I have my script working while running it from a ssh shell but how do you add it to your dummy switch?