Wemo compatibility

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Wemo compatibility

Post by krizzz »

Dropshot wrote:Hi Krizzz,

Thank you for this tutorial, although I don't seem to get this working. When I do the sudo easy_install ouimeaux, i get the following message: error: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

What am I doing wrong here? I've added the log.
Yesterday for my "testing" Domoticzpi I downloaded a fresh install of Jessie Lite and compiled Domoticz. So I have a new blank canvas. I noticed when doing the

Code: Select all

sudo easy_install ouimeaux
it did not work because of course the easy_install program is not installed by default on jessie Lite raspian.

First we need to compile python which will be used for Ouimeaux and is not standard in the Jessie Lite build i am using. So do

Code: Select all

sudo apt-get install python-dev
and it will install the program.

Then the command

Code: Select all

sudo apt-get install python-setuptools
which downloads a few tools including easy_install. If you then do the command

Code: Select all

sudo easy_install ouimeaux
it will install Ouimeaux normally.

Your specific error code i did not recognise and googling a little bit it seemed to have something to do with the way PIP has been installed somewhere along the line. I am not suite sure how to fix this for you. Try the commands you see above and let us know if this did anything for you.
Dropshot
Posts: 44
Joined: Tuesday 20 December 2016 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Wemo compatibility

Post by Dropshot »

Hi Krizzz,

Again, thank you for your reply. I've tried these commands this weekend, but I still get the same error message. I'm still not sure what I'm doing wrong..
burton666
Posts: 85
Joined: Monday 17 August 2015 21:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Wemo compatibility

Post by burton666 »

I has been a while since I set up my wemos but for me the
ouimeaux-method worked but was really slow to turn bulbs on/off. It took like 3-5 secs for the bulbs to react and my wife would have flicked the switch like 5 times before it started reacting.

wemo_control.sh reaktion time is < 1sec so almost instantly, much better.
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Wemo compatibility

Post by krizzz »

Seem to have some issues today....connection keeps being refused (111)


Verzonden vanaf mijn iPhone met Tapatalk
Dropshot
Posts: 44
Joined: Tuesday 20 December 2016 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Wemo compatibility

Post by Dropshot »

burton666 wrote: wemo_control.sh reaktion time is < 1sec so almost instantly, much better.
@burton666,
Is this another method? If so, how did you install it? Maybe this offers a solution for me as well.
burton666
Posts: 85
Joined: Monday 17 August 2015 21:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Wemo compatibility

Post by burton666 »

Dropshot wrote:
burton666 wrote: wemo_control.sh reaktion time is < 1sec so almost instantly, much better.
@burton666,
Is this another method? If so, how did you install it? Maybe this offers a solution for me as well.
https://github.com/mississaugalug/bash/ ... control.sh
I think this is also in the domoticz wiki but I am not sure as the first version of the script only allowed the wemo switches to be controled, later on some great people modified it to also support the wemo bulbs.

The usage if I remember correctly is like:

./wemo_control.sh <Wemo-link-IP> link LIST -to view all devices
./wemo_control.sh <Wemo-link-IP> LINK Livingroom ON/OFF/TOGGLE
./wemo_control.sh <Wemo-link-IP> LINK Livingroom ON 120 -to dim to a level between 0-255
andi216
Posts: 46
Joined: Tuesday 14 March 2017 13:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Wemo compatibility

Post by andi216 »

I use wemo_control.sh.
The (wemo domoticz device) does not know if their status manually operated outlet.
Someone helped me with the following script (wemo_status.py).
Download " https://www.dropbox.com/sh/zpl7csarik68 ... gsD5a?dl=0 "

Add this script in /home/pi/domoticz/scripts/wemo/wemo_status.py
For each outlet must create a script .. .... in my case I have only one outlet called wemo.
Edit the following lines in wemo_status.py


# change ip
state_cmd = "/ home / pi / domoticz / scripts / wemo / wemo_control.sh 192.168.0.7 GETSTATE '
.
.
.
# Change the outlet name
# File = open ( "wemo_status.txt", "r")
.
.
.
# Change ip and IDX
curl1_cmd = "curl" http://192.168.0.119:8080/json.htm?type ... itchcmd=On ''
.
.
.
# Change ip and IDX
curl2_cmd = "curl" http://192.168.0.119:8080/json.htm?type ... tchcmd=Off ''
.
.
.
# Refresh status .... in my case 15 seconds
time.sleep (15)




To automatically start script
sudo nano /etc/rc.local
 and add

sudo python /home/pi/domoticz/scripts/wemo/wemo_status.py &
exit 0

then
sudo reboot

work well.

Excuse my English .... do not know if they understand very well what I explained.
If someone can explain better I'll delete this post.
Dropshot
Posts: 44
Joined: Tuesday 20 December 2016 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Wemo compatibility

Post by Dropshot »

I still don't get anything working.. :(

I've installed the .sh and created the scripts.

Code: Select all

pi@raspberrypi:~/domoticz/scripts/wemo $ ls
wemo_control.sh  
wemo_off.sh  
wemo_on.sh
But when I try to use them, I always get this error message:

Code: Select all

-bash: wemo_control: command not found
Any suggestions?
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Wemo compatibility

Post by krizzz »

What is the command you use to try and get the script working?


Verzonden vanaf mijn iPhone met Tapatalk
Dropshot
Posts: 44
Joined: Tuesday 20 December 2016 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Wemo compatibility

Post by Dropshot »

I have tried the following command:

Code: Select all

wemo_control 192.168.2.16 ON
I didn't use a trigger in Domoticz yet.
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Wemo compatibility

Post by markjgabb »

hi guys ive been trying to get the wemo_control script working as well but i get the following error

File "/home/pi/domoticz/scripts/wemo/wemo_control.sh", line 21
if [[ $# -ne 2 ]] ; then
^
SyntaxError: invalid syntax

im using the github script as listed above, but i have no idea how my syntax could be wrong. im physically coping it perfectly, ive tried many programs and many versions of copy as well as directly as per the wiki i get the same issue evey time....

if anyone could give me tips on how to fix this it would be much appreciated...i dont understand python very well
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
osiris1337
Posts: 3
Joined: Thursday 04 January 2018 10:08
Target OS: Linux
Domoticz version:
Contact:

Re: Wemo compatibility

Post by osiris1337 »

Hi guys,

I know this is an old post but it's still one of the first when googling "Domoticz wemo" so maybe this can help some other users:
Yesterday I managed to get my WEMO-maker working (opens & closes my garage) and wanted to share how, since I came across some of the issues like the "wemo_control: command not found" - error mentioned a few posts above.

For the most part, I used the WIKI: https://www.domoticz.com/wiki/Wemo
However, I used the script on GitHub, listed earlier in this thread: https://github.com/mississaugalug/bash/ ... control.sh

The problems I ran into:

1. wemo-control: command not found:
I found the paths to folders and files in the wiki to be a bit off..
The instruction is to create a 'wemo' folder for all your wemo-scripts, as follows:

Code: Select all

mkdir /home/pi/domoticz/scripts/wemo
So far so good.
However, the instruction is to then add the following line in the on(and off) script:

Code: Select all

#!/bin/sh
/home/pi/domoticz/scripts/wemo_control YOUR_SWITCH_IP ON
This is where I noticed it went wrong. After some experimenting I found the script fails for 2 reasons: it doesn't point to the /wemo folder. And the .sh behind wemo_control is missing. Use this to get rid of the error:

Code: Select all

#!/bin/sh
/home/pi/domoticz/scripts/wemo/wemo_control.sh YOUR_SWITCH_IP ON
2. invalid argument
Few, no more "command not found"-error. But the script now threw an invalid argument-error. Looking at the code, it looked like the switch-case in wemo-control.sh takes a lowercase 'on' or 'off'.
So further changing the script to:

Code: Select all

#!/bin/sh
/home/pi/domoticz/scripts/wemo_control YOUR_SWITCH_IP on   #(or off in case of the off script)
And boom! Ran the script, my door opened.

3. Specific WEMO-maker stuff?
I need to do some more testing but it seems like the Wemo maker, wich for me is set in momentary relay-mode, doesn't respond well to the off-command. Using the off command seems to break it until I reboot it.
Considering it's a momentary relay, this makes sense I guess. It's never really on or off, it just briefly sends a signal..
Just using the 'on'-script however, it works every time. Btw, early tests seem to be quite a bit faster then the wemo-app and WAY faster than my NFC tags using IFTTT..

If anyone figures out how to get the data form my door-sensor connected to the Wemo, let me know! If I have some more time in the coming weeks and find out myself, I'll update this post!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest