Wemo binding / things - not working

Hi - I’m running some version of the OpenHab2 instance, installed via apt-get.

I have four Wemo devices discovered and added as things, and in the demo.things file. They work from the Control tab of the PaperUI interface, but not the BasicUI. If I leave these entries in the demo.things file, I get two of each item in the control UI.

wemo:socket:betabrite [udn="Socket_1_0_221337K0100Exx"]
wemo:socket:barlights [udn="Socket_1_0_221337K01010xx"]
wemo:socket:spotlight [udn="Socket_1_0_221535K0100Dxx"]
wemo:socket:deck [udn="Lightswitch_1_0_221410K13003xx"]

And my items file:

Switch switch_outside_deck           "Deck"                           <switch>     {channel="wemo:socket:deck:state"} 
Switch switch_mandatorium_betabrite  "Betabrite"                      <switch>     {channel="wemo:socket:betabrite:state"} 
Switch switch_mandatorium_bar        "Bar Lights"                     <switch>     {channel="wemo:socket:barlights:state"} 
Switch switch_mandatorium_spotlight  "Spotlight"                      <switch>     {channel="wemo:socket:spotlight:state"} 

Any ideas?

1 Like

I will have a lok at this, in the meantime, it should work if you define things and items exactly as in the docu. Don’t use names in the definitions, but the udn.

Hi Hans-Jörg, thanks for the reply. I thought my format follows what you said in this post:

…hold the presses! I think I just found the error. I had a ‘_’ instead of a ‘-’ after the ‘Socket’ in the demo.things definition, but I still couldn’t get it to work.

I removed all the things using PaperUI, and removed the items from the demo.things file, and then rediscovered them with PaperUI.

at this point changes to a switch show up in events.log but not openhab.log

My four wemo devices appear in the Control section of PaperUI and can be controlled.

I then add the four items to demo.items looking like this:

wemo:socket:betabrite [udn="Socket-1_0_221337K0100EE1"]
wemo:socket:barlights [udn="Socket-1_0_221337K0101032"]
wemo:socket:spotlight [udn="Socket-1_0_221535K0100D10"]
wemo:socket:deck [udn="Lightswitch-1_0_221410K13003B6"]

And I now have 8 items under Configuration/Things in PaperUI.

So I removed all my custom ones and tried to just configure the items using the discovered names. I’ve tried linking and unlinking via paperUI but I’m not sure that does anything.

If I remove all the discovered items, I have four generic Wemo items in my PaperUI/Control page. None of them control anything, but under Configuration/Things they all show as online. The things are configured as above.

If I try to link any of these Things, I get either a Conflict or 404 error.

I then rescan and end up with 8 Things, all online. Four control devices.

As of this moment:
demo.things:

wemo:socket:betabrite [udn="Socket-1_0_221337K0100EE1"]
wemo:socket:barlights [udn="Socket-1_0_221337K0101032"]
wemo:socket:spotlight [udn="Socket-1_0_221535K0100D10"]
wemo:socket:deck [udn="Lightswitch-1_0_221410K13003B6"]

standard.items:

Switch switch_outside_deck “Deck” {channel=“wemo:socket:deck:state”}
Switch switch_mandatorium_betabrite “Betabrite” {channel=“wemo:socket:betabrite:state”}
Switch switch_mandatorium_bar “Bar Lights” {channel=“wemo:socket:barlights:state”}
Switch switch_mandatorium_spotlight “Spotlight” {channel=“wemo:socket:spotlight:state”}

This is making me nuts. I’ve had it working before under 1.8 and early betas of 2.0. I need a second set of eyes to help find my error…

Yes, you are right, thats what I wrote and what’s in the docu. This should work.
But I expirienced a different behaviour with some other bindings too.
As you might have seen, defining a thing with a different naming will also create a channel, that is not the same as the one shown in inbox after discovery. This might lead to inbox entries never disappearing.
Therefore I use the exact definition like the inbox entries, so they automatically disappear after defining a thing.
I hope this makes it clearer.
I will start a discussion on esh, if there will be solution for this issue.

Hi Hans-Jörg,

Thanks again. I made my things file look exactly like the inbox items:

wemo:socket:Socket-1_0_221337K0100EE1 [udn="Socket-1_0_221337K0100EE1"]
wemo:socket:Socket-1_0_221337K0101032 [udn="Socket-1_0_221337K0101032"]
wemo:socket:Socket-1_0_221535K0100D10 [udn="Socket-1_0_221535K0100D10"]
wemo:lightswitch:Lightswitch-1_0_221410K13003B6 [udn="Lightswitch-1_0_221410K13003B6"]

and my items file looks like this:

Switch switch_outside_deck “Deck” {channel=“wemo:lightswitch:Lightswitch-1_0-221410K13003B6”}
Switch switch_mandatorium_betabrite “Betabrite” {channel=“wemo:socket:Socket-1_0-221337K0100EE1”}
Switch switch_mandatorium_bar “Bar Lights” {channel=“wemo:socket:Socket-1_0-221337K0101032”}
Switch switch_mandatorium_spotlight “Spotlight” {channel=“wemo:socket:Socket-1_0_221337K0101032”}

and the result is fairly positive, but unfortunately it still doesn’t work.
I don’t get any duplicate items in the things / control screens in paperUI
I do not get any errors in the openhab.log file
events.log does show the Wemos getting initialized the switch getting the command, but the physical device does not trigger and there are no errors in the log. I can control the physical device from the PaperUI Control screen.

OK, you are nearly there, but you forgot to add the channeltype e.g.

Switch switch_mandatorium_bar "Bar Lights" {channel="wemo:socket:Socket-1_0-221337K0101032:state"}

That did it!

I had them in there at one point, but lost them during my gyrations and thought they were optional.

Thanks for the help! Hopefully this post helps other get their configurations straight.

1 Like