[SOLVED] WeMo Reliability

Gerat, let’s see if it will work reliable for a couple of days/weeks. If so, I will create a pull request to have this patch in the SNAPSHOTS.

Hey Hans,

Got an example of it failing.

Paper has the port as 49157 but it’s actually at 49154.

Capture

Port that Paper IS showing and does NOT respond to a ping:

C:\Users\root>paping 192.168.0.181 -p 49157 -c 4
paping v1.5.5 - Copyright (c) 2011 Mike Lovell

Connecting to 192.168.0.181 on TCP 49157:

Connection timed out
Connection timed out
Connection timed out
Connection timed out

Connection statistics:
        Attempted = 4, Connected = 0, Failed = 4 (100.00%)
Approximate connection times:
        Minimum = 0.00ms, Maximum = 0.00ms, Average = 0.00ms

Port that Paper is NOT showing and responds to a PING

C:\Users\root>paping 192.168.0.181 -p 49154 -c 4
paping v1.5.5 - Copyright (c) 2011 Mike Lovell

Connecting to 192.168.0.181 on TCP 49154:

Connected to 192.168.0.181: time=31.43ms protocol=TCP port=49154
Connected to 192.168.0.181: time=0.00ms protocol=TCP port=49154
Connected to 192.168.0.181: time=2.82ms protocol=TCP port=49154
Connected to 192.168.0.181: time=0.00ms protocol=TCP port=49154

Connection statistics:
        Attempted = 4, Connected = 4, Failed = 0 (0.00%)
Approximate connection times:
        Minimum = 0.00ms, Maximum = 31.43ms, Average = 8.56ms

I actually have all my WeMo plugs try twice.

			Wallplug_Jays_Office_Light.sendCommand(ON)
				Thread::sleep(5000)  // 5 second wait
			Wallplug_Jays_Office_Light.sendCommand(ON)
				Thread::sleep(5000)  // 5 second wait

This device is one of the ones that seem to always be changing. I got out of Paper a few times and back in and the port never changed; it stayed the same.

I did a search for new WeMo’s via Paper and looked again at the port but it stayed the same.

It did eventually turn on which I don’t understand why it did? Are you going up the ports to turn them on/off or using the paper port shown for a specific device.

Best, Jay

Another example happened; seems to be a trend with these 2 examples tied to 49157 in paper

Paper shows it as port 49157

Capture

This time the device responds to port 49157 but the switch does NOT turn on.

C:\Users\root>paping 192.168.0.192  -p 49157 -c 4
paping v1.5.5 - Copyright (c) 2011 Mike Lovell

Connecting to 192.168.0.192 on TCP 49157:

Connected to 192.168.0.192: time=3.00ms protocol=TCP port=49157
Connected to 192.168.0.192: time=2.21ms protocol=TCP port=49157
Connected to 192.168.0.192: time=2.98ms protocol=TCP port=49157
Connected to 192.168.0.192: time=0.00ms protocol=TCP port=49157

Connection statistics:
        Attempted = 4, Connected = 4, Failed = 0 (0.00%)
Approximate connection times:
        Minimum = 0.00ms, Maximum = 3.00ms, Average = 2.05ms

and its responding to 49153 also which I have never seen WeMo switches respond to both ports

C:\Users\root>paping 192.168.0.192  -p 49153 -c 4
paping v1.5.5 - Copyright (c) 2011 Mike Lovell

Connecting to 192.168.0.192 on TCP 49153:

Connected to 192.168.0.192: time=0.00ms protocol=TCP port=49153
Connected to 192.168.0.192: time=15.79ms protocol=TCP port=49153
Connected to 192.168.0.192: time=3.99ms protocol=TCP port=49153
Connected to 192.168.0.192: time=0.00ms protocol=TCP port=49153

Connection statistics:
        Attempted = 4, Connected = 4, Failed = 0 (0.00%)
Approximate connection times:
        Minimum = 0.00ms, Maximum = 15.79ms, Average = 4.94ms

Best, Jay

Hm, so this WeMo firmware bug makes it not easy to solve it in a proper way, instead we need to cycle through all ports. Really ugly, but I will think of a way to solve it.

For the case where both ports are active, what does the upnp discovery say it is?

Noticing that this is lost after doing a full restart of openhab 2.4, and I have to go back in to karaf and do it again. Should this go in the addons.cfg (for 2.4)?
Thanks.

Not sure it will work in addons.cfg? I just dropped in these JAR’s into my addon directory and I’m running OH 2.4 also.

org.eclipse.smarthome.io.transport.upnp-0.11.0.oh250M1.jar
org.eclipse.smarthome.config.discovery.upnp-0.11.0.oh250M1.jar

Best, Jay

Thanks. So far I haven’t had any problems with the binding.

Everything was good up until tonight, when everything stopped working. Paper still shows the devices as online but turning on/off does nothing. The wemo devices themselves respond to upnp discovery just fine.
I don’t know how to check paper for the port that openhab thinks the wemo is on - i don’t get the same prop screen as jwiseman showed above. All my other openhab stuff works fine. I see no other general errors.

In the trace logs for this binding I see the following every minute (one for every device):

1-Jul-2019 02:15:00.083 [TRACE] [.openhab.binding.wemo.internal.handler.WemoHandler] - Command ‘OFF’ received for channel ‘wemo:socket:Socket-1_0-221816K0103611:state’
11-Jul-2019 02:15:24.789 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Lightswitch-1_0-221805K13015C0 not yet registered
11-Jul-2019 02:15:24.793 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@1c5c8ae’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:15:37.625 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Insight-1_0-231545K12006FE not yet registered
11-Jul-2019 02:15:37.629 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@1bbd20a’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:15:45.787 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Socket-1_0-221816K0103611 not yet registered
11-Jul-2019 02:15:45.790 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@5e40d9’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:16:01.387 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Socket-1_0-221816K0103507 not yet registered
11-Jul-2019 02:16:01.390 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@54300’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:16:13.453 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Lightswitch-1_0-221413K13013CB not yet registered
11-Jul-2019 02:16:13.456 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@1a6e5a5’ FAILED - service.isRegistered(this) is FALSE
root@alarmpi:/var/log/openhab2#

If I try to turn something on or off I do see the notification there, but it does nothing for example:

1-Jul-2019 02:15:00.083 [TRACE] [.openhab.binding.wemo.internal.handler.WemoHandler] - Command ‘OFF’ received for channel ‘wemo:socket:Socket-1_0-221816K0103611:state’
11-Jul-2019 02:15:24.789 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Lightswitch-1_0-221805K13015C0 not yet registered
11-Jul-2019 02:15:24.793 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@1c5c8ae’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:15:37.625 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Insight-1_0-231545K12006FE not yet registered
11-Jul-2019 02:15:37.629 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@1bbd20a’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:15:45.787 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Socket-1_0-221816K0103611 not yet registered
11-Jul-2019 02:15:45.790 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@5e40d9’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:16:01.387 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Socket-1_0-221816K0103507 not yet registered
11-Jul-2019 02:16:01.390 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@54300’ FAILED - service.isRegistered(this) is FALSE
11-Jul-2019 02:16:13.453 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - WeMo UPnP device Lightswitch-1_0-221413K13013CB not yet registered
11-Jul-2019 02:16:13.456 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Setting up WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@1a6e5a5’ FAILED - service.isRegistered(this) is FALSE

You need to delete your WeMo Things, change the Binding and have the WeMos rediscovered. Otherwise you will not see the new Properties entries.
But in Your case, there seem to be other UPnP related issues.

New version is definitely not doing a rediscovery. Looks like one of my lights changed to port 49154 and the binding is still using an older port…

11-Aug-2019 21:52:17.578 [DEBUG] [.openhab.binding.wemo.internal.handler.WemoHandler] - Checking WeMo GENA subscription for ‘org.openhab.binding.wemo.internal.handler.WemoHandler@f0e756’
11-Aug-2019 21:52:24.111 [TRACE] [.openhab.binding.wemo.internal.handler.WemoHandler] - Command ‘OFF’ received for channel ‘wemo:lightswitch:Lightswitch-1_0-221413K13013CB:state’
11-Aug-2019 21:52:26.117 [DEBUG] [rg.openhab.binding.wemo.internal.http.WemoHttpCall] - Could not make HTTP call to WeMo
11-Aug-2019 21:52:28.695 [TRACE] [.openhab.binding.wemo.internal.handler.WemoHandler] - Command ‘ON’ received for channel ‘wemo:lightswitch:Lightswitch-1_0-221413K13013CB:state’
11-Aug-2019 21:52:30.702 [DEBUG] [rg.openhab.binding.wemo.internal.http.WemoHttpCall] - Could not make HTTP call to WeMo

python wemo_disc.py

HTTP/1.1 200 OK
CACHE-CONTROL: max-age=86400
DATE: Mon, 12 Aug 2019 01:59:35 GMT
EXT:
LOCATION: http://192.168.1.200:49154/setup.xml
OPT: “http://schemas.upnp.org/upnp/1/0/”; ns=01
01-NLS: eca29c44-1dd1-11b2-b66e-bb4530186ed0
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: redsonic
ST: upnp:rootdevice
USN: uuid:Lightswitch-1_0-221413K13013CB::upnp:rootdevice

Manually sending the SOAP request to this port works.

1 Like

Not that we expect it to, but the jar is not picked up by 2.5.0M2 for me.

Hi Hans,

Any new updates on fixing the WeMo port issues?

Best, Jay

1 Like

Hi, thanks for your patience.
I might have a new testing version ready by end of this week.

Best
Hans-Jörg

1 Like

Sorry Guys, it will take another week as I had some issues with my development system. Hope to have it sorted tomorrow night.

1 Like

I have uploaded a new Binding version for testing :
https://github.com/hmerk/wemo/blob/master/org.openhab.binding.wemo-2.5.0-SNAPSHOT.jar

Hope to have solved the port issue :slight_smile:

Thanks Hans!

Downloaded and will start testing it tonight 7 pm Chicago, IL USA time.

Best, Jay

Hans,

I’m getting this for my devices when starting OH up; do I need to?

  1. Blow away cache/tmp?
  2. Delete my WeMo devices?
2019-09-07 19:41:32.433 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221602K1301B7A': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.434 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K0102FCD': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.440 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221838K1302422': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.441 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221736K1300F5B': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.470 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:insight:Insight-1_0-231707K1201DE8': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.477 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-22C8B1K0108E93': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.499 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-22B8B1K01028F4': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.503 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221710K010228E': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.600 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K0102E6D': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.625 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:insight:Insight-1_0-231837K120048E': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.741 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K0102A74': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.766 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221742K0118E30': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.787 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221736K1300F26': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.790 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K01027A4': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.817 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221739K0103039': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.859 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221620K01013B1': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.899 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221622K130115C': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.946 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221612K0102B49': Invalid URI host: null (authority: null:null)
2019-09-07 19:41:32.961 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221609K0100F65': Invalid URI host: null (authority: null:null)

Best, Jay

I did both of these steps and I’m still getting these errors.

2019-09-07 21:39:49.362 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221602K1301B7A': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.368 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221838K1302422': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.385 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K0102FCD': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.389 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221736K1300F5B': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.405 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:insight:Insight-1_0-231707K1201DE8': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.411 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-22C8B1K0108E93': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.450 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-22B8B1K01028F4': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.457 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221710K010228E': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.481 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K0102E6D': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.522 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:insight:Insight-1_0-231837K120048E': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.528 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K0102A74': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.628 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221742K0118E30': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.672 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221736K1300F26': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.682 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221749K01027A4': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.714 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221739K0103039': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.734 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221620K01013B1': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.746 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:lightswitch:Lightswitch-1_0-221622K130115C': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.775 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221612K0102B49': Invalid URI host: null (authority: null:null)
2019-09-07 21:39:49.786 [ERROR] [ng.wemo.internal.handler.WemoHandler] - Failed to get actual state for device 'wemo:socket:Socket-1_0-221609K0100F65': Invalid URI host: null (authority: null:null)

The WeMo devices go from Online to Offline - Communication Error very often also. This seems to mimic some of the issues the Sonos binding has with the Offline - Communication Error which is reported to be a jupnp issue.

I’m running jupnp v2.5.2

I’m going to have to roll back to the previous WeMo version Hans released prior to this.

Best, Jay

I will check tonight, seems to be a dumb typo from myself.