Hi,
The behaviour of my OpenHAB installation has become pretty similar as my 20 year old lawnmower. It’s very hard to turn it on, but once it is running, it will run forever.
When I have done a lot of configuration, I sometimes notice my rules start becoming unstable. This is typically solved by a restart of OH. Also when the OS OH is running on needs to be upgraded, OpenHAB is restarted.
After the reboot, I noticed that some things are staying “Uninitialized”. See screenshot:
If you look at the two Chromecast things, you might notice it is not binding specific. One Chromecast is online, the other one Uninitialized. The problem is always with the same things.
No strange elements in openhab.log. And I can restart as much as I want, those Things will remain “Uninitialized”.
When I stop OpenHAB, and clear the /cache and /tmp folder, and then restart. All the things that didn’t get initialized first, get initialized perfectly. This behaviour is very consistent. Clearing those folders always solves this problem.
However, when booting OH after clearing /cache and /tmp, I get another problem. The two addons in my /addon folder generate errors.
In openhab.log I get this:
2017-07-20 18:27:44.915 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.connectsdk-2.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.connectsdk [10]
Unresolved requirement: Import-Package: com.google.common.base; version="10.0.1"
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:392)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)[4:org.apache.felix.fileinstall:3.5.6]
2017-07-20 18:27:44.926 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.voice.pollytts-2.1.0-SNAPSHOT-20170615.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.voice.pollytts [9]
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:392)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)[4:org.apache.felix.fileinstall:3.5.6]
2017-07-20 18:27:45.934 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.connectsdk-2.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.connectsdk [10]
Unresolved requirement: Import-Package: com.google.common.base; version="10.0.1"
This problem is solved by… restarting OpenHAB. However, in that case my other Things (mentioned earlier) do not get initialized anymore.
So as a summary:
- I restart OpenHAB (for some reason);
- ChromeCast and Netatmo Things do not get initialized;
- I stop OH - clear /cache and /tmp and restart OH;
- ChromeCast and Netatmo get initialized, but ConnectSDK and Polly TTS binding generate errors;
- I stop and start OH (so I do not clear any cache/tmp);
- ChromeCast and Netatmo do not get initialized, but ConnectSDK and Polly TTS run fine;
There is one thing I can do to get them all working: If I stop OH, do an apt-get update followed by and apt-get upgrade:
- ChromeCast and Netatmo get initialized, but ConnectSDK and Polly TTS binding generate errors;
- I stop and start OH (so I do not clear any cache/tmp);
- Everything works fine;
Obviously, this solution only works when there is a new release. Luckily I have a snapshot installation, so I have the opportunity to do this every few days. So I just upgraded to Build #988. As long as I don’t restart OH, everything is fine.
Does anyone have an idea what this could be?
What is apt-get upgrade doing to my installation so I don’t get the errors anymore? Maybe I can do that manually, so I don’t need to wait for a new release to solve my problem.