[SOLVED] Very frustrated with ZWave binding and OpenHAB UI

It is currently recommended to use a snapshot binding on OH3. We fixed a database error after 3.0.1 was released.
The script usually helps.
Zigbee and Z-Wave manual install script - Tutorials & Examples - openHAB Community

2 Likes

Yes, I followed what anonymous.one posted at [SOLVED] Zwave devices not updating item states after upgrade to OH 3 - #8 by anonymous.one and updated to 3.1.0 . I can’t recall now but I think I wasn’t able to do the Karaf thing but searched and found another way to update. I am sure I had the 3.1.0 version because I did execute bundle:list -s | grep zwave and saw 3.1.0 there.

So somehow my OH3 brought back to 3.0.0 … strange.

I will try the script linked by Bruce_Osborne to get it back to 3.1.0 again.

Thanks guys

OK, now I have 3.1.0 again:

openhab> list -s | grep zwave                                                                                                
233 │ Active │  80 │ 3.1.0.202103070338      │ org.openhab.binding.zwave

Let’s see how this behaves now, if I get thermostat updates into OH3. I’m hopeful.

Yep, my OH3 is good now. I’m getting updates from the thermostats now.

So my problem was that ZWave binding went back to 3.0.0 . I don’t have a clue how that happened.

Thank you for the questions which led me to discover 3.1.0 was gone and my OH3 was back to 3.0.0.

2 Likes

Somehow my OpenHAB again returned to ZWave binding 3.0.0 … when I restarted OpenHAB two days ago.

openhab> bundle:list org.openhab.binding.zwave                                                                                                                                                          
START LEVEL 100 , List Threshold: 50
 ID │ State  │ Lvl │ Version            │ Name
────┼────────┼─────┼────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
208 │ Active │  80 │ 3.1.0.202103070338 │ openHAB Add-ons :: Bundles :: ZWave Binding
219 │ Active │  80 │ 3.0.1              │ openHAB Add-ons :: Bundles :: ZWave Binding
openhab>

Can anyone help me understand why is this happening? I got 3.1.0 installed with the script @Bruce_Osborne posted, and all was fine until this restart.

Yeah, this is getting strange or frustrating again. The manual script doesn’t complete. So I followed the manual steps at openHAB-utils/README.md at master · 5iver/openHAB-utils · GitHub and that resulted in both versions installed.

So I removed them both with bundle:uninstall org.openhab.binding.zwave then ran openhabian-config and updated to main. After that I went to console and listed the bindings.

At first it lists 3.1.0 only, then, magically, about a minute later I run list again and I see both versions again !?!?:

openhab> list -s | grep zwave                                                                                                                                                                                                                 
209 │ Installed │  80 │ 3.1.0.202104210336      │ org.openhab.binding.zwave
openhab> list -s | grep zwave                                                                                                                                                                                                                 
209 │ Installed │  80 │ 3.1.0.202104210336      │ org.openhab.binding.zwave
222 │ Active    │  80 │ 3.0.2                   │ org.openhab.binding.zwave
openhab>  

How do I get rid of this zombie 3.0 version which keeps reappearing? Where does this thing come from?

Anyway, I seemed to have resolved my problem by uninstalling 3.0.2, removing 3.1.0.2021042110336 because it resulted in errors, and then taking the backup of 3.1.0.202103070338 which the zzManualInstaller.sh script created and putting it back into addons.

Copies of my chores below in case someone is facing similar issues with their ZWave in OH3:

openhab> list -s | grep zwave                                                                                                                                                                                                                 
209 │ Installed │  80 │ 3.1.0.202104210336      │ org.openhab.binding.zwave
222 │ Active    │  80 │ 3.0.2                   │ org.openhab.binding.zwave
openhab> bundle:stop 222
openhab> list -s | grep zwave
209 │ Installed │  80 │ 3.1.0.202104210336      │ org.openhab.binding.zwave
222 │ Resolved  │  80 │ 3.0.2                   │ org.openhab.binding.zwave
openhab> bundle:uninstall 222
openhab> list -s | grep zwave                                                                                                                                                                                                                 
209 │ Installed │  80 │ 3.1.0.202104210336      │ org.openhab.binding.zwave
openhab> bundle:start 209
Error executing command: Error executing command on bundles:
	Error starting bundle 209: Could not resolve module: org.openhab.binding.zwave [209]
  Unresolved requirement: Import-Package: org.osgi.framework; version="[1.9.0,2.0.0)"

OK, that recently downloaded version didn’t work, so I tried the snapshot I had before, recovered the file, or swapped 202104210336 for 202103070338:

openhabian@openHABianDevice:/usr/share/openhab/addons $ ll
total 208M
drwxrwxr-x 3 openhab    openhab 4.0K Apr 22 22:14 ./
drwxrwxr-x 4 openhab    openhab 4.0K Apr  4 21:09 ../
drwxr-xr-x 3 openhab    openhab 4.0K Apr 22 21:37 archive/
-rw-r--r-- 1 openhab    openhab 204M Jan 27 15:21 openhab-addons-3.0.1.kar
-rw-rw-r-- 1 openhabian openhab 1.1M Apr 22 22:14 org.apache.servicemix.bundles.xstream-1.4.16_1.jar
-rw-rw-r-- 1 openhabian openhab  67K Apr 20 22:22 org.openhab.binding.wizlighting-3.0.0-SNAPSHOT.jar
-rw-rw-r-- 1 openhabian openhab 3.5M Apr 22 22:10 org.openhab.binding.zwave-3.1.0-20210421.034706-14.jar
-rw-r--r-- 1 openhab    openhab   70 Jan 27 15:42 README
-rwxr-xr-- 1 openhabian openhab  46K Mar 11 22:18 zzManualInstaller.sh*
openhabian@openHABianDevice:/usr/share/openhab/addons $ sudo mv org.openhab.binding.zwave-3.1.0-20210421.034706-14.jar archive/zwave/
[sudo] password for openhabian: 
openhabian@openHABianDevice:/usr/share/openhab/addons $ ll
total 205M
drwxrwxr-x 3 openhab    openhab 4.0K Apr 22 22:37 ./
drwxrwxr-x 4 openhab    openhab 4.0K Apr 22 22:22 ../
drwxr-xr-x 3 openhab    openhab 4.0K Apr 22 21:37 archive/
-rw-r--r-- 1 openhab    openhab 204M Apr 21 15:48 openhab-addons-3.0.2.kar
-rw-rw-r-- 1 openhabian openhab 1.1M Apr 22 22:14 org.apache.servicemix.bundles.xstream-1.4.16_1.jar
-rw-rw-r-- 1 openhabian openhab  67K Apr 20 22:22 org.openhab.binding.wizlighting-3.0.0-SNAPSHOT.jar
-rw-r--r-- 1 openhab    openhab   70 Apr 21 15:49 README
-rwxr-xr-- 1 openhabian openhab  46K Mar 11 22:18 zzManualInstaller.sh*
openhabian@openHABianDevice:/usr/share/openhab/addons $ cd archive/zwave/
openhabian@openHABianDevice:/usr/share/openhab/addons/archive/zwave $ ll
total 6.9M
drwxr-xr-x 2 openhab    openhab 4.0K Apr 22 22:37 ./
drwxr-xr-x 3 openhab    openhab 4.0K Apr 22 21:37 ../
-rw-rw-r-- 1 openhab    openhab 3.4M Mar 11 22:29 org.openhab.binding.zwave-3.1.0-20210307.034709-24.20210422213733.old
-rw-rw-r-- 1 openhabian openhab 3.5M Apr 22 22:10 org.openhab.binding.zwave-3.1.0-20210421.034706-14.jar
openhabian@openHABianDevice:/usr/share/openhab/addons/archive/zwave $ sudo chown openhab:openhab org.openhab.binding.zwave-3.1.0-20210421.034706-14.jar 
openhabian@openHABianDevice:/usr/share/openhab/addons/archive/zwave $ sudo -u openhab cp org.openhab.binding.zwave-3.1.0-20210307.034709-24.20210422213733.old ../../org.openhab.binding.zwave-3.1.0-20210307.034709-24.jar 
openhabian@openHABianDevice:/usr/share/openhab/addons/archive/zwave $ cd ..
openhabian@openHABianDevice:/usr/share/openhab/addons/archive $ cd ..
openhabian@openHABianDevice:/usr/share/openhab/addons $ ll
total 208M
drwxrwxr-x 3 openhab    openhab 4.0K Apr 22 22:39 ./
drwxrwxr-x 4 openhab    openhab 4.0K Apr 22 22:22 ../
drwxr-xr-x 3 openhab    openhab 4.0K Apr 22 21:37 archive/
-rw-r--r-- 1 openhab    openhab 204M Apr 21 15:48 openhab-addons-3.0.2.kar
-rw-rw-r-- 1 openhabian openhab 1.1M Apr 22 22:14 org.apache.servicemix.bundles.xstream-1.4.16_1.jar
-rw-rw-r-- 1 openhabian openhab  67K Apr 20 22:22 org.openhab.binding.wizlighting-3.0.0-SNAPSHOT.jar
-rw-r--r-- 1 openhab    openhab 3.4M Apr 22 22:39 org.openhab.binding.zwave-3.1.0-20210307.034709-24.jar
-rw-r--r-- 1 openhab    openhab   70 Apr 21 15:49 README
-rwxr-xr-- 1 openhabian openhab  46K Mar 11 22:18 zzManualInstaller.sh*
openhabian@openHABianDevice:/usr/share/openhab/addons $ 

Then in the console it is automagically there and Active:

openhab> list -s | grep zwave                                                                                         235 │ Active │  80 │ 3.1.0.202103070338      │ org.openhab.binding.zwave                                              openhab> list -s | grep zwave                                                                                         
235 │ Active │  80 │ 3.1.0.202103070338      │ org.openhab.binding.zwave

But my question remains, because I know that zombie 3.0.x version is hiding somewhere ready to pounce for my brain… where is it hiding and how do I shoot it in the head for good please?

Apparently the script did not remove the 3.0.1 binding. I see you know how to het into the Karaf console. Once in there try this

bundle:stop 219
bundle:uninstall 219

That should stop & remove the old binding. The script was supposed to do that.

This looks like the work of addons.cfg

That added a jar to the addons folder and the old binding was not uninstalled first. There was a script that worked quite well for a while doing that.

Sure. But if there should happen to be bindings= entry in addons.cfg text file then it will fetch and load the “standard” binding as well as any jar it finds. I suppose it’s not worth looking, though.

I assumed uninstalling did more than remove the file entry.

The file is a list for openHAB’s use of “things to install”. I don’t think uninstalling a package from karaf affects the file at contents at all.

I thought the file was just a cached list of installed addons and Karaf was ultimately the proper way to uninstall one. Am I mistaken?

For those who insist on using all text based configs, /etc/openhab/services/addons.cfg is going to take precedence over everything else. If it’s listed in addons.cfg it will be installed. If you remove it using the console or the UI and fail to remove it from addons.cfg, it will be reinstalled. If it is not listed in addons.cfg, it will be uninstalled. If you add it through the console or the UI and fail to add it to addons.cfg, it will be uninstalled.

The cache file you may be thinking of is /var/lib/openhab/config/org/openhab/addons.config.

1 Like

Sorry, I mixed up the two files. Thanks for the reminder.

In my case there is nothing in /etc/openhab/services/addons.cfg:

openhabian@openHABianDevice:/etc/openhab/services $ cat addons.cfg 
# The installation package of this openHAB instance
# Note: This is only regarded at the VERY FIRST START of openHAB
# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal"
# as otherwise your definition might be in conflict with what the installation package defines.
#
# Valid options:
#   - standard : Standard setup for normal use of openHAB
#   - minimal  : Installation of core components, but no UIs or other add-ons. Use this for special headless setups.
#   - demo     : A pre-configured demo setup which can be used for demonstration.
#
# See https://www.openhab.org/docs/configuration/packages.html for a detailed explanation of these packages.
#
package = standard

# Access Remote Add-on Repository
# Defines whether the remote openHAB add-on repository should be used for browsing and installing add-ons. (default is true)
#
#remote = true

# A comma-separated list of automation services to install (e.g. "automation = groovyscripting")
#automation = 

# A comma-separated list of bindings to install (e.g. "binding = knx,sonos,zwave")
#binding = 

# A comma-separated list of miscellaneous services to install (e.g. "misc = openhabcloud")
#misc = 

# A comma-separated list of persistence services to install (e.g. "persistence = jpa,rrd4j")
#persistence = 

# A comma-separated list of transformation services to install (e.g. "transformation = jsonpath,map")
#transformation = 

# A comma-separated list of UIs to install (e.g. "ui = basic,habpanel")
#ui = 

# A comma-separated list of voice services to install (e.g. "voice = googletts,marytts")
#voice = 

So @rlkoshak does that mean my 3.1.0 will be unsinstalled when I restart OH3?

The version of a binding installed is independent of addons.cfg. In short, what ever the current version of OH you are running is the version of the binding that will be installed, whether it’s installed through addons.cfg, the Karaf console, or the UI/REST API. The only way to get a version of a binding different from core is to download the jar file and put it in the addons folder.

1 Like

OK, here is the Zombie again… caught it there today. Not sure since when it was alive. It wasn’t bothering my Thermostats this time, maybe because 3.1.0 was active?

openhab> list -s | grep zwave
235 │ Active │  80 │ 3.1.0.202103070338      │ org.openhab.binding.zwave
253 │ Active │  80 │ 3.0.2                   │ org.openhab.binding.zwave
openhab> bundle:stop 253
openhab> list -s | grep zwave
235 │ Active   │  80 │ 3.1.0.202103070338      │ org.openhab.binding.zwave
253 │ Resolved │  80 │ 3.0.2                   │ org.openhab.binding.zwave
openhab> bundle:uninstall 253
openhab> list -s | grep zwave                                                                                                                                                                                                                 
235 │ Active │  80 │ 3.1.0.202103070338      │ org.openhab.binding.zwave
openhab>  

I wonder when it will raise from the grave again… ~:-(

It will, until it is removed from the controller. :frowning:

Right. But in theory shouldn’t it have been removed by the commands executed in the karaf console?