I installed OpenHAB2 following the instructions for PI and Linux using the “Package Repository Installation”.
The installation was done on a fresh homegear image (Raspian) from this page: https://www.homegear.eu/index.php/Downloads
If I start openHAB2 with “sudo start.sh” from /usr/share/openhab2/, everything is fine.
But when I use “sudo /etc/init.d/openhab2 start” or with autostart, I get the following error:
Okt 23 19:42:24 homegearpi systemd[1]: Started openHAB 2 - empowering the smart home.
Okt 23 19:42:24 homegearpi start.sh[6897]: Launching the openHAB runtime…
Okt 23 19:43:31 homegearpi start.sh[6897]: wiringPiSetup: Must be root. (Did you forget sudo?)
Okt 23 19:43:31 homegearpi systemd[1]: openhab2.service: main process exited, code=exited, status=1/FAILURE
Okt 23 19:43:32 homegearpi stop[7664]: stop: Ignoring predefined value for KARAF_HOME
Hello Albert,
the homegear image comes preinstalled with openhab and judging by this line it’s still openHAB 1.8. I would guess that’s your problem, you have now two conflicting versions installed. The mentioning of “wiringPiSetup” is also uncommon to me. Not sure if it’s part of the normal openHAB setup.
To solve your problem, you should uninstall both versions and then start fresh with openHAB 2 following the guide.
However this will be bothersome. Consider installing openHABian on your Raspberry Pi. It’s an extended Raspbian setup with openHAB pre-installed. From the included menu (sudo openhabian-config) you can install homegear with one click. So it’s similar to the homegear image but “the other way around”.
!ENTRY org.glassfish.hk2.osgi-resource-locator 4 0 2016-10-29 15:36:32.500
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.apache.karaf.features.internal.service.FeaturesServiceImpl$3.end()
at org.eclipse.osgi.internal.framework.OSGiFrameworkHooks$CoreResolverHookFactory.handleHookException(OSGiFrameworkHooks.java:164)
at org.eclipse.osgi.internal.framework.OSGiFrameworkHooks$CoreResolverHookFactory$CoreResolverHook.end(OSGiFrameworkHooks.java:340)
at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolve(ModuleResolver.java:901)
at org.eclipse.osgi.container.ModuleResolver.resolveDelta(ModuleResolver.java:111)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:479)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:427)
at org.eclipse.osgi.container.Module.start(Module.java:416)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1498)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Hey,
it’s probably a good idea to do things step by step. However installing addons should not result in a problem of the whole system! A few bindings need special privileges on your system (which you can give without the need to execute as root) and the denon binding might be one of these.
Do you still see the line "wiringPiSetup: Must be root. (Did you forget sudo?)"
I do not and this is obviously the problem here.