wemo.py
contains a simple Python class for the Belkin WeMo device. It uses Miranda for UPnP.
wemo.py
- The main class, supports turning the outlet on/off as well as changing the device's name. Runningpython wemo.py
lists WeMos on the network along with theirbinaryState
(on/off).miranda.py
- A slightly modified version of the miranda client.
$ python
>>> from wemo import *
>>>
>>> wemos = search()
>>> for wemo in wemos:
... print wemo.binaryState, "\t", wemo.friendlyName
...
True Master Bedroom
False Kitchen
True Staircase
>>>
>>> w = wemos[0]
>>> w.binaryState = False
>>> w.binaryState = True
>>> w.binaryState = not w.binaryState
>>>