hi there
has anyone has any luck with the simple switch scripts in the wiki?
ive followed them as well as i can but when i run the on or off switch i get nothing
i get a blank screen and the script just gets stuck no output no new input line....
wemo switch in wiki
Moderator: leecollings
-
- Posts: 142
- Joined: Tuesday 24 January 2017 23:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Australia
- Contact:
wemo switch in wiki
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
-
- Posts: 142
- Joined: Tuesday 24 January 2017 23:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Australia
- Contact:
Re: wemo switch in wiki
ok so still stuck on this issue, neither the of the listed solutions work for me....using the simple script i was send i get a syntax at ip$=
and the other one with the complicated ouamux name doesnt seem to find my wemo devices..... i can control them form the wemo app, and directly, but the ouixmux or whatever its called cant find it...is there perhaps a firmware issues anyone is aware of?
and the other one with the complicated ouamux name doesnt seem to find my wemo devices..... i can control them form the wemo app, and directly, but the ouixmux or whatever its called cant find it...is there perhaps a firmware issues anyone is aware of?
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
-
- Posts: 142
- Joined: Tuesday 24 January 2017 23:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Australia
- Contact:
Re: wemo switch in wiki
is there any active community member using the current wiki wemo script?
if not im guessing that there may have developed a error in syntax with an update somewhere....
my guess would be either a python update has killed it or something inherent int the Raspian image doesnt like syntax of the script....
if not im guessing that there may have developed a error in syntax with an update somewhere....
my guess would be either a python update has killed it or something inherent int the Raspian image doesnt like syntax of the script....
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
Re: wemo switch in wiki
Hi,
same problem with the "light" Wemo scripts described in : https://www.domoticz.com/wiki/Wemo
Can't get them to work : they generate the following error :
"Error executing script command (/home/android/domoticz/scripts/wemo/wemo_off.sh). returned: 256"
Browsing the Internet I could not find anyone with a positive experience of those scripts...
Apparently this part of the wiki is not up to date, and we are left struggling with non operational scripts !
By the way I read somewhere that Python is no longer supported (?) - hence in the log during start-up, the well-known "Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform" even if Python 3.x is correctly installed.
same problem with the "light" Wemo scripts described in : https://www.domoticz.com/wiki/Wemo
Can't get them to work : they generate the following error :
"Error executing script command (/home/android/domoticz/scripts/wemo/wemo_off.sh). returned: 256"
Browsing the Internet I could not find anyone with a positive experience of those scripts...
Apparently this part of the wiki is not up to date, and we are left struggling with non operational scripts !
By the way I read somewhere that Python is no longer supported (?) - hence in the log during start-up, the well-known "Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform" even if Python 3.x is correctly installed.
Windows 10 fanless server 7 watts - Domoticz beta - Aeotec Gen5 Z-stick with FIBARO FGWPE wall plug - Xiaomi 6 item kit - Yeelight sunflower RGB - Synology DS209 +II - • Beelink GT1 Ultimate Android 7.1 S912 TV box
-
- Posts: 7
- Joined: Friday 29 September 2017 0:50
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: wemo switch in wiki
i'm using this script
Code: Select all
#!/bin/sh
#
# WeMo Control Script
#
# [email protected]
#
# Usage: ./wemo_control IP_ADDRESS ON/OFF/GETSTATE/GETSIGNALSTRENGTH/GETFRIENDLYNAME
#
#
IP=$1
COMMAND=$2
if [ "$2" = "" ]
then
echo "Usage: ./wemo_control IP_ADDRESS ON|OFF|GETSTATE"
else
PORT=0
for PTEST in 49152 49153 49154 49155
do
PORTTEST=$(curl -s -m 3 $IP:$PTEST | grep "404")
if [ "$PORTTEST" != "" ]
then
PORT=$PTEST
break
fi
done
if [ $PORT = 0 ]
then
echo "Cannot find a port"
exit
fi
if [ "$1" = "" ]
then
echo "Usage: ./wemo_control IP_ADDRESS ON|OFF"
else
echo "Port = "$PORT
if [ "$2" = "ON" ]
then
curl -0 -A '' -X POST -H 'Accept: ' -H 'Content-type: text/xml; charset="utf-8"' -H "SOAPACTION: \"urn:Belkin:service:basicevent:1#SetBinaryState\"" --data '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:SetBinaryState></s:Body></s:Envelope>' -s http://$IP:$PORT/upnp/control/basicevent1 |
grep "<BinaryState" | cut -d">" -f2 | cut -d "<" -f1
elif [ "$2" = "OFF" ]
then
curl -0 -A '' -X POST -H 'Accept: ' -H 'Content-type: text/xml; charset="utf-8"' -H "SOAPACTION: \"urn:Belkin:service:basicevent:1#SetBinaryState\"" --data '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>0</BinaryState></u:SetBinaryState></s:Body></s:Envelope>' -s http://$IP:$PORT/upnp/control/basicevent1 |
grep "<BinaryState" | cut -d">" -f2 | cut -d "<" -f1
elif [ "$2" = "GETSTATE" ]
then
curl -0 -A '' -X POST -H 'Accept: ' -H 'Content-type: text/xml; charset="utf-8"' -H "SOAPACTION: \"urn:Belkin:service:basicevent:1#GetBinaryState\"" --data '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope>' -s http://$IP:$PORT/upnp/control/basicevent1 |
grep "<BinaryState" | cut -d">" -f2 | cut -d "<" -f1 | sed 's/0/OFF/g' | sed 's/1/ON/g'
else
echo "COMMAND NOT RECOGNIZED"
echo ""
echo "Usage: ./wemo_control IP_ADDRESS ON|OFF|GETSTATE"
echo ""
fi
fi
fi
-
- Posts: 1
- Joined: Saturday 03 February 2018 20:13
- Target OS: Linux
- Domoticz version:
- Contact:
Re: wemo switch in wiki
Since no one ever came back to say what worked.. I just wanted to point out that changing the wemo_control.sh to the one that hbennis posted above fixed my issues. I was having the problem of command just stuck. No output or anything. I didn't go through the whole thing but it seems like some extra nonsense has been taken out of the script. Also, some other things that were left out of the wiki that some people may need help with:
in both wemo_on.sh and wemo_off.sh make sure you capitalize ON and OFF... they are lowercase in wiki
and
chmod +x wemo_control.sh or chmod 755 wemo_control.sh if you run into a permission denied error.
in both wemo_on.sh and wemo_off.sh make sure you capitalize ON and OFF... they are lowercase in wiki
and
chmod +x wemo_control.sh or chmod 755 wemo_control.sh if you run into a permission denied error.
Re: wemo switch in wiki
Works perfect for me. Just create a dummy switch and set the
On Action: script://wemo/wemo_control.sh 192.168.5.197 ON
Off Action: script://wemo/wemo_control.sh 192.168.5.197 OFF
So I don't know why you would want to create the additional scripts; wemo_on.sh wemo_off.sh...
On Action: script://wemo/wemo_control.sh 192.168.5.197 ON
Off Action: script://wemo/wemo_control.sh 192.168.5.197 OFF
So I don't know why you would want to create the additional scripts; wemo_on.sh wemo_off.sh...
Who is online
Users browsing this forum: No registered users and 1 guest