Celaeno1
(Alex)
April 27, 2017, 2:59pm
1
I have an OH2 online SNAPSHOT installation.
In service.cfg :
package = standard
remote = true
I read the following topics before:
FAQ - Frequently Asked Questions about openHAB 2
The main reference for openHAB 2 is the documentation at http://docs.openhab.org . Below you can find frequently asked questions surrounding openHAB 2 and the migration from openHAB 1.x.
This thread is a Wiki Thread - Everyone can add content to it!
Please add questions and appropriate short answers as they arise.
¶ General
¶ What’s openHAB 2?
Have a look at: http://docs.openhab.org
¶ What are the differences compared to openHAB 1.x
There a…
Hello Guys.
I’ve installed the HabPanel from the OH2 Beta4 installer… But how can i be sure to allways get new stuff and updates when something is updated on the Git? Is there a smart way of upgrading the HabPanel?
Hi.
I use OH 2.1 Snaphot Build 826, and try to update binding using this command:
openhab> bundle:list -s | grep harmony
228 | Active | 80 | 2.1.0.201702121957 | HarmonyHub Binding | org.openhab.binding.harmonyhub
openhab> bundle:update 228
Is this right way to do bindings updates?
Is that command download latest version and install it?
and many other…
Thus I tried:
bundle:update (in my example: = 218 = hamonyhub) → result: harmony binding was only uninstalled, nothing else!! (Then I installed it again…)
bundle:uninstall 219 -->result: harmony binding was uninstalled!! (OK!)
PaperUI : Installed Harmony Binding → OK
Expected it will now be the newest version available, → failed → same version as before!
bundle:uninstall 220 -->result: harmony binding was uninstalled!! (OK!)
Went to folder: \userdata\tmp\mvn\org\openhab\binding\org.openhab.binding.harmonyhub and deleted all files and subfolders.
PaperUI : Installed Harmony Binding → OK
Now the newest version of harmony binding is available! → OK!
What did I miss, what was wrong?
Is it a bug or a feature?
I expected that an uninstallation will also delete the files from harddisk or a new installation of the same binding will overwrite the old ones.
Edit: If a binding never was installed before, then the newest is installed from remote.
sihui
(SiHui)
April 30, 2017, 10:58am
2
I had the same problem and your solution worked also for me.
I’m pretty sure it is not a feature, so I opened an issue on github:
opened 10:57AM - 30 Apr 17 UTC
To update a snapshot binding one should uninstall and then install the binding a… gain.
This does not work (anymore?) either through PaperUI nor Karaf console.
Related community issue:
https://community.openhab.org/t/karaf-console-bundle-uninstall-and-bundle-update-not-running-as-expected/27444
My setup:
openHAB2 snasphot #858, manual install on RPi, user:group openhab:openhab (installed through official docs, no other issues with openHAB2!).
addons.cfg:
```
package = minimal
remote = true
```
Manually deleting all files in
`\userdata\tmp\mvn\org\openhab\binding\org.openhab.binding.harmonyhub`
between uninstalling a binding and then reinstalling the binding solves the issue.
Celaeno1
(Alex)
April 30, 2017, 6:09pm
3
Thanks a lot. Also have Snapshot Build 858. Maybe that’s the problem…
AFAIK the “Online-Repo” is here: --> last updated Apr 26, 2017
e.g. Harmonyhub Binding is there:
HarmonyHub Binding
When will there normally be the latest version?
I thought “nightly” means “once a night”??
Who knows the exact update frequency?
But this is not the origin of the problem. When I try to update e.g. build 858 (or earlier) to above shown (latest available version) I always get the same .jar as it was in build 858 (or earlier). After deleting \userdata\tmp\mvn\org\openhab\binding\org.openhab.binding.harmonyhub it updates to:
211 | Active | 80 | 2.1.0.201704261428 | HarmonyHub Binding
which is exactly above mentioned version…
sihui
(SiHui)
May 2, 2017, 2:45pm
5
Kai
(Kai Kreuzer)
May 2, 2017, 3:21pm
6
This was correct until last weekend
Please see my post here about the move of this repo . Sorry for the inconveniences
1 Like
@Kai Ok, thank you very much for this information!
@sihui Yes, there are the “offline” files. For downloading manually, unzip them and install a new distro or to put them to addons folder. But if you use Paper UI to install a binding, the online-repo was until last weekend:
https://bintray.com/openhab/mvn/online-repo/2.1.nightly
and now is:
https://openhab.jfrog.io/openhab/online-repo-snapshot/2.1
sihui
(SiHui)
May 2, 2017, 4:36pm
9
Yes, that is how I use it
But once installed, you are also able to update a binding via uninstalling/installing.
I closed the github issue because now we know the reason …
@Kai @sihui
I tested the new online-repo!
Uninstalled (e.g) allplay and harmonyhub bindings.
Changed the following files with the new repo-path:
userdata/etc/version.properties
userdata/etc/org.ops4j.pax.url.mvn.cfg
deleted the following folders:
\userdata\tmp\mvn\org\openhab\binding\org.openhab.binding.allplay
\userdata\tmp\mvn\org\openhab\binding\org.openhab.binding.harmonyhub
Installed allplay and harmonyhu b again:
and now I have the newest versions:
bundle:list
238 | Active | 80 | 2.1.0.20170501 1011 | HarmonyHub Binding
239 | Active | 80 | 2.1.0.20170501 1011 | AllPlay Binding
@Kai Why one have to delete the binding-folders manually? Should it not been overwritten automatically?
sihui
(SiHui)
May 2, 2017, 5:53pm
11
This gets even more weird:
On a manual installed #906 build, comes with:
198 | Active | 80 | 2.1.0.20170426 1428 | HarmonyHub Binding
Uninstalled harmony binding via PaperUI, installed harmony binding via PaperUI:
2017-05-02 19:37:19.633 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled ‘openhab-binding-harmonyhub’
218 | Active | 80 | 2.1.0.20170426 1428 | HarmonyHub Binding
Still same version of the binding.
Uninstalled harmony binding, deleted the files in the /tmp … directory, installed the harmony binding again via PaperUI:
219 | Active | 80 | 2.1.0.20170426 1428 | HarmonyHub Binding
Still old version. I guess I have to reopen the git issue … there seems to be definitely something wrong, because this has worked before (without deleting the binding files manually).
BTW, restarting openhab2 service did not help either.
Did you check?
\userdata/etc/version.properties
userdata/etc/org.ops4j.pax.url.mvn.cfg
sihui
(SiHui)
May 2, 2017, 6:34pm
13
No. I won’t go any deeper into this or tweak my system, this update “thing” has to be a feature from openHAB and not from me tinkering around in system files.
Kai
(Kai Kreuzer)
May 3, 2017, 7:19am
14
No idea, I would expect it to work as well. Did it work in the past?
openHAB uses plain Apache Karaf features here, so maybe someone could check how Karaf handles the updates from remote snapshot repos.
@Kai
Kai:
Did it work in the past?
I didn’t use this in the past. But after several “harmonyhub” issues (March/April 2017), I tried a recommendation of wborn from this topic:
The best way to upgrade depends on what kind of installation you have:
If you already have a org.openhab.binding.harmonyhub-2.1.0-SNAPSHOT.jar in your /addons directory you can simply replace that one.
When you have a OH 2.1.0-SNAPSHOT installation and use the online repository, uninstalling and reinstalling the Harmony Binding should upgrade it.
After updating, the command:
bundle:list|grep Harmony
should show a version from April 24th or newer, e.g. 2.1.0.201704251551 when using the onlin…
I only use addons directory for inofficial or testing or my own bindings. All officially were installed via PaperUI or are inside addons.cfg.
But it never worked that (wborn’s recommended) way. (uninstall and install it again).
So I opened my own topic, here… (this one!)
sihui
(SiHui)
May 3, 2017, 12:07pm
16
Kai:
Did it work in the past?
Yes (manual install, not repo).
Kai:
maybe someone could check how Karaf handles the updates from remote snapshot repos.
See first post, @Celaeno1 already did that without success.
Kai
(Kai Kreuzer)
May 3, 2017, 2:49pm
17
What I meant was to check the Karaf documentation or its user forum on how this is designed to work.
sihui
(SiHui)
May 3, 2017, 5:25pm
18
Kai:
What I meant was to check …
That’s a whole different story then
From what I’ve found upgrading should even be possible with just installing the feature (Karaf 4). In Karaf 3 you have to uninstall the feature first and then reinstall the feature.
http://karaf.922171.n3.nabble.com/Feature-and-Karaf-upgrades-tt4047334.html#a4047336
http://karaf.apache.org/manual/latest/#_features_upgrade
@Kai @sihui
For me it’s now enough to know how it works:
I edited (checked) the following files:
\userdata\etc\ version.properties
\userdata\etc\ org.ops4j.pax.url.mvn.cfg
\userdata\config\org\ops4j\pax\url\ mvn.config
I checked if there are the following (correct) entries:
version.properties
online-repo : https://openhab.jfrog.io/openhab/online-repo-snapshot/2.1
org.ops4j.pax.url.mvn.cfg
org.ops4j.pax.url.mvn.repositories = https://openhab.jfrog.io/openhab/online-repo-snapshot/2.1@id=openhab@snapshots
mvn.config
org.ops4j.pax.url.mvn.repositories="https://openhab.jfrog.io/openhab/online-repo-snapshot/2.1@id\=openhab@snapshots"
Then I uninstall my binging(s) that should be updated via PaperUI
or I remove them from \conf\services\ addons.cfg
Then I go to the following folder:
\userdata\tmp\mvn\org\openhab\binding and delete the corresponding folder of the binding, eg:
org.openhab.binding.harmonyhub
Then I put the entry back to \conf\services\ addons.cfg
or install it via PaperUI again.
Then the newest available version of the binding will be downloaded from above Online-Repo.
Ready!
1 Like
sihui
(SiHui)
May 3, 2017, 5:38pm
20
Nice workaround … but in my opinion the upgrade procedure should be fixed, there are a lot of users out here who don’t like to mess with system files (and they should not have to do that).
1 Like