Release - WeMo Light Switch

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
kojak40 Offline
Junior Member
Posts: 5
Joined: Dec 2014
Reputation: 0
Location: Michigan
Post: #16
I have the new WeMo light bulbs with the WeMo Bridge. The lights can be dimmed but they don't work the same as the other WeMo devices. The Bridge plugs in and does the communication to control the light bulbs. My question is do you know why the plugin won't work with the light bulbs or bridge. I have tried entering the name of the WeMo device as WeMo bridge but it will won't work. Says it can't find the WeMo Device. Would you know how to make this work as in what type of edits need to be made to the addon?
find quote
Sylv Offline
Junior Member
Posts: 10
Joined: Jul 2014
Reputation: 0
Post: #17
(2014-12-07 15:42)kojak40 Wrote:  I have the new WeMo light bulbs with the WeMo Bridge. The lights can be dimmed but they don't work the same as the other WeMo devices. The Bridge plugs in and does the communication to control the light bulbs. My question is do you know why the plugin won't work with the light bulbs or bridge. I have tried entering the name of the WeMo device as WeMo bridge but it will won't work. Says it can't find the WeMo Device. Would you know how to make this work as in what type of edits need to be made to the addon?

Hi kojak40,
This add-on is based on ouimeaux (https://github.com/iancmcc/ouimeaux) to control WeMo devices. Unfortunately these new WeMo devices are not yet supported by ouimeaux. However, they are already working on it (https://github.com/iancmcc/ouimeaux/issues/51 ). I'll update this add-on once ouimeaux supports these new devices.
(This post was last modified: 2015-03-08 06:23 by Sylv.)
find quote
Treads6465 Offline
Junior Member
Posts: 1
Joined: Jan 2015
Reputation: 0
Post: #18
Hello people.

I searched the web and found this post.
YAY! Someone is doing what I want.....OH BOO, they are doing it on a windows machine and not an android....
With that said I enlisted the help of a good friend skilled at programming and we developed a version of this for android. I specifically wanted it because I have an Ouya as my Kodi box.

So, if you have android, kodi, and a wemo light switch....this is a nice tool for you:
WEMO CONTROL FOR ANDROID

It functions the same as the original post. It allows you to point your kodi box at the ip of the wemo light switch and then functions as the original describes.

For those of you with a setup similar to mine...enjoy!!

BTW, this shows up under add-ons, services. Point it at the internal (192.168.1.XXX) of your wemo light switch.
It took 22 revisions in testing but it now should work. If anyone wants more functionality, let me know.

Next...I add a wemo outlet and a popcorn machine....movie starts, fresh popcorn Smile
(This post was last modified: 2015-01-27 06:47 by Treads6465.)
find quote
Sylv Offline
Junior Member
Posts: 10
Joined: Jul 2014
Reputation: 0
Post: #19
(2015-01-27 06:40)Treads6465 Wrote:  Hello people.

I searched the web and found this post.
YAY! Someone is doing what I want.....OH BOO, they are doing it on a windows machine and not an android....
With that said I enlisted the help of a good friend skilled at programming and we developed a version of this for android. I specifically wanted it because I have an Ouya as my Kodi box.

So, if you have android, kodi, and a wemo light switch....this is a nice tool for you:
WEMO CONTROL FOR ANDROID

It functions the same as the original post. It allows you to point your kodi box at the ip of the wemo light switch and then functions as the original describes.

For those of you with a setup similar to mine...enjoy!!

BTW, this shows up under add-ons, services. Point it at the internal (192.168.1.XXX) of your wemo light switch.
It took 22 revisions in testing but it now should work. If anyone wants more functionality, let me know.

Next...I add a wemo outlet and a popcorn machine....movie starts, fresh popcorn Smile

Nice job! I've added it to the main post.

I also tried it on my Windows XBMC, but it seems a dependency problem occurred: "No module named IN". Looks like the miranda.py doesn't work under Windows.
find quote
midnight426 Offline
Junior Member
Posts: 2
Joined: Jan 2015
Reputation: 0
Post: #20
(2015-01-27 10:13)Sylv Wrote:  I also tried it on my Windows XBMC, but it seems a dependency problem occurred: "No module named IN". Looks like the miranda.py doesn't work under Windows.

Indeed! MidnightLightning here (KODI forums won't let me have a username that long...); I took a look and the current way I structured the plugin doesn't use the portion of Miranda that requires the IN module. So, I've modified the plugin so that it should function without the IN module. Could you, or someone else with a Windows KODI installation, give this version a try and see if it works? service.wemo.lightswitch-1.0.1.zip
find quote
Sylv Offline
Junior Member
Posts: 10
Joined: Jul 2014
Reputation: 0
Post: #21
(2015-01-27 17:03)midnight426 Wrote:  Indeed! MidnightLightning here (KODI forums won't let me have a username that long...); I took a look and the current way I structured the plugin doesn't use the portion of Miranda that requires the IN module. So, I've modified the plugin so that it should function without the IN module. Could you, or someone else with a Windows KODI installation, give this version a try and see if it works? service.wemo.lightswitch-1.0.1.zip

Something else happened:
Code:
Miranda: Error updating command completer structure; some command completion features might not work...

-->Python callback/script returned the following error<--
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 192, in <module>
    toggle()
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 107, in toggle
    is_on = get()
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 79, in get
    resp = _send('GetBinaryState')
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 54, in _send
    host_info = conn.ENUM_HOSTS[SWITCHES[0]]
IndexError: list index out of range
-->End of Python script error report<--

I know, man, Windows compatibility is a pain Sad. I mainly use Mac, so I did spend some time trying to build right dependencies on Windows for my add-on.
Anyway, your work is great. Thanks. Smile
find quote
midnight426 Offline
Junior Member
Posts: 2
Joined: Jan 2015
Reputation: 0
Post: #22
(2015-01-27 21:50)Sylv Wrote:  Something else happened:
Code:
Miranda: Error updating command completer structure; some command completion features might not work...

-->Python callback/script returned the following error<--
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 192, in <module>
    toggle()
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 107, in toggle
    is_on = get()
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 79, in get
    resp = _send('GetBinaryState')
  File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\service.wemo.lightswitch\default.py", line 54, in _send
    host_info = conn.ENUM_HOSTS[SWITCHES[0]]
IndexError: list index out of range
-->End of Python script error report<--

I know, man, Windows compatibility is a pain Sad. I mainly use Mac, so I did spend some time trying to build right dependencies on Windows for my add-on.
Anyway, your work is great. Thanks. Smile

That looks like your WeMo ended up not on the default port, so wasn't able to be seen by the XBMC device. I'll put in some protection to more gracefully fail out if it can't find the WeMo device on that port, but if you try rebooting the WeMo, it might go back to the default and be able to be seen then.
find quote
MikeMPP Offline
Junior Member
Posts: 1
Joined: Mar 2015
Reputation: 0
Post: #23
Hi all - I'm the author of some Wemo apps available on Google Play (WemoManager, WemoHome, and WemoLEDs). My developer page is here: MPP App Suite

I was asked whether my apps could be used with a plug-in to control the wemo's as well. In particular to control the LEDs as they're already supported.

My apps (the WemoServer piece) expose automation hooks via HTTP (REST - POST/PUT/GET) when running on android/windows/Linux/ios. On android they can also be controlled using standard android intents. As the plugin here can use ouimeaux to contact the wemo's directly, a similar plugin could call out to WemoServer to set the wemo's, trigger it's rule engine, or using intents control the LEDs through WemoLEDs using it's presets.

If there's anyone working on this that also has my app and would like to get it working I'd be happy to help get it sorted. We could work through this forum or I can be contacted directly from my developers page.

Sorry to hijack this thread, I wasn't sure where to start - let me know if it's more appropriate to start a new thread.
find quote
sm1ddy Offline
Junior Member
Posts: 3
Joined: Feb 2015
Reputation: 0
Post: #24
Hi Guys

I have the WEMO Led Bulbs working with my Kodi media box, basically I use the following:
https://ouimeaux.readthedocs.org/en/latest/
http://www.ntwind.com/software/hstart.html
http://hotkeyz.en.softonic.com/

1. Based on the ouimeaux instructions, create a few .bat files to control light configurations (I have one for bright, dim and off).
2. Create shortcuts using hstart and the bat files so you can silently trigger light changes.
3. Use hotkeyz to map the shortcuts to your remote control.

Technically it's not integrated with Kodi but I prefer the manual control over automation which can be annoying when not wanted.
The only downside is that Kodi loses focus when a light change is triggered but I have a mouse click hotkey so it takes focus back afterwards.
(This post was last modified: 2015-04-26 16:36 by sm1ddy.)
find quote
kojak40 Offline
Junior Member
Posts: 5
Joined: Dec 2014
Reputation: 0
Location: Michigan
Post: #25
Is there anyway you can do a video tutorial on how to do this?
find quote
sm1ddy Offline
Junior Member
Posts: 3
Joined: Feb 2015
Reputation: 0
Post: #26
My apologies for the slow response, I have been busy and haven't had the chance to make a video yet. I'll give it a thought though. Smile

Another thing of interest, the WEMO LED Bulbs now support IFTTT rules:
https://ifttt.com/recipes/search?q=Wemo+...g&ac=false
(This post was last modified: 2015-05-09 14:56 by sm1ddy.)
find quote
Post Reply