Release - WeMo Light Switch

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
kojak40 Offline
Junior Member
Posts: 1
Joined: Dec 2014
Reputation: 0
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.
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
Post Reply