New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openhab2 install via apt-get #66

Closed
stefaanbolle opened this Issue Jan 13, 2016 · 30 comments

Comments

Projects
None yet
@stefaanbolle

stefaanbolle commented Jan 13, 2016

First of all a big thank you for the excellent work on Openhab!
I have a running 1.8.0 version with a lot of bindings and I want to migrate to 2.0 beta1.

To ease installation, would it be possible to make a debian repository available (like 1.8.0) with the beta release and bindings to install the latest release via apt-get on my raspberry pi2?

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Jan 13, 2016

Member

Yes, offering debian packages is definitely planned, but not yet available.
This is probably the right moment to ask @theoweiss to start looking into this :-)

Member

kaikreuzer commented Jan 13, 2016

Yes, offering debian packages is definitely planned, but not yet available.
This is probably the right moment to ask @theoweiss to start looking into this :-)

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Jan 15, 2016

Member

FTR: First skeleton in #73

Member

kaikreuzer commented Jan 15, 2016

FTR: First skeleton in #73

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Jan 15, 2016

Member

To clarify:
There should be imho only a single debian package created for the distro (or at most 2 packages: one for the online distro and one for the offline distro).
Add-ons should NOT be managed as apt packages anymore, since this is now all handled through Karaf (which also has the information about dependencies between bundles etc.).

Member

kaikreuzer commented Jan 15, 2016

To clarify:
There should be imho only a single debian package created for the distro (or at most 2 packages: one for the online distro and one for the offline distro).
Add-ons should NOT be managed as apt packages anymore, since this is now all handled through Karaf (which also has the information about dependencies between bundles etc.).

@stefaanbolle

This comment has been minimized.

Show comment
Hide comment
@stefaanbolle

stefaanbolle Jan 15, 2016

@kaikreuzer
Does this mean that all we have to do is install the distro and karaf will take care of getting the addon jars (online) or already has the addon jars (offline) in its distro package?

stefaanbolle commented Jan 15, 2016

@kaikreuzer
Does this mean that all we have to do is install the distro and karaf will take care of getting the addon jars (online) or already has the addon jars (offline) in its distro package?

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
Member

kaikreuzer commented Jan 15, 2016

@stefaanbolle

This comment has been minimized.

Show comment
Hide comment
@stefaanbolle

stefaanbolle Jan 15, 2016

nikobus binding is not in the list.
Can I still copy the binding jar to ./addons?

stefaanbolle commented Jan 15, 2016

nikobus binding is not in the list.
Can I still copy the binding jar to ./addons?

@dvanherbergen

This comment has been minimized.

Show comment
Hide comment
@dvanherbergen

dvanherbergen Jan 15, 2016

Contributor

You can try. It has not been tested with 2.0 yet.

Contributor

dvanherbergen commented Jan 15, 2016

You can try. It has not been tested with 2.0 yet.

@stefaanbolle

This comment has been minimized.

Show comment
Hide comment
@stefaanbolle

stefaanbolle Jan 15, 2016

I have touched a lot of wood :-) but a lot of my addons are currently not running smooth.
Openhab2 does not give any error on the nikobus binding, but my light channel doesn't respond to the opnehab2 switch action to turn it on or off.
a lot of trial and error and troubleshooting coming ahead :-)
Btw this becomes way to far off topic.
Thanks Kai for your assistance!

stefaanbolle commented Jan 15, 2016

I have touched a lot of wood :-) but a lot of my addons are currently not running smooth.
Openhab2 does not give any error on the nikobus binding, but my light channel doesn't respond to the opnehab2 switch action to turn it on or off.
a lot of trial and error and troubleshooting coming ahead :-)
Btw this becomes way to far off topic.
Thanks Kai for your assistance!

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Jan 15, 2016

Member

Openhab2 does not give any error on the nikobus binding

Always enable debug logging (see "log:set" as shown here) when you want detailed logs.

Btw this becomes way to far off topic.

You are right, let's stop here and continue in the forum if necessary!

Member

kaikreuzer commented Jan 15, 2016

Openhab2 does not give any error on the nikobus binding

Always enable debug logging (see "log:set" as shown here) when you want detailed logs.

Btw this becomes way to far off topic.

You are right, let's stop here and continue in the forum if necessary!

@theoweiss

This comment has been minimized.

Show comment
Hide comment
@theoweiss

theoweiss Jan 15, 2016

Member

@kaikreuzer I've almost overlooked this. Ok, I will start to work on the packaging things.

Member

theoweiss commented Jan 15, 2016

@kaikreuzer I've almost overlooked this. Ok, I will start to work on the packaging things.

@drock1985

This comment has been minimized.

Show comment
Hide comment
@drock1985

drock1985 Jan 17, 2016

Hi @theoweiss

Did you have a chance to get the OH2 beta in repository? Would love to test this out on a spare RPI that I have laying around.

drock1985 commented Jan 17, 2016

Hi @theoweiss

Did you have a chance to get the OH2 beta in repository? Would love to test this out on a spare RPI that I have laying around.

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Jan 17, 2016

Member

@drock1985 Why do you need an apt package for testing?

Member

kaikreuzer commented Jan 17, 2016

@drock1985 Why do you need an apt package for testing?

@drock1985

This comment has been minimized.

Show comment
Hide comment
@drock1985

drock1985 Jan 17, 2016

Hi @kaikreuzer

Don't need it, but in the end i'll be using apt-get as to install OH2 when it comes out of beta. Might as well test what I am sure will be the preferred install method right from the start, to see if there will be any problems.

drock1985 commented Jan 17, 2016

Hi @kaikreuzer

Don't need it, but in the end i'll be using apt-get as to install OH2 when it comes out of beta. Might as well test what I am sure will be the preferred install method right from the start, to see if there will be any problems.

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Jan 17, 2016

Member

øk, then just wait for news from @theoweiss on this issue, who is working on it.

Member

kaikreuzer commented Jan 17, 2016

øk, then just wait for news from @theoweiss on this issue, who is working on it.

@skatun

This comment has been minimized.

Show comment
Hide comment
@skatun

skatun Mar 15, 2016

Any release date set for the apt-get method for OH2?

skatun commented Mar 15, 2016

Any release date set for the apt-get method for OH2?

@mikef2501

This comment has been minimized.

Show comment
Hide comment
@mikef2501

mikef2501 Apr 11, 2016

I'm interested, too! Is there any sort of update or timeline?
Thanks a bunch!

mikef2501 commented Apr 11, 2016

I'm interested, too! Is there any sort of update or timeline?
Thanks a bunch!

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer Apr 11, 2016

Member

Just follow #138 and help testing it!

Member

kaikreuzer commented Apr 11, 2016

Just follow #138 and help testing it!

@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer May 23, 2016

Member

FTR: #213 has just been merged, so that the build now produces Debian packages. It would be great if you could go testing these and I will check with @theoweiss to soon put a version on Bintray as well.

Member

kaikreuzer commented May 23, 2016

FTR: #213 has just been merged, so that the build now produces Debian packages. It would be great if you could go testing these and I will check with @theoweiss to soon put a version on Bintray as well.

@theoweiss

This comment has been minimized.

Show comment
Hide comment
@theoweiss

theoweiss May 23, 2016

Member

You can test the current snapshot of the offline distribution by adding this line to your apt-sources:
deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/ /
or the online distribution by adding that line:
deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/ /

Member

theoweiss commented May 23, 2016

You can test the current snapshot of the offline distribution by adding this line to your apt-sources:
deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/ /
or the online distribution by adding that line:
deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/ /

@mckennajp

This comment has been minimized.

Show comment
Hide comment
@mckennajp

mckennajp May 27, 2016

apt install working great so far. On Ubuntu, I had to install apt-transport-https first (apt-get install apt-transport-https). Thanks a lot!

mckennajp commented May 27, 2016

apt install working great so far. On Ubuntu, I had to install apt-transport-https first (apt-get install apt-transport-https). Thanks a lot!

@mikef2501

This comment has been minimized.

Show comment
Hide comment
@mikef2501

mikef2501 May 27, 2016

I wiped the SD card on my Raspberry Pi 2 and did a clean install of Raspbian. After adding the apt-sources line for openhab-online, it required me to install apt-transport-https like mckennajp. Even though I did this and added the apt-key for openhab, it still gave me a warning that it couldn't authenticate and asked me if I wanted to continue without authentication.

I haven't had much time between work and kids, but so far it appears to have installed correctly. I installed the Phillips Hue module through the Paper GUI, then the base and lights, and can control the lights just fine.

I'll post more when I am able to spend some more time. Thanks!

mikef2501 commented May 27, 2016

I wiped the SD card on my Raspberry Pi 2 and did a clean install of Raspbian. After adding the apt-sources line for openhab-online, it required me to install apt-transport-https like mckennajp. Even though I did this and added the apt-key for openhab, it still gave me a warning that it couldn't authenticate and asked me if I wanted to continue without authentication.

I haven't had much time between work and kids, but so far it appears to have installed correctly. I installed the Phillips Hue module through the Paper GUI, then the base and lights, and can control the lights just fine.

I'll post more when I am able to spend some more time. Thanks!

@theoweiss

This comment has been minimized.

Show comment
Hide comment
@theoweiss

theoweiss May 27, 2016

Member

Thanks for testing. Good news so far.
The snapshot repo on cloudbees is not signed the upcoming bintray repo for the releases will be signed.

Member

theoweiss commented May 27, 2016

Thanks for testing. Good news so far.
The snapshot repo on cloudbees is not signed the upcoming bintray repo for the releases will be signed.

@abedwardsw

This comment has been minimized.

Show comment
Hide comment
@abedwardsw

abedwardsw May 30, 2016

I tested the openhab2-offline deb pkg as well, seems to work pretty good! Thanks for making this, will make updates much easier. Any thoughts on including habmin snapshot jar file as well? You could put it in a unused directory, then people who want it could put a symlink in addons, this way it's not on by default but it would get updated with the deb update. Not sure if there is plans to add it as a karaf bundle or not?

Probably unrelated, but when I used the offline version, the first startup I got the following error, which went away after a restart. Wanted to point it out just in case.

2016-05-29 14:22:36.235 [ERROR] [.glassfish.hk2.osgi-resource-locator] - FrameworkEvent ERROR - org.glassfish.hk2.osgi-resource-locator
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)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.OSGiFrameworkHooks$CoreResolverHookFactory$CoreResolverHook.end(OSGiFrameworkHooks.java:340)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolve(ModuleResolver.java:901)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleResolver.resolveDelta(ModuleResolver.java:111)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:479)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:427)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.Module.start(Module.java:416)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1498)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
2016-05-29 14:22:55.181 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-package-standard': Error restarting bundles
2016-05-29 14:22:55.206 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-package-standard': Error restarting bundles
2016-05-29 14:28:06.977 [ERROR] [org.eclipse.smarthome.io.rest       ] - FrameworkEvent ERROR - org.eclipse.smarthome.io.rest
java.lang.NoClassDefFoundError: org/eclipse/smarthome/io/transport/mdns/ServiceDescription
        at java.lang.Class.getDeclaredMethods0(Native Method)[:1.8.0_65]
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)[:1.8.0_65]
        at java.lang.Class.getDeclaredMethods(Class.java:1975)[:1.8.0_65]

abedwardsw commented May 30, 2016

I tested the openhab2-offline deb pkg as well, seems to work pretty good! Thanks for making this, will make updates much easier. Any thoughts on including habmin snapshot jar file as well? You could put it in a unused directory, then people who want it could put a symlink in addons, this way it's not on by default but it would get updated with the deb update. Not sure if there is plans to add it as a karaf bundle or not?

Probably unrelated, but when I used the offline version, the first startup I got the following error, which went away after a restart. Wanted to point it out just in case.

2016-05-29 14:22:36.235 [ERROR] [.glassfish.hk2.osgi-resource-locator] - FrameworkEvent ERROR - org.glassfish.hk2.osgi-resource-locator
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)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.OSGiFrameworkHooks$CoreResolverHookFactory$CoreResolverHook.end(OSGiFrameworkHooks.java:340)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolve(ModuleResolver.java:901)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleResolver.resolveDelta(ModuleResolver.java:111)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:479)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:427)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.Module.start(Module.java:416)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1498)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
2016-05-29 14:22:55.181 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-package-standard': Error restarting bundles
2016-05-29 14:22:55.206 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-package-standard': Error restarting bundles
2016-05-29 14:28:06.977 [ERROR] [org.eclipse.smarthome.io.rest       ] - FrameworkEvent ERROR - org.eclipse.smarthome.io.rest
java.lang.NoClassDefFoundError: org/eclipse/smarthome/io/transport/mdns/ServiceDescription
        at java.lang.Class.getDeclaredMethods0(Native Method)[:1.8.0_65]
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)[:1.8.0_65]
        at java.lang.Class.getDeclaredMethods(Class.java:1975)[:1.8.0_65]
@kaikreuzer

This comment has been minimized.

Show comment
Hide comment
@kaikreuzer

kaikreuzer May 30, 2016

Member

@abedwardsw I have seen such errors sometimes on a the first startup of a normal install as well - so this is not related to the apt installation.

Member

kaikreuzer commented May 30, 2016

@abedwardsw I have seen such errors sometimes on a the first startup of a normal install as well - so this is not related to the apt installation.

@maggu2810

This comment has been minimized.

Show comment
Hide comment
@maggu2810

maggu2810 May 30, 2016

Contributor

This is caused by the usage of optional resolution and so really not related to the Debian packages.

Contributor

maggu2810 commented May 30, 2016

This is caused by the usage of optional resolution and so really not related to the Debian packages.

@msth

This comment has been minimized.

Show comment
Hide comment
@msth

msth commented Jun 1, 2016

@modestos

This comment has been minimized.

Show comment
Hide comment
@modestos

modestos Jun 3, 2016

I personally tested the openhab2-online deb pkg on a beaglebone black with minimal debian installation on internal storage. It boots quite fast and starting service was snappy.

It works flawlessly, thx.

modestos commented Jun 3, 2016

I personally tested the openhab2-online deb pkg on a beaglebone black with minimal debian installation on internal storage. It boots quite fast and starting service was snappy.

It works flawlessly, thx.

@kaikreuzer kaikreuzer closed this Jun 12, 2016

@fharni

This comment has been minimized.

Show comment
Hide comment
@fharni

fharni Sep 1, 2016

Hi, I have a problem with the apt repository. As descriped I added the repository and does a apt-get update. This complains about a missing Packages entry in the release file.

W: Herunterladen von https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/Release fehlgeschlagen: Erwarteter Eintrag »Packages« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
W: Herunterladen von https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/Release fehlgeschlagen: Erwarteter Eintrag »Packages« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
E: Manche Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder durch alte ersetzt.

fharni commented Sep 1, 2016

Hi, I have a problem with the apt repository. As descriped I added the repository and does a apt-get update. This complains about a missing Packages entry in the release file.

W: Herunterladen von https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/Release fehlgeschlagen: Erwarteter Eintrag »Packages« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
W: Herunterladen von https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/Release fehlgeschlagen: Erwarteter Eintrag »Packages« konnte in Release-Datei nicht gefunden werden (falscher Eintrag in sources.list oder missgebildete Datei).
E: Manche Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder durch alte ersetzt.

@ThomDietrich

This comment has been minimized.

Show comment
Hide comment
@ThomDietrich

ThomDietrich Sep 23, 2016

Member

@fharni your sources file seems to be wrong. Please follow the instructions given here: http://docs.openhab.org/installation/linux.html

Member

ThomDietrich commented Sep 23, 2016

@fharni your sources file seems to be wrong. Please follow the instructions given here: http://docs.openhab.org/installation/linux.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment