Author Topic: Belkin WeMo plugin  (Read 85007 times)

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin released
« Reply #15 on: April 25, 2013, 10:50:41 pm »
Do you know how long will it take to appear version 4 in the App Store as its still showing v 3.0?

It's out of my hands. Someone at MCV has to press the "approve" button. It normally happens during business hours, US time. I seldom have to wait more than a day.

Edit: you can always fetch the version 4 files from code.mios.com here: http://code.mios.com/trac/mios_belkin-wemo/browser (only two files changed, the ones with Rev=4). Send them to Vera through Apps > Develop Apps > Luup files.
« Last Edit: April 25, 2013, 10:53:16 pm by futzle »

Offline LH

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-1
Re: Belkin WeMo plugin released
« Reply #16 on: April 27, 2013, 08:44:48 pm »
Futzle,

Great work on this plug-in.

I downloaded v3 from the store and manually updated those two files to bring me up to v4. Sadly I am getting "Belkin wemo startup Lua failed" error message and  therefore it cannot locate my WeMo.

Happy to send you any logs etc. if you can tell me how to retrieve them from my Vera Lite.


Offline petequintanilla

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +0/-0
Re: Belkin WeMo plugin released
« Reply #17 on: April 27, 2013, 08:52:02 pm »
Futzle,

Great work on this plug-in.

I downloaded v3 from the store and manually updated those two files to bring me up to v4. Sadly I am getting "Belkin wemo startup Lua failed" error message and  therefore it cannot locate my WeMo.

Happy to send you any logs etc. if you can tell me how to retrieve them from my Vera Lite.

ive done exact thing and getting same error, i had been able to manual add wemos but still having start up error.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin released
« Reply #18 on: April 27, 2013, 09:17:24 pm »
LH, petequintanilla:

One of the joys of supporting UPnP is that there are so, so many bad implementations of it out there.  Both of you appear to have such a device on your network, not the WeMos but something else.  In this case, the device is responding to discovery with a badly-formed USN header.  My parsing code needs to be made more bulletproof.  I'm doing that now, being a lot more paranoid about the responses that the plugin is getting back from the LAN.

As a workaround, the Lua Failed code is in the discovery section.  If you turn off discovery in the Configure page of the plugin, the line that's crashing will not be executed.  That'll limit you to manually adding WeMo devices by their IP address, but honestly, you should be doing that anyway, it's much more reliable.

Offline petequintanilla

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +0/-0
Re: Belkin WeMo plugin released
« Reply #19 on: April 27, 2013, 09:29:17 pm »
Futzle

I really really appreciate all your efforts developing this plugin, I have turned off discovery and been able to have all my wemos added, the plugging is now working.

Its time to play. Im so exited!!! Thanks!!!!! :)

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin released
« Reply #20 on: April 27, 2013, 09:46:38 pm »
I have turned off discovery and been able to have all my wemos added, the plugging is now working.

That's great news.  See how long the connection stays up; my experience has been that after a day or two instant status updates stop working.  A Luup restart will make it good again, for a while.

How I fix this might be influenced by the experiences others report back, so let me know how you go.

Things to try out: turn a switch on/off via the iOS app, and see if the change is reported in the Vera dashboard.  And vice versa.

Meanwhile I've uploaded version 5 to code.mios.com, which should report the reason for the crash so that I can work around it.  But for the moment I'm much more interested in your experience with the stability of the connection.  LH, same applies to you.

Offline LH

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-1
Re: Belkin WeMo plugin released
« Reply #21 on: April 28, 2013, 03:22:24 am »
Ok, this is frustrating.

Under the Belkin WeMo configure tab, I UN checked "Enable scan for WeMo devices on LAN" but the option to manually add a WeMo is not there. Nothing shows up.  Just a line that says "UPnP Proxy running (API version 3)"

Edit: I uploaded the 5 newest files from here http://code.mios.com/trac/mios_belkin-wemo/browser/?order=date

And now when I go to the Configure tab, I get:

Opening configuration...

And it just sits there.

« Last Edit: April 28, 2013, 03:31:24 am by LH »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin released
« Reply #22 on: April 28, 2013, 03:42:01 am »
LH, that indicates a JavaScript error. Hunt through your browser's console log for a message that coincides with the moment you open the tab. Ignore the copious chaff from normal Vera operation.

I develop on Firefox. Other browsers should work but are untested.

I'm sorry this is frustrating for you. It's equally frustrating for me. You and Pete are the only two users I know who've even tried the plugin, and I value your feedback immensely.

Offline petequintanilla

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +0/-0
Re: Belkin WeMo plugin released
« Reply #23 on: April 28, 2013, 10:20:06 am »
LH try unplugging the Vera unit from the power and the plug it back, it was happening same to me, and it seams that a simply reload does not load the new code.

Offline LH

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-1
Re: Belkin WeMo plugin released
« Reply #24 on: April 28, 2013, 10:52:35 am »
I have rebooted the device (pulled the plug per petequintanilla's suggestion) and downloaded the latest version of Firefox.

I am on a Mac (Mt. Lion) and tried it in Chrome, Safari and FF....all do exactly the same thing.

It just sits at "Opening configuration..." on that tab.


:(

Edit: I fired up my Windows 7 VM and tested in IE10 and FF on the Windows side. Same thing.
« Last Edit: April 28, 2013, 01:35:40 pm by LH »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin released
« Reply #25 on: April 28, 2013, 05:31:03 pm »
LH, in order to proceed, I need that JavaScript console message.  I don't get the error you get (and nor does petequintanilla) so it has to come from you.

On Firefox, visit Tools > Web Developer > Web Console.  You'll get a continuous stream of messages from Vera's web interface polling Vera (attached).  Ignore those.  Then go to the tab that hangs.  There will be an error message.  I need that.

Edit: the other thing that can cause what you see is that you corrupted the JavaScript file while transferring it to the Vera.  I hate to accuse you of such a rookie mistake, but can you prove that you transferred the file to Vera successfully?  Find the file in Apps > Develop Apps > Luup Files, and then View Source on the file.  Does it look like proper JavaScript?
« Last Edit: April 28, 2013, 05:59:33 pm by futzle »

Offline LH

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-1
Re: Belkin WeMo plugin
« Reply #26 on: April 28, 2013, 06:12:45 pm »
The JS looks normal (to my untrained eyes)

But, the FF console indicated otherwise.

See attached.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin
« Reply #27 on: April 28, 2013, 07:17:46 pm »
Yep, you're right, the file is corrupted. Line 1 is a comment so it is unlikely to be a syntax error.

I'd suggest transferring again, making sure that you don't accidentally convert it to UTF-16 or prepend line numbers or save it as RTF.

Offline LH

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-1
Re: Belkin WeMo plugin
« Reply #28 on: April 28, 2013, 07:39:56 pm »
I tried downloading the files again in Windows and on my Mac.

Did a restart (pull the plug) on my VereLite each time.

Same thing....nothing ever loads on the Configure tab.

I have no idea what to do next.

Could it be conflicting with one (or more) of my other apps?

I have the Phillips Hue app installed, as well as Weather Underground in addition to the UpnP Proxy.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3255
  • Karma: +191/-9
Re: Belkin WeMo plugin
« Reply #29 on: April 28, 2013, 09:01:24 pm »
It's very unlikely that other plugins are affecting this one. My eyes would be on your transferring technique. Somehow the file on Vera isn't the file it should be. How, exactly, are you transferring the file? Be detailed, be explicit, be precise.

Edit: don't power down your Vera. It's just going to break something. Pressing Reload at top right, and then clearing your browser cache, is enough.