Belkin Wemo Binding

644 views
Skip to first unread message

Philipp Hug

unread,
May 23, 2013, 6:09:51 PM5/23/13
to ope...@googlegroups.com
Hi,

I started working on a Belkin Wemo Binding. I used the UPNP code for Sonos and ripped out the stuff, I don't need.
Unfortunately the Wemo is not quite UPNP compliant. I found the following mistakes:
* mime-type of icon is 'jpg' instead of 'image/jpeg'
* one of the scpd files start with a UTF-8 BOM (byte-order-mark) which is not recommended and the UNPN library doesn't like it
* the scpd files are completely inconsistent: e.g variables not declared, or multiple values defined as retval. here's some output:
00:03:43.809 WARN  o.t.cling.model.meta.Action[:174]- Only one argument of action 'ShareHWInfo' can be <retval/>
00:03:43.812 WARN  o.t.cling.model.meta.Action[:174]- Only one argument of action 'SetMultiState' can be <retval/>
00:03:43.835 WARN  o.t.cling.model.meta.Action[:174]- Only one argument of action 'SetLogLevelOption' can be <retval/>
00:03:43.840 WARN  o.t.cling.model.meta.Action[:174]- Only one argument of action 'ChangeDeviceIcon' can be <retval/>
00:03:43.854 WARN  o.t.cling.model.meta.Action[:174]- Only one argument of action 'GetServerEnvironment' can be <retval/>
00:03:43.868 WARN  o.t.cling.model.meta.Action[:186]- Argument 'ServerEnvironmentType' of action 'GetServerEnvironment' is <retval/> but not the first OUT argument
* in one of the scpd files, the argumentList misses the argument element. Good thing here is, that we don't need that one.

So to make it work, I had to patch the first 3 issues within cling, I'll post my findings also to the cling ML and to the Belkin support forum.

Now to my question: How should the item statement for a networked power switch look like?
The main function is a on/off switch, but it also has other options like time sync, get/set friendlyname, firmware update, ... of which some might be useful in the future.

I currently use the following syntax:
Switch mylamp "Lampe Ikea" (Wemo,GF_Living) {wemo="[Socket-1_0-221238K11009FA:binarystate]"}
should I change this to:
wemo="[Socket-1_0-221238K11009FA]"}
?
Philipp

Kai Kreuzer

unread,
May 24, 2013, 3:03:53 AM5/24/13
to ope...@googlegroups.com
Hi,

The main function is a on/off switch, but it also has other options like time sync, get/set friendlyname, firmware update, ... of which some might be useful in the future.
I currently use the following syntax:
Switch mylamp "Lampe Ikea" (Wemo,GF_Living) {wemo="[Socket-1_0-221238K11009FA:binarystate]"}
should I change this to:
wemo="[Socket-1_0-221238K11009FA]"}

Yes, I would suggest to change it, because when being bound to a Switch item, the switching functionality is the only meaningful thing to do - so referring the socket by its id should be enough as a binding configuration (actually, you could also leave out the square brackets, right? I.e. only do { wemo="Socket-1_0-221238K11009FA" })

Regards,
Kai

Brian Crosby

unread,
May 25, 2013, 10:19:12 AM5/25/13
to ope...@googlegroups.com
I would agree with Kia. I would also suggest looking at the plugwise and zwave binding topics. Would be nice for all "power" devices follow a similar schema.

Ben Jones

unread,
Oct 17, 2013, 4:02:54 PM10/17/13
to ope...@googlegroups.com
Hey guys - just wondering what the state of this binding is? Is the code available anywhere?

Philipp Hug

unread,
Oct 18, 2013, 4:40:18 AM10/18/13
to ope...@googlegroups.com
Hi,

The binding is working, but it needs some clean up and a patch in a dependency before merging.
I'll upload it somewhere tonight.

Philipp


On Thu, Oct 17, 2013 at 10:02 PM, Ben Jones <ben.j...@gmail.com> wrote:
Hey guys - just wondering what the state of this binding is? Is the code available anywhere?

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/Y3-ujMEZAxM/unsubscribe.

To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

For more options, visit https://groups.google.com/groups/opt_out.

Vlad

unread,
Dec 6, 2013, 8:34:35 PM12/6/13
to ope...@googlegroups.com
Hi Philipp,

Were you able to upload it somewhere?
Got couple of those switches, I'd like to try it.

Thanks

Hans-Jörg Merk

unread,
Dec 30, 2013, 1:23:50 PM12/30/13
to ope...@googlegroups.com
Hi,
any news on this topic?
Just got a WEMO today and would like to try your binding.
Using external python stuff is not my preffered solution.

Regards
Hans-Jörg

Philipp Hug

unread,
Dec 30, 2013, 1:28:29 PM12/30/13
to ope...@googlegroups.com

Hi,

In case you didn't see my post to the cling mailing list:

Cling Patch:
* Ugly hack to not crash on missing Icon and not verififying schema.
* this needs to be cleaned up into a mergable patch for upstream
http://people.debian.org/~hug/cling-1.0.5-source-wemo.patch

Openhab wemo binding:
* copy-paste of sonos binding, needs to be cleaned up and copyright
headers adapted.
http://people.debian.org/~hug/org.openhab.binding.wemo.tar.gz

Philipp

ne...@nwe.net.au

unread,
Jan 1, 2014, 6:42:05 PM1/1/14
to ope...@googlegroups.com
Hi,
I received a Wemo for xmas and I'm looking forward to the integration.
Kind regards,
Neil.

Hans-Jörg Merk

unread,
Jan 2, 2014, 2:25:41 AM1/2/14
to ope...@googlegroups.com
Hi,
There is another user working on a wemo binding called gitaaronc. Reference can be found on cling mailing list.
Aaron is trying to clean his code to have it ready for the next release.

Regards
Hans-Jörg
Reply all
Reply to author
Forward
Message has been deleted
0 new messages