03-11-2015 01:36 PM - edited 03-13-2015 06:43 AM
I've played with this in the past but this newer version of script seems to work with even the Maker.
Use this new script in comments at the bottom by Jack Lawry.
You have the following commands available to you:
For a Maker in momentary switch mode just send the ON command. I notice my Holmes filters won't respond to ON or OFF but other commands works.
The beta firmware that I am testing doesn't work with Ouimeaux on the Wemo switches. It works fine with light switches. This is a nice option for remote site control.
03-11-2015 01:47 PM - edited 03-11-2015 01:58 PM
Running this as a shell script one could use for timer based functions when setup as a scheduled cron job. I am running this off of a Raspberry Pi and building a basic web page to drive it.
03-11-2015 04:06 PM
An easier way to schedule scripts on the Mac side of the house anyway is via the Calendar app if you don't want to use something like Cron or launchd
03-11-2015 05:14 PM - edited 03-11-2015 05:21 PM
On OS X: I haven't done this yet but one could also utilize an Applescript that calls a shell script based on a rule from OS X Mail. I would probably dedicate a specialized email account for this purpose though.
I have built some shell scripts to turn everything on or off....but easy enough to do individually as well.
03-12-2015 06:56 PM
03-13-2015 06:47 AM
03-13-2015 02:39 PM
07-18-2015 12:53 PM - edited 07-18-2015 01:23 PM
Someone posted a new version that supports Wemo LEDs as well.
Make sure you have wget installed on your system. It won't work fully without it.
Usage: wemo IP_ADDRESS[ORT] ON|OFF|TOGGLE|GETSTATE|GETSIGNALSTRENGTH|GETFRIENDLYNAME
or: wemo IP_ADDRESS[ORT] LINK [LIST|NAME ON [0-255]|OFF|TOGGLE|GETSTATE]
./wemo_control_LED.sh IP_of_Link LINK 'bulb_name' OFF
./wemo_control_LED.sh IP_of_Link LINK 'bulbname' ON
./wemo_control_LED.sh IP_of_Link LINK LIST
./wemo_control_LED.sh IP_of_Link LINK ON 0-255
My grouped bulbs don't seem to work but individual control functions.
09-12-2015 01:51 AM - edited 09-12-2015 02:03 AM
Since two days I'm experimenting with command line tools to turn on and off my 9 WeMo Devices.
This script seems to be the most advanced, because it has TOGGLE and LINK LED-Ability (and other commands) included. (and is fast with adressing as far as i can say. Also addresses all ports)
(I found another script, dated 08/2015 with find command and only addressing different ports (hardcoeded). Find (all IP devices) Command seems a good idea, but won't work on mac unless you install nmap.)
I used Apple Script Editor with following command and exported it to an app, which i can click as a button on my desk/dock, or autostart, etc.:
do shell script "sh /Users/myusername/wemo_control.sh 10.0.1.xx TOGGLE"
Change "myusername" or change path to your script and change 10.0.1.xx to your WeMo's IP Address.
So above script works great for me.
12-12-2015 07:45 AM - edited 12-12-2015 07:59 AM
I'm using these scripts running off of a Rapsbery Pi as a backup connection for my Wemos.
Automagic is so usefull as I can send the phone a text message and have it execute the shell command on the Pi from the phone. This would also be useful for someone who has cell coverage and no internet but also wants remote automation control. The product has such a wide array of capabilities... too much to go into here.
Granted you only get 30 text messages with this $3 plan but is about the cheapest option for a remote backdoor I could find. Additional messages are $.10 but far cheaper than other travel options to address a remote outage.
EDIT: If Android rooted phone can execute script directly one less thing you have to run instead of the Pi. I have limited Android experience so not sure if that is possible or not.