New install: Ubuntu or Windows

Yes… And no. If you gift the laptop and you’re techie, your just know you’ll be stuck doing support on it forever. And I like the fact that a laptop had a built in UPS (and at a pinch, terminal)

1 Like

I really didn’t realise the benefit of this, until our house power failed, now I have all Velbus kit, all the (main) house lighting, VDSL, LAN, ODroid UX4 OH2, central heating and (main) hot water running from a 3KVA APC SmartXL UPS, with a 54AH 48v battery bank.

I would strongly recommend using a half decent laptop with a Linux headless (No GUI) OS of some kind.

The installation instructions for OH2 refer to Azul Zulu 8 Java and I have noticed that it does give a better experience.

(Some things just don’t seem to work properly when running with Oracle Java 8, for example the Online Widget library within HabPanel)

another vote for Ubuntu. I’d always used PCs and Macs, but Ubuntu was definitely the right call. A much wider community to call on for help. Plus, if you’re anything like me, you’ll end up with numerous small scripts supporting openHAB and controlling devices for which there isn’t a binding (or reliable binding), and Ubuntu is just a better platform for that.

1 Like

I decided to go with the laptop, ubuntu 18.04. I installed from repositories (apt), using the instructions here:

But OH won’t start.

	skip@OpenHab-PC:~$ sudo systemctl status openhab2.service
openhab2.service - openHAB 2 - empowering the smart home
  Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
  Active: activating (auto-restart) (Result: exit-code) since Sat 2018-08-18 11:15:51 EDT; 635ms ago
    Docs: https://www.openhab.org/docs/
          https://community.openhab.org
 Process: 1986 ExecStart=/usr/share/openhab2/runtime/bin/karaf $OPENHAB_STARTMODE (code=exited, status=255)
Main PID: 1986 (code=exited, status=255)

The logs weren’t exactly helpful:
(full paste here: https://pastebin.com/raw/Ahh48YEh)

 2018-08-18 11:10:33.120 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework
 java.lang.RuntimeException: Error occurred while checking the system module.
         at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:311)
         at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:87)
         at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:68)
         at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
         at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
         at org.apache.karaf.main.Main.launch(Main.java:256)
         at org.apache.karaf.main.Main.main(Main.java:179)
 Caused by: org.osgi.framework.BundleException: Invalid manifest header Export-Package: "org.osgi.dto;version="1.0"
 
 *snip*
 
 ;uses:=org.apache.karaf.diagnostic.core;version=4.1.5"
         at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:353)
         at org.eclipse.osgi.container.builders.OSGiManifestBuilderFactory.createBuilder(OSGiManifestBuilderFactory.java:85)
         at org.eclipse.osgi.storage.Storage.getBuilder(Storage.java:632)
         at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:263)
         ... 6 more

Did I miss a step?

Is this a SNAPSHOT install? If yes, then the error could be temporary, try earlier or next SNAPSHOT. If its stable then check your Java.
Zulu and Oracle should have no issues. Not sure about openjdk that comes with official ubuntu.

If this is the “first time” you’ve started OH2, remember that it can take AGES for it to fully set it’s self up.

My advice…

Start it

Walk away

Make lunch

Come back and have a look.

Once it’s running, it’ll be solid, but it does take its sweet time initially :slight_smile:

It is the stable release (sorry, I should have mentioned that)

I will let it sit while I eat lunch :slight_smile:

It’s been “running” for almost two hours, but it’s still not “staying running”. Every five to six seconds it starts and fails with the log message that I posted earlier. It’s been doing that for two hours now.

https://pastebin.com/raw/3bP0Ua6g

I’ll let it run longer if you guys think that’s what I need to do.

Did you check Java vendor? Oracle and Zulu are known to work fine.

I installed the ubuntu default-jdk

apt-get install default-jdk

Perhaps I should uninstall that and try the oracle?

Yes I would suggest Oracle JDK.

1 Like

No need to answer that. I uninstalled the ubuntu default, installed oracle, bada bing bada boom, it works.

Thanks for the suggestion!

2 Likes

That’s interesting…

I was running Oracle and found that some small bits didn’t work properly.

Can you check…

…:8080/habpanel/index.html#/settings/widgets

Import Widgets
Import from Gallery

I found that the pop up appeared, but it never populated.

Changing to Azul Zulu Embedded 8 (or Zulu 8, depending on your OS) meant that it populated and other things just seem to work that little bit better.

For awhile perhaps. I learned that my battery had completely died during a power outage when I had everything on an old laptop. If you are going to rely on the laptop battery as ups, make sure to pay attention to the battey’s health.

2 Likes

I wonder if Linux got drivers to read that info. My Sony laptop battery health is reported by windows 7, but not sure how to read that from Linux. I am ok if its from command line through proc or sysfs.

I don’t use a laptop for this purpose but on my Ubuntu laptop the battery health is available though the UI
I found this, if that helps:

1 Like

native-path: BAT1
vendor: Sony Corporation
power supply: yes
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
warning-level: none
energy: 15.82 Wh
energy-empty: 0 Wh
energy-full: 19.79 Wh
energy-full-design: 51.06 Wh
energy-rate: 0.011 W
voltage: 11.919 V
percentage: 79%
capacity: 38.7583%
technology: lithium-ion
icon-name: ‘battery-full-charging-symbolic’

It still says warning level “none”. But the capacity 38.75% may be an indicator that the battery is at warning level, as the win7 reports it so. The capacity % and health indicator should be mapped.

It’s a 5 year old laptop…
I assume that the battery is the same age.
Maybe time to invest in a fresh battery. If you will be running the laptop on mains 99.9% of the time as a headless server, the new battry should last forever.

I’d avoid Windows 10, too many updates without the chance to defer them and too much junk running in the background that’s difficult / impossible to turn off, and keep turned off.
I run Debian on a dedicated mini PC and despite being a relative Linux Newbie I’d not touch Windows 10 for reliable, uninterrupted 24/7 work.

2 Likes

I’d also recommend Acronis True Image or a similar disk image saving software, and save an image of the whole partition to somewhere safe from time to time. Booting this from USB has saved me a lot of work when an unexpected power outage bricked Debian after the next reboot