Snapshot not updating using apt-get[SOLVED]

I was running the stable version of openHAB2 but wanted to install a zwave thermostat CT30 that although listed in the database was not identified correctly in my configuration. It appears that Radio Thermostat have used many different manufacturer codes for this device and mine wasn’t listed. I contacted @chris who kindly assisted with pushing the database/binding update for me. Meanwhile I removed the stable release and installed the snapshot release. (using apt-get)

I have tried several times to update the installation and the binding but it appears that my install is still running an old version of the zwave binding (2.1.0.201702121957) I have tried removing the binding and reinstalling it, I have tried restarting everything, I have tried removing the “unknown” device and adding it again. All to no avail.

Does anyone know how I can force the snapshot to update to the latest software. My apt source is http://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main

I am using
apt-get update
apt-get upgrade

Any help in solving this would be greatly appreciated.

Just for completeness, I also noticed that after installing the snapshot the init.d file was there but nothing was populated in the rcX.d folders so my installation is no longer starting automatically at reboot. Not sure why that would be the case.

Not sure on the binding issue, but you perhaps need to follow the steps that would have been printed if it were a “clean” install.

# this is a fresh installation                                                                                                                                              
if [ -x /bin/systemctl ] ; then
    echo "### NOT starting on installation, please execute the following statements to configure openHAB to start automatically using systemd"
    echo " sudo /bin/systemctl daemon-reload"
    echo " sudo /bin/systemctl enable openhab2.service"
    echo "### You can start openhab2 by executing"
    echo " sudo /bin/systemctl start openhab2.service"
elif [ -x /usr/sbin/update-rc.d ] ; then
    echo "### NOT starting openhab2 by default on bootup, please execute"
    echo " sudo update-rc.d openhab2 defaults"
    echo "### In order to start openhab2, execute"
    echo " sudo /etc/init.d/openhab2 start"
fi

Thanks for your response. I had manually added the links for the rcX.d startups so I deleted those and ran the update-rc.d openhab2 defaults command which created them “as if” it’s a new install.

I am still not sure why I am not getting the latest software, I am considering doing a clean install after all. - I am reluctant because of the amount of configuration and customization I have already done but I do have a back up that I can restore the configuration from. - I am not sure how the zwave stuff will work, if I will need to re-link everything or if it will just work after I restore everything.

I solved this by doing the following:

sudo apt-cache show openhab2

It showed what I have installed

sudo apt search openhab2

this showed the latest package available.
I could see that they were different.

I did a sudo apt-get clean
then
sudo apt-get update
sudo apt-get upgrade

and sure enough the latest version downloaded and installed. Now to see if this update actually fixed the zwave stuff that I originally wanted to fix!

Although this allowed me to update the snapshot of openhab2 it failed to update the bindings, no matter what I do I can’t get the latest bindings to load. I still have version 2.1.0.201702121957 when my openhab is dated 03/17/17. I have tried removing it and replacing it but it’s still not updating. See this thread too

openHAB seems to be pretty fickle about “letting go” of “bundles” that it already knows about. I’ve been wrestling with this, mainly unsuccessfully. When I replace the .jar in /usr/share/openhab2/addons alone, it doesn’t seem to “take” for a couple sudo service openhab restart cycles.

I seem to have somewhat better luck with:

  • Opening the console and using bundle:list to find the bundle ID
  • bundle:stop <ID>
  • Shut down openHAB
  • Install the new .jar into /usr/share/openhab2/addons
  • Start openHAB,
  • bundle:start <ID>
  • Restart openHAB (so everything initializes properly)

That may be overkill, or there may be a better way to do it, but it was killing me last night when I was trying to successfully install a series of versions of a locally built binding to test it.

I looked at doing this but I can’t find the jar file for the zwave binding. I looked here but there was no zwave jar. I have been using the paperUI to install it and uninstall it. I did use the karaf console to stop it before I uninstalled it but it made no difference. I have tried removing it from the console too but that doesn’t make a difference. I removed the zwave directory in /var/lib/openhab2/tmp/mvn/org/openhab/binding and that makes no difference I just can’t get this thing to load the latest binding. I have never really looked at it before but I can see a bunch of my binding are still from Feb. - I am not sure what else I can do at this stage. I am thinking of a clean install but hate to have that pain. - Even with backups it will take a significant effort to get everything working again.

Yeah, the .jar files are, I believe, downloaded into that tmp directory on command.

I yanked that one out to be “safe” and installed mine into yet the third place that openHAB spreads its configuration, /usr/share/openhab2/addons

$ cat  /usr/share/openhab2/addons/README 
This folder can be used to deploy artifacts into the openHAB runtime.

How do you get the jar file into the tmp directory? I figured this out but the jar file was the old one. To get this to load properly I had to purge openhab2 using apt and then reinstall it. Once I did that I got the latest binding and the latest openhab2.