Belkin WeMo plugin

Hello

Your driver work very well. I have many wemo light switch. I connot control them with my vera lite. Do you when you will add this feature?

thx

They aren’t for sale in my part of the world. That leaves two options:

One is for you or someone else to get the complete UPnP description of the device by doing some network probing and/or sniffing. This is quite technical and if you don’t already know how to do it, or can’t figure it out by googling, then it really isn’t an option.

Two is for you or someone else to post me one. I’m not sure if the switches are fit for the 240 V we use in Australia but I have a voltage converter so I shouldn’t accidentally fry it.

Hi futzle

It Will be my pleasure to send you one as gift for testing and write a new driver. Just send me your adress in pv. I Will send it this week.

Jeff

Thanks for the offer. I sent you my postal address in a direct message.

here is the setup.xml

<root xmlns="urn:Belkin:device-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <device> <deviceType>urn:Belkin:device:lightswitch:1</deviceType> <friendlyName>Pool Door</friendlyName> <manufacturer>Belkin International Inc.</manufacturer> <manufacturerURL>http://www.belkin.com</manufacturerURL> <modelDescription>Belkin Plugin Socket 1.0</modelDescription> <modelName>LightSwitch</modelName> <modelNumber>1.0</modelNumber> <modelURL>http://www.belkin.com/plugin/</modelURL> <serialNumber>hidden</serialNumber> <UDN>uuid:Lightswitch-1_0-221319K130064C</UDN> <UPC>123456789</UPC> <iconList> <icon> <mimetype>jpg</mimetype> <width>100</width> <height>100</height> <depth>100</depth> <url>icon.jpg</url> </icon> </iconList> <serviceList> <service> <serviceType>urn:Belkin:service:WiFiSetup:1</serviceType> <serviceId>urn:Belkin:serviceId:WiFiSetup1</serviceId> <controlURL>/upnp/control/WiFiSetup1</controlURL> <eventSubURL>/upnp/event/WiFiSetup1</eventSubURL> <SCPDURL>/setupservice.xml</SCPDURL> </service> <service> <serviceType>urn:Belkin:service:timesync:1</serviceType> <serviceId>urn:Belkin:serviceId:timesync1</serviceId> <controlURL>/upnp/control/timesync1</controlURL> <eventSubURL>/upnp/event/timesync1</eventSubURL> <SCPDURL>/timesyncservice.xml</SCPDURL> </service> <service> <serviceType>urn:Belkin:service:basicevent:1</serviceType> <serviceId>urn:Belkin:serviceId:basicevent1</serviceId> <controlURL>/upnp/control/basicevent1</controlURL> <eventSubURL>/upnp/event/basicevent1</eventSubURL> <SCPDURL>/eventservice.xml</SCPDURL> </service> <service> <serviceType>urn:Belkin:service:firmwareupdate:1</serviceType> <serviceId>urn:Belkin:serviceId:firmwareupdate1</serviceId> <controlURL>/upnp/control/firmwareupdate1</controlURL> <eventSubURL>/upnp/event/firmwareupdate1</eventSubURL> <SCPDURL>/firmwareupdate.xml</SCPDURL> </service> <service> <serviceType>urn:Belkin:service:rules:1</serviceType> <serviceId>urn:Belkin:serviceId:rules1</serviceId> <controlURL>/upnp/control/rules1</controlURL> <eventSubURL>/upnp/event/rules1</eventSubURL> <SCPDURL>/rulesservice.xml</SCPDURL> </service> <service> <serviceType>urn:Belkin:service:metainfo:1</serviceType> <serviceId>urn:Belkin:serviceId:metainfo1</serviceId> <controlURL>/upnp/control/metainfo1</controlURL> <eventSubURL>/upnp/event/metainfo1</eventSubURL> <SCPDURL>/metainfoservice.xml</SCPDURL> </service> <service> <serviceType>urn:Belkin:service:remoteaccess:1</serviceType> <serviceId>urn:Belkin:serviceId:remoteaccess1</serviceId> <controlURL>/upnp/control/remoteaccess1</controlURL> <eventSubURL>/upnp/event/remoteaccess1</eventSubURL> <SCPDURL>/remoteaccess.xml</SCPDURL> </service> </serviceList> <presentationURL>/pluginpres.html</presentationURL> </device> </root>

I changed the serial, if you need it pm me.

Thanks, that might be enough to add support. Seems that Belkin changed the device type (perhaps so that their own app knows to display a different icon). I will study the XML this weekend and update the plugin to recognize the new device type string.

Edit: Now just waiting for apps.mios.com to come back up so that I can upload the new version. Adventurous users can fetch the files directly from / – Belkin WeMo (just the L_WeMo1.lua and J_WeMo1.js files have changed) and transfer them to their Vera. The plugin doesn’t distinguish light switches from appliance switches, a long tradition in MiOS which I don’t feel I should violate.

Yes the icon is different. I will be getting my veralite this week, so if you need any assistance testing, let me know.

Version 8 has been submitted to apps.mios.com, where it awaits approval by MCV. This version should recognize the WeMo Wall Switch.

IT works!

That said I am occasionally having issues after adding wemo’s or cameras. Seems like I had to reload a few times to clear the lua error. I have quite a few demo switches so I suspect discovery took a bit long and caused a timeout.

Scalability is something I’d like to get some feedback on. How many is “quite a few”? Personally I have just three WeMo devices (which are not even plugged in; I’m only maintaining this plugin for you guys now). At AUD 60 a pop I’m not going to be buying a ton of them.

Discovery is going to be unavoidably slow partly because of the way UPnP works. That’s why I give users the option to assign their WeMo devices static IP addresses in their Wi-Fi router, meaning that users can turn off discovery in the plugin once they’ve added (“Add Static”) all their devices. See if it helps in your case.

I'm only maintaining this plugin for you guys now
Thanks for this gesture, this is an awesome plugging!!!!

I have 14 modules. It appeared to work for about a day, then I started getting random lua errors, and today all were errored. I am going to reinstall and try static…

Thanks for the tip on manual! I think I finally have it stable now.

I currently have a Time Capsule from Apple that acts as my router, I am using a combination of Airports to “Extend” my network (nope that wasn’t where the problem was!)

What was happening, is DHCP was not renewing with the same IP’s for reasons unknown to me. The hardest part with the new “App” for the airport is finding out which switch was which. Once I had a list of mac addresses, I set static reservations in the Timecapsule and all appears to be well.

I do notice that if I have to do a reload, sometimes I will have to reload again as I will get a Lua load failure.

If you want logs let me know, but at this point I think I have a fairly stable setup with 14 wemo’s (mix of lightswitch and modules)

Following DHCP allocations as they change is one large to-do item that I need to finish for this plugin. DHCP servers are perfectly entitled to ignore the hint in the renewal request for the same address. Either that’s what’s happening, or the WeMos are skipping renewal and asking for a new address each time.

I also noticed that there is no MAC address printed on each WeMo anywhere. Bad Belkin.

If you want logs let me know, but at this point I think I have a fairly stable setup with 14 wemo's (mix of lightswitch and modules)

All logs are welcome. Post them here or send me a direct message.

Hi futzle - is this one still on the back burner?

http://forum.micasaverde.com/index.php/topic,14508.msg113180.html#msg113180

Haven’t touched it I’m afraid. I’m still not even sure how to approach debugging it.

A bit pre-emptive, but so you know…

Belkin is releasing a power-metering version of their WeMo plug (“Insight”) in November. If it uses the same UPnP protocol underneath that the other switches and sensors do, it should be possible for this plugin to support it, and report the power being used alongside the switch status.

Probably Belkin will take its sweet time releasing the WeMo Insight in my part of the world. If anyone feels like being an early adopter and can dump the UPnP description XML like this I can try and make a head start on implementing it.

I had the wemo plugin working fine with a light switch, motion and appliance plug. Had to set ip address manually. Now i keep getting “Belkin WeMo[29] : Startup Lua Failed”. I can see the devices within my veralite running 1.5.622 firmware. Tried deleting uPnp and wemo plugin’s and readding, but that didnt seem to work. when i get home i will run debug mode and upload the log

any suggestions to try?

Do you have dynamic IP’s? You have to put an IP reservation in your router to make sure the switch keeps the same ip.

i checked dhcp list and i have a forever lease to maintain the same ip address. ip address has not changed

attached is the log file. looks like some sort of LEAK

i have three wemo devices 192.168.2.49
192.168.2.45
192.168.2.13