I managed to build this add-on for XBMC to control my Belkin WeMo Light Switch. (Thanks to ouimeaux)
It will automatically turn the lights off when a video starts playing, and turn them back on when playback is paused or completed. Also you can map a keyboard key to toggle the lights on/off.
This is my first XBMC add-on, and it may have imperfections, but it works for me.
- Only works on Windows
It might be able to work on OS X and Linux, but you have to solve some dependencies problems.
- WeMo Smart LED Bulbs / WeMo Link are not yet supported
Currently, this add-on can work with WeMo Switch, WeMo Insight Switch and WeMo Light Switch.
- You need to have a Belkin WeMo device (WeMo Switch, Light Switch, Insight Switch). And make sure it can control your lights remotely.
- In order to use your keyboard (or other remotes) to control the WeMo Switch, you need to edit the keyboard.xml file in the XBMC userdata/keymaps folder.
Add one line "<l>Skin.SetString(wemo, True)</l>" to the keyboard.xml file like below. You can change the trigger key from "L" to whatever you want.
- Download the add-on as a ZIP file. Open XBMC and go to: System -> Settings -> Add-ons -> Install from zip file.
- Wait for the settings dialog to pop up. Enter the name of your WeMo Switch device (you can find it from the WeMo app).
- If it can successfully find your WeMo device on the local network, then it should work.
- Added: an option to disable turning on the lights during a period of time
- Fixed: XBMC hangs on exit
- Added: the ability to turn the lights on when playback pauses and turn them off when playback resumes
- Added: options to enable/disable switchings
- Added: Gotham support
- Fixed: missing dependency "Requests"
- Initial version