Unreliable on/off action with bash script

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
superczar
Posts: 65
Joined: Wednesday 14 January 2015 12:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: India
Contact:

Unreliable on/off action with bash script

Post 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?
TomC
Posts: 3
Joined: Thursday 24 December 2015 19:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unreliable on/off action with bash script

Post by TomC »

I have my script working while running it from a ssh shell but how do you add it to your dummy switch?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest