I want to make sure I’m doing this switch over right. My initial install of OpenHAB was by apt-get using the snapshot Online version(Bindings are not stored on my computer). So I should issue the following commands to change over to the new repository and update openhab:
Yup that should work for you too.
Here a little more info to the syntax that @Udo_Hartmann used: https://wiki.debian.org/AptPreferences
just in case you were wondering…Udo’s solution addressed a more specific use case (those that are on stable or beta releases and want to install the unstable branch anyway).
Just for reference: If you see the following error, it’s about time to follow the instructions posted above.
Err https://openhab.ci.cloudbees.com Packages
HttpError404
Get:53 https://openhab.ci.cloudbees.com Packages [369 B]
Err https://openhab.ci.cloudbees.com Packages
HttpError404
Fetched 9,105 kB in 21s (429 kB/s)
W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/Packages HttpError404
W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/Packages HttpError404
E: Some index files failed to download. They have been ignored, or old ones used instead.
Hi, I always just downloaded and extracted the latest offline snapshot artifact from cloudbees. Where are the artifacts built now? I can only see the betas on Bintray…
The snapshot artifacts can be found in the same place in cloudbees but openhab-offline is missing as openHAB process of making one single package.
This means that openhab2-online and openhab2-offline will become simply openhab2. For those looking for the offline installation, an additional addons pack can be used. This is still being tested but you can be sure that there will be more details in an announcement soon.
just performed the following steps and everything works fine with the “new” repos.
Great job, guys!
sudo service openhab2 stop
sudo tar cvfz OH2_config_save_11_01_2017.tgz /etc/openhab2/ /var/lib/openhab2/ /usr/share/openhab2/addons/
sudo apt-get --force-yes remove openhab2-offline
sudo apt-get install openhab2
cd / && tar xvfz OH2_config_save_11_01_2017.tgz
Edited again /usr/share/openhab2/runtime/bin/setenv to add
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0
and then came the moment: sudo service openhab2 start
awaiting another night of having to correct or restore configurations or returning to a saved image of the SD-card.
BUT: everything works perfect, all devices (things) and rules are up and running, the Android Pad in the corridor shows up the latest HabPanel modifications…
Just out of curiosity: Is it anywhere documented to do it that way?
I ask, because this file should not been touched by users - instead the environment variable ${JAVA_OPTS} should be set.
the following setting has to be added/adapted on your system in file /etc/default/openhab2:
EXTRA_JAVA_OPTS=“-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyAMA0”
What about updating the beta release? Do I just use:
echo ‘deb http://dl.bintray.com/openhab/apt-repo2 testing main’ | sudo tee /etc/apt/sources.list.d/openhab2.list
sudo apt-get update
sudo apt-get upgrade
The last addons repo update went wrong and seems to have bricked my Raspberry Pi.
See the attached log. Maybe you can get some info out of it to make the process more stable.
I think I’ll try the latest raspbian to get set up again (currently I was running a setup using apt-get.
pi@raspberrypi:~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
openhab2 openhab2-addons
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 187 MB of archives.
After this operation, 27.6 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://dl.bintray.com/openhab/apt-repo2/ unstable/main openhab2 all 2.0.0~20170115042227-1 [52.1 MB]
Get:2 http://dl.bintray.com/openhab/apt-repo2/ unstable/main openhab2-addons all 2.0.0~20170115042227-1 [135 MB]
Fetched 187 MB in 34s (5,401 kB/s)
Reading changelogs... Done
(Reading database ... 37244 files and directories currently installed.)
Preparing to unpack .../openhab2_2.0.0~20170115042227-1_all.deb ...
Unpacking openhab2 (2.0.0~20170115042227-1) over (2.0.0~20170112185728-1) ...
Preparing to unpack .../openhab2-addons_2.0.0~20170115042227-1_all.deb ...
Unpacking openhab2-addons (2.0.0~20170115042227-1) over (2.0.0~20170112185728-1) ...
dpkg: error processing archive /var/cache/apt/archives/openhab2-addons_2.0.0~20170115042227-1_all.deb (--unpack):
error setting ownership of `./usr/share/openhab2/addons/openhab-addons-2.0.0-SNAPSHOT.kar': Read-only file system
dpkg: error while cleaning up:
unable to remove newly-extracted version of `/usr/share/openhab2/addons/openhab-addons-2.0.0-SNAPSHOT.kar': Read-only file system
dpkg: error while cleaning up:
unable to securely remove '/var/lib/dpkg/tmp.ci': Read-only file system
dpkg: error while cleaning up:
unable to securely remove '/var/lib/dpkg/reassemble.deb': Read-only file system
Processing triggers for systemd (215-17+deb8u5) ...
dpkg: unrecoverable fatal error, aborting:
unable to flush updated status of `systemd': Read-only file system
E: Sub-process /usr/bin/dpkg returned an error code (2)
E: Failed to write temporary StateFile /var/lib/apt/extended_states.tmp
Hi MikeH!
After executing this the echo part and the wget part I try to run: sudo apt-get install -t unstable openhab-online
E: Value “unstable” not allowed for APT::DEFAULT-RELEASE, value is not available.
What do I make wrong -how can I correct this.
I make a fresh installation on a raspberry PI with actual image.
Thanks for your help.
Georg