belkin wemo wlan lamps and wall switch

Building and connecting hardware to OpenNethome
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: belkin wemo wlan lamps and wall switch

Post by Nasty76 »

Nethome nice feature Value Logger , keeps log your power consumption.


Image'

Result when look movie Netflix :)

Image
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: belkin wemo wlan lamps and wall switch

Post by stefangsbb »

I am still working on the Wemo Items. Currently I am implementing support for the light bulbs and doing long time tests of the switches. I have noticed that it is quite often that sending messages to the devices fails. I am now experimenting with re-sending multiple times in case of failure.
crisman
Posts: 24
Joined: Sun Jan 25, 2015 3:04 pm

Re: belkin wemo wlan lamps and wall switch

Post by crisman »

stefangsbb wrote:I am still working on the Wemo Items. Currently I am implementing support for the light bulbs and doing long time tests of the switches. I have noticed that it is quite often that sending messages to the devices fails. I am now experimenting with re-sending multiple times in case of failure.
Why do you think it fails, I mean it should fail because you probably cannot see any action when the command is sent but have you consider that probably with could have a bad wireless connection between the device and the router?

I'm just curious on this, have you tried to use a network packet sniffer to see for example the traffic between the devices and your IOS Wemo App and if its possible to get some information about the commands that must being used?
I've seen other's trying to make some API's to connect with the Wemo devices and they said that were using packet sniffer to analyse all the traffic and help them make the code for the API's.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: belkin wemo wlan lamps and wall switch

Post by stefangsbb »

Well, I have the commands figured out. The problem seems to be that the devices does not answer (on IP connection level) sometimes. It might of course be problems with the WLAN, but they are located just 6 m from the router, so I doubt it is a signal problem really. I would guess it has to do with their WLAN stack or firmware, maybe it goes into some kind of sleep mode sometimes and answer very slow (or not at all). I will experiment with longer timeout times, but there is also a limit how long you want to wait to update the GUI for example - if I have a connection timeout of 5 seconds for example and there are multiple Wemo devices on a page, you may end up with unreasonable response times to load the page.
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: belkin wemo wlan lamps and wall switch

Post by Nasty76 »

wemo logger , nice to see new 48" tv with led save power allmoust 200 watts :D picture in start old tv consumption and rest is new tv installed my av rack.
Image

Btw , I get wemo error but module work nice every time , allways shutdown and powering on.
and I m sure my wlan not failing they are same room.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: belkin wemo wlan lamps and wall switch

Post by stefangsbb »

I have finished the implementation of the Wemo Items now. I added a few new extra features:

* It ignores errors when trying to read state
* It Retries 4 times when switching on/off if there are errors, and if it fails even after that it waits for 30 seconds and then tries again.
* It automatically rescans ip addresses of the Wemo devices every hour
* It automatically rescans ip addresses of the Wemo devices when it fails reading/writing to a device
* The UPnP-scanner is automatically created when the server is started

I have been a bit surprised over the fail rate when connecting to the devices. I don't know if my WLAN is very noisy, or if it is issues with the firmware in the Wemo devices. I have had to add a lot of retries and fail handling to get it to work reliably.

The products that are supported are:
* Wemo Switch
* Wemo Insight Switch
* Wemo Smart LED Bulb (Including Wemo Link)
crisman
Posts: 24
Joined: Sun Jan 25, 2015 3:04 pm

Re: belkin wemo wlan lamps and wall switch

Post by crisman »

Hi Stefangsbb,

Regarding the fail rate, how can we try this? I've no problems with mine connected to my wireless.
Yesterday I got new firmware for the Wemo devices have yours updated already? http://community.wemothat.com/t5/WEMO-H ... 9942#U9942
I've also a Wemo Sensor, Is it supported by this ?

Thanks.
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: belkin wemo wlan lamps and wall switch

Post by Nasty76 »

New update in nethome nightly and what i see wemo work without nethome errors.
I dont have updated new firmware. maybe i need again get some android phone to update wemo :D
shortbloke
Posts: 1
Joined: Tue Nov 03, 2015 1:44 pm

Re: belkin wemo wlan lamps and wall switch

Post by shortbloke »

Can anyone offer some step by step guide for setting this up? I stumbled over this project whilst looking for something to capture and graph my Belkin WeMo insight sockets.

I've downloaded and instaled OpenNetHome using the latest nightly on my Raspberry Pi2. When I open up the WebUI and select Create/Edit, I see WeMoInsightSwitch as an item, however if I go to add it, it wants to know the device URL and serial number, where do I get that information from? In the WeMo App, I can see a device ID, but no reference to a URL or serial number.

Reading back through to an earlier part of the thread it talks about using a UPnPScanner, if I try and select create one of those, throws the error below when I press save and activate:

Code: Select all

HTTP ERROR: 500

INTERNAL_SERVER_ERROR
RequestURI=/home

Caused by:

java.lang.NullPointerException
	at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocket.start(SSDPSearchResponseSocket.java:87)
	at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocketList.start(SSDPSearchResponseSocketList.java:129)
	at org.cybergarage.upnp.ControlPoint.start(ControlPoint.java:858)
	at org.cybergarage.upnp.ControlPoint.start(ControlPoint.java:894)
	at nu.nethome.home.items.UPnPScanner.activate(UPnPScanner.java:67)
	at nu.nethome.home.item.HomeItemAdapter.activate(HomeItemAdapter.java:70)
	at nu.nethome.home.impl.LocalHomeItemProxy.callAction(LocalHomeItemProxy.java:104)
	at nu.nethome.home.items.web.servergui.EditItemPage.updateAttributes(EditItemPage.java:611)
	at nu.nethome.home.items.web.servergui.EditItemPage.processAttributeUpdateAction(EditItemPage.java:278)
	at nu.nethome.home.items.web.servergui.EditItemPage.performActionsAndRedirect(EditItemPage.java:258)
	at nu.nethome.home.items.web.servergui.EditItemPage.printPage(EditItemPage.java:148)
	at nu.nethome.home.items.web.servergui.HomeGUI.service(HomeGUI.java:231)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
Powered by Jetty://
Any help someone can provide or point me at to help get started would be gratefully received.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: belkin wemo wlan lamps and wall switch

Post by stefangsbb »

The UPnPScanner is created automatically, so you do not have to create one yourself. When you go into the Create/Edit-page, you should after a while see a row popping up starting with "Belkin Wemo Insight Switch.." in the lower window. When you press "select event" on that row you will be given the option to create the Item, and then all parameters will be filled in for you.
Post Reply