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!