Setting up WeMo GENA subscription for 'org.eclipse.smarthome.binding.wemo.handler.WemoHandler FAILED

I’ve been running OpenHAB1.8.3 on a Windows 10 machine for many months. Last month (December 2018) I upgraded to OpenHAB2 without much difficulty. During the process I also upgraded to the OH2 WEMO binding. The system is stable. Now I want to move off my development Windows 10 machine onto a Raspberry Pi.

I’ve updated my Raspian system, installed OpenHAB2 stable release per instructions at https://www.openhab.org/docs/installation/linux.html, upgraded to Oracle JAVA build 1.8.0_201-b09, and copied my 100% working OH conf folder from my Windows machine to the Raspberry. Now I’m fighting a relentless WEMO issue: Setting up WeMo GENA subscription for ‘org.eclipse.smarthome.binding.wemo.handler.WemoHandler@1573f5c’ FAILED - service.isRegistered(this) is FALSE. I have verified my router has UPnP enable. The WEMO devices work via my iPhone APP. The WEMO devices do NOT work via my sitemap or dashboard.
I have read several related threads and none are giving me hope to solve this problem. Any help is appreciated.
Thanks in advance…bob

Opening a new thread will not give you a faster solution.
I am already trying to solve this issue, but my time for coding is very limited atm. It is not easy to solve, as I don‘t see those errors in my environment.

Thank you for your immediate reply and for the update. The last thread I read was several months old.

FYI, I continue to read and tried the following:
setcap ‘cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep’ $(realpath /usr/bin/java)
Then rebooted and restarted OpenHAB without success.

I don’t experience the issue on WINDOWS 10, only on Raspian. Bindings are different?

Will reverting to the WEMO1 binding solve my problem on Raspian?

Thanks again…bob

There is no difference between Windows or Linux versions of the binding.
The old Wemo 1.x Binding might solve your issue as it does not use GENA events, therefore not usefull for motion sensors.
I know the the last post around those issues are a bit older. I have not updated the binding for about a year now, but I hope to find some time when my little son starts sleeping the complete night.

There must be many, many users like me that want to operate only WEME lights on a Raspberry Pi. Do you know if they use OH1 and WEMO 1.8.3 binding, or OH2 with WEMO 1.8.3 binding, or OH2 with WEMO 2.x binding?

Is a .things file required for OH2 with WEMO 1.8.3 binding? I expect yes as I believe .things is a OH2 feature.

Thanks again for your help. Hope you’re getting your sleep with the new little one. I have 6 but am well beyond those years - all are married and a joy to be with…bob :slight_smile:

We have no insights what bindings are in use.
Things files are only used for 2.x bindings, not for 1.x.
If you want to use the old binding, just use your old Items config.

For the benefit of others that might have encountered this WEMO2 binding issue I am herewith documenting my solution – I first ensured Java is up-to-date and then reverted to the WEMO 1.8.3 binding. Please note my WEMO devices are on light switches and sockets. See hmerk’s comment above.

I updated my Raspian system (Jessie), installed OpenHAB2 2.4.0 stable release per instructions at https://www.openhab.org/docs/installation/linux.html, and upgraded to Oracle JAVA build 1.8.0_201-b09 as follows:

I started with instructions per this 1st reference: https://raspberrypi.stackexchange.com/questions/45976/how-do-i-update-java-8-in-raspbian

Remove OpenJDK

sudo apt-get purge openjdk*

add digital key

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886

add packet source

sudo vim /etc/apt/sources.list

add following lines

deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

Install Java 8

sudo apt-get update

sudo apt-get install oracle-java8-installer

AT THIS POINT I GOT MESSAGE: “Package oracle-java8-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or

is only available from another source”, so I jumped to instructions per this 2nd reference https://gist.github.com/ribasco/fff7d30b31807eb02b32bcf35164f11f

Introduction

The default version of java provided in the latest raspbian images are outdated, so we are going to install from the ppa:webupd8team/java repository instead. Please note that add-apt-repository ppa:webupd8team/java will not work, so we will need to add the repository manually.

Installation

  1. Create the gpg key file and paste the following lines of text below

nano key.txt

  1. Add the gpg key

sudo apt-key add key.txt

  1. Add the repository to /etc/apt/sources.list.d/ and perform an update (THESE ARE RASPIAN COMMANDS!)

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list

echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list

sudo apt-get update

  1. Install Java 8 SDK

sudo apt-get install oracle-java8-installer

  1. Verify that we have successfully installed java

pi@raspberrypi:~# java -version

java version "1.8.0_161"

Java™ SE Runtime Environment (build 1.8.0_161-b12)

Java HotSpot™ Client VM (build 25.161-b12, mixed mode)

Then, based on the 1st reference, I added:

sudo apt-get install oracle-java8-set-default

sudo apt-get purge openjdk*

sudo apt-get purge java7*

sudo apt-get autoremove

check success

java -version

Since I thought my WEMO issue was Java permissions based I also did the following per another thread:

setcap ‘cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep’ $(realpath /usr/bin/java)

I then learned from hmerk (Hans-Jörg Merk) via this thread that my WEMO issue was likely a GENA events WEMO2 binding issue and not a Java based issue, so I reverted to the WEMO 1.8.3 binding.

My OH2 system WEMO devices are lights switches and sockets only.

My OH2 services directory (folder) “addons.cfg” file contains the following:

binding = http,mailcontrol,mqtt1,networkhealth1,ntp,wemo1

My OH2 addons directory (folder) contains the org.openhab.binding.wemo-1.8.3.jar file that MUST BE RENAMED to not include the version number - org.openhab.binding.wemo

My OH2 things directory (folder) is empty. I have the directory (folder) but no file in it because I have no other “things” in my system. By experimentation I found OH2 throws errors if the “.things” directory (folder) does not exist.

My OH2 items directory (folder) “.items” file contains the following:

// WEMO Switches WEMO1 Binding Style --------------------------------------------------------------

// Need to define WEMO1 in addons.cfg

// https://github.com/openhab/openhab1-addons/wiki/Wemo-Binding

Switch OHC_WEMO01 "Living Rm Light [%s]" {wemo="Socket-1_0-221341K0101D58", mqtt="<[hsbroker:/OHIB/OHW/54:state:default]"}

Switch OHC_WEMO02 "Family Rm Light [%s]" {wemo="Socket-1_0-221341K0101ECA", mqtt="<[hsbroker:/OHIB/OHW/55:state:default]"}

Switch OHC_WEMO03 "Hot Tub [%s]" {wemo="Socket-1_0-221342K0102BC6", mqtt="<[hsbroker:/OHIB/OHW/56:state:default]"}

Switch OHC_WEMO04 "SPARE [%s]" { mqtt="<[hsbroker:/OHIB/OHW/57:state:default]"}

Switch OHC_WEMO05 "WH Fan [%s]" { mqtt="<[hsbroker:/OHIB/OHW/53:state:default]"}

Switch OHC_WEMO09 "ALARM - Indoor [%s]" {wemo="Socket-1_0-221741K01070C6", mqtt="<[hsbroker:/OHIB/OHW/58:state:default]"}

Switch OHC_WEMO10 "ALARM - Outdoor [%s]" {wemo="Socket-1_0-221741K0105FCB", mqtt="<[hsbroker:/OHIB/OHW/59:state:default]"}

Switch OHC_WEMO11 "Flood - Front Entry [%s]" { mqtt="<[hsbroker:/OHIB/OHW/60:state:default]"}

Switch OHC_WEMO12 "Flood - South Side [%s]" {wemo="Lightswitch-1_0-221642K1300C6F", mqtt="<[hsbroker:/OHIB/OHW/61:state:default]"}

Switch OHC_WEMO13 "Flood - North Side [%s]" {wemo="Lightswitch-1_0-221627K13009A2", mqtt="<[hsbroker:/OHIB/OHW/62:state:default]"}

Switch OHC_WEMO14 "Flood - Backyard [%s]" {wemo="Lightswitch-1_0-221642K1300A96", mqtt="<[hsbroker:/OHIB/OHW/63:state:default]"}

Switch OHC_WEMO15 "Flood - Kitchen [%s]" {wemo="Lightswitch-1_0-221626K13011AE", mqtt="<[hsbroker:/OHIB/OHW/64:state:default]"}

I hope this saves someone much time and frustration.