openHABian hassle-free openHAB Setup

The problem with Bintray is only if you install from an older image, on a running system you just need to change the repos like you already did so I don’t think you have to do anything.

For what you want to do, there is no supported procedure, your openHABian is too old.
To get it up to latest you can try the commands below but be prepared and take a backup of your system first, just in case things go wrong.

[12:39:15] root@devpc:/home/markus# cd /opt/openhabian/
[12:39:21] root@devpc:/opt/openhabian# git checkout stable

Thanks a lot!

Hi,
I’m on it to migrate from Windows based to LInux Debian and installed openHABian few times over the past days and all works fine since yesterday :-/
It now appears that openHAB will now longer being installed as service and openhab User/Group is also missing. Was there a recent change which might cause this issue??

I followed official Docu at openHABian | openHAB which as I said worked before yesterday.

Detailesd Log from a Debain 10 (it doesn’t matter if I use Deb 9, 10 or 11)

> root@Skynet:~# openhabian-config unattended
> 2021-09-23_22:12:59_CEST [openHABian] Checking for root privileges... OK
> 2021-09-23_22:12:59_CEST [openHABian] Updating Linux package information... OK
> 2021-09-23_22:13:02_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
> 2021-09-23_22:13:02_CEST [openHABian] Adjusting swap size to 8192 MB... FAILED (swapoff)
> 2021-09-23_22:13:02_CEST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
> 2021-09-23_22:13:02_CEST [openHABian] Enabling time synchronization using NTP... SKIPPED
> 2021-09-23_22:13:02_CEST [openHABian] Setting locale based on openhabian.conf... OK (reboot required)
> 2021-09-23_22:13:13_CEST [openHABian] Setting hostname of the base system based on openhabian.conf... OK
> 2021-09-23_22:13:14_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
> 2021-09-23_22:13:14_CEST [openHABian] Enabling Audio output... OK
> 2021-09-23_22:13:14_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
> 2021-09-23_22:13:50_CEST [openHABian] Installing additional needed packages... OK
> 2021-09-23_22:14:41_CEST [openHABian] Installing pigpio package... FAILED
> 2021-09-23_22:14:42_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
> 2021-09-23_22:14:42_CEST [openHABian] Adding slightly tuned vim configuration file to system... OK
> 2021-09-23_22:14:42_CEST [openHABian] Downloading FireMotD... OK
> 2021-09-23_22:14:45_CEST [openHABian] Installing FireMotD... OK
> 2021-09-23_22:14:45_CEST [openHABian] Generating FireMotD theme... OK
> 2021-09-23_22:14:50_CEST [openHABian] Setting up FireMotD apt updates count service... FAILED (service enable)
> 2021-09-23_22:14:51_CEST [openHABian] Adding required keys to apt... OK
> 2021-09-23_22:14:53_CEST [openHABian] Adding Zulu repository to apt... OK
> 2021-09-23_22:14:55_CEST [openHABian] Installing Zulu 11 Enterprise 64-Bit OpenJDK... OK
> 2021-09-23_22:15:33_CEST [openHABian] Installing Java Zulu CEK to enable unlimited cipher strength... OK
> 2021-09-23_22:15:34_CEST [openHABian] Beginning install of latest openHAB3 release (stable)... OK
> 2021-09-23_22:15:34_CEST [openHABian] Adding required keys to apt... FAILED
> 2021-09-23_22:15:35_CEST [openHABian] Adding openHAB syntax to vim editor... OK
> 2021-09-23_22:15:36_CEST [openHABian] Adding openHAB syntax to nano editor... OK
> 2021-09-23_22:15:36_CEST [openHABian] Adding openHAB scheme to multitail... OK
> 2021-09-23_22:15:36_CEST [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... OK
> 2021-09-23_22:15:38_CEST [openHABian] Applying miscellaneous system settings... OK
> 2021-09-23_22:15:38_CEST [openHABian] Installing Samba... OK
> 2021-09-23_22:15:58_CEST [openHABian] Setting up Samba network shares... OK
> 2021-09-23_22:15:58_CEST [openHABian] Setting up Samba service... OK
> 2021-09-23_22:15:58_CEST [openHABian] Applying file permissions recommendations... FAILED (please execute after openHAB is installed)
> 2021-09-23_22:15:59_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... OK
> FAILED (adduser)
> /usr/local/bin/openhabian-config: line 116: custom_log: command not found
> 2021-09-23_22:16:14_CEST [openHABian] Skipping zram install as requested.2021-09-23_22:16:14_CEST [openHABian] Installing MTA required packages (mailutils, exim4, dnsutils)... OK
> OK
> 2021-09-23_22:16:34_CEST [openHABian] Beginning Mail Transfer Agent setup... sed: -e expression #4, char 22: unterminated `s' command
> OK
> 2021-09-23_22:16:34_CEST [openHABian] Creating MTA config... OK
> 2021-09-23_22:16:34_CEST [openHABian] Adding to john.doe@foo.bar email to system accounts... OK
> 2021-09-23_22:16:34_CEST [openHABian] tailscale VPN installation... SKIPPED (no preauthkey defined)
> 2021-09-23_22:16:34_CEST [openHABian] Setting up automated SD mirroring and backup... OK
> blockdev: cannot open /dev/sda: No such file or directory
> FAILED (bad destination)
> 2021-09-23_22:16:36_CEST [openHABian] Cleaning up... OK

Many thanks for assistance.

What’s the hardware ? Looks like RPi, but then you must not manually install but use the image.
Read the debug guide and provide a debug level log.

it’s a virtual Linux Container running on Proxmox. As said: All was fine few days ago (I installed this VM several times over the past days) I’ve created a step by step instruction for this, which also was working the day before yesterday. Since yesterday evening I run into this issue.

Again: what’s the hardware ? Your log looks like it believes you’re on RPi.
And what do you mean by ‘container’ - a VM ?

“it worked before” is useless to identify the reason here.

As said:

Sorry for being so explicit but you really have to give all relevant data, and you should always do that upfront. No potential helper wants to waste their time and motivation getting after this.

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

I’m entirely with you on this and will check it out to provide more and required information. MANY thanks for now.

Apologies for this: Knowing it’s useless for others to mention: it worked before and I didn’t change anything :rofl: (typical User view)

1 Like

Good Morning on this sunny Sunday (and even European Team is very much behind the US Team at Ryder Cup)

I’v created a debug Log yesterday
openHABian Error Log.pdf (393.7 KB)

I’m running a Proxmox virtualization Server and createx a virtual Container to run Debian and followed guide on openhab.org to automatically install openHABian on this on this system. My Container Configuration looks like LXC Configuration.pdf (312.4 KB)
if this might be important as well.

Hope this provides more information, otherwise I appreciate some advise what else might be helpful

Regards
Joerg

That is not debug level. Set debuglevel=maximum in openhabian.conf as the debug guide tells you to.

Now asking for the 3rd time… ?

I can only guess here that openHABian identifies your system as a RPi because of some weirdness with your virtualization stuff but I cannot confirm if you don’t provide the log I requested.
You can try to enforce what HW it believes it runs on by setting the hw and hwarch parameters in openhabian.conf to match your system BEFORE installation.

Bear with me as I thought this was answered with Proxmox and to have openHABian run as Container while I had provided Container Config as well. Anyway physical Hardware which runs Proxmox Server is a ZBOX BI329 (Barebone) with 8GB RAM

putty.log (281.4 KB)

That’s what I had done already, please find also modified openhabian.conf

modified openHABian Settings.pdf (245.7 KB)

Thanks for your patience.

I don’t think that is the answer Markus is asking for. He needs to know what hardware openHAB’s host is running on. If it is in a container, the hardware the proxmox server is running on is completely irrelevant with regard to diagnosing the issue you are having. In the case of the host hardware openHAB is running on in your case, the answer is whatever hardware your container is emulating.
Your openhabian.conf posted above has #hw=pi4 (# fake hardware commented out) and hwarch=amd64

What did you modify in the conf file? I am not familiar with the contents of the default file to tell what (if anything) is modified.

This is a bad config line. You must have a space between # and hw. Insert it back.
So obviously unlike you told you did change something there.
And even without the ‘#’ it’s wrong understanding of the feature.
You enforced your amd64 system to be treated like a RPi (which as I indicated twice already is the cause of your problem).

afaik this line

#hw=pi4

is commented out (this is the unchanged line of the dist-file, by the way)
and this line

hwarch=amd64

is the real hardware architecture.

no it is not, neither commented out nor unchanged, and likely the cause for the OP’s problem.

I tried out today:

git clone -b openHAB3 https://github.com/openhab/openhabian.git /opt/openhabian
root@ohtest:/opt/openhabian# cat openhabian.conf.dist 
# Modify your openHABian settings
# Handle with care, only touch if you need to!!
# This file will only be used on unattended initial install.
# If you want to change anything after unattended install completed, use menu in openhabian-config.

# Hostname to set this one to
hostname=openhabian
# if it exists, the default user (with its working environment) will be renamed to this username given here ...
username=openhabian
# ... and given this password. The password will be removed from this file after completion for security reasons.
userpw=openhabian
# set this to download a SSH key and authorize the owner to login as the admin user
adminkeyurl=""

# Language and timezone. See Debian documentation for valid values.
timezone=Europe/Berlin
locales="en_US.UTF-8 de_DE.UTF-8"
system_default_locale="en_US.UTF-8"

# WiFi settings. An ethernet connection is recommended.
# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi
# interface can be setup and used for the initial installation.
# Fill in your SSID and password below, leave empty or put comment in front to
# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.
# ATTENTION: you need to escape these special characters: $, `, ", \, (newline)
# 'Escaping' means to put an additional \ in front of that character
wifi_ssid=""
wifi_password=""

# Wi-Fi setting. Select a two-letter country code suitable for your location
# E.g. US (default), DE, AU, NZ...
# You may infringe on local legislature otherwise
# See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab
wifi_country=""

# Eventually disable all IPv6 e.g. on installation problems
# values: "enable", "disable"
ipv6=enable

# repo and branch to clone from
repositoryurl=https://github.com/openhab/openhabian.git
clonebranch=openHAB3

# debug verbosity mode
# off, on (verbose output in log) or maximum (show every command)
debugmode=off

# fake hardware
# force treating your box as if it was a ...
# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w
#hw=pi4

# Hardware architecture
# x86_64, amd64, armv6l, armv7l, aarch64, arm64
#hwarch=armv7l

# OS distribution/release
# Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bionic, focal
#osrelease=buster

# Java architecture mode
# Valid arguments: "Adopt11", "Zulu11-32", or "Zulu11-64"
java_opt=Zulu11-32

# openHAB Log Viewer (frontail) theme
# Valid arguments: "light", "dark"
frontailtheme=light

# install zram per default, set to "disable" to skip installation
zraminstall=enable

# start comitup hotspot if internet is not reachable
hotspot=enable

# external SD card device to backup and mirror the internal SD card to
#backupdrive=/dev/sda
storageconfig=openhab-dir
storagedir=/storage
storagetapes=15
storagecapacity=1024

# mail relay settings
#adminmail=john.doe@foo.bar
#relayuser=john.doe@foo.bar
#relaypass=secret
#smarthost=smtp.gmail.com
#smartport=587

# Tailscale VPN
#preauthkey=tskey-xxxxxxxxxxxxxxxxx

# Custom log files
#custom_log_files=("/var/log/foo.log" "/var/log/bar.log")

# vim: filetype=sh
root@ohtest:/opt/openhabian# 

w/r to commented and unchanged entries in conf File

I do get a local clone as described be executing all these commands just now while typing this message.

git clone -b openHAB3 https://github.com/openhab/openhabian.git /opt/openhabian

This seems to work fine at least I do get something from Git

Next command should not have effect .conf File as it “just” creates a link (but for sure it’s executed)

ln -s /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config

Last command before applying changes to conf File is the copy if itself from Git sources

cp /opt/openhabian/build-image/openhabian.conf /etc/openhabian.conf

Once this local copy (of the copy from Git) it opended to apply changes it looks different to the one from Git and does contains many # where spaces are missing and even more the local clone from Git at /opt/openhabian/build-image/openhabian.conf already looks different to me.

Sample extract of local file /opt/openhabian/build-image/openhabian.conf

> GNU nano 5.4                                  /opt/openhabian/build-image/openhabian.conf                                            
> # values: "enable", "disable"
> ipv6=enable
> 
> # repo and branch to clone from
> repositoryurl=https://github.com/openhab/openhabian.git
> clonebranch=openHAB3
> 
> # debug verbosity mode
> # off, on (verbose output in log) or maximum (show every command)
> debugmode=off
> 
> # fake hardware
> # force treating your box as if it was a ...
> # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w
> #hw=pi4
> 
> # Hardware architecture
> # x86_64, amd64, armv6l, armv7l, aarch64, arm64
> #hwarch=armv7l

If you look to same lines on Git

> # Origin: openhabian.conf
> 
> #
> 
> # Modify your openHABian settings
> 
> # Handle with care, only touch if you need to!
> 
> # This file will only be used on unattended initial install.
> 
> # If you want to change anything after unattended install completed, use menu in openhabian-config.
> 
> # Hostname to set this one to
> 
> hostname=openhabian
> 
> # if it exists, the default user (with its working environment) will be renamed to this username given here ...
> 
> username=openhabian
> 
> # ... and given this password. The password will be removed from this file after completion for security reasons.
> 
> userpw=openhabian
> 
> # set this to download a SSH key and authorize the owner to login as the admin user
> 
> adminkeyurl=""
> 
> # Language and timezone. See Debian documentation for valid values.
> 
> timezone=Europe/Berlin
> 
> locales="en_US.UTF-8 de_DE.UTF-8"
> 
> system_default_locale="en_US.UTF-8"
> 
> # WiFi settings. An ethernet connection is recommended.
> 
> # If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi
> 
> # interface can be setup and used for the initial installation.
> 
> # Fill in your SSID and password below, leave empty or put comment in front to
> 
> # have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.
> 
> # ATTENTION: you need to escape these special characters: $, `, ", \, (newline)
> 
> # 'Escaping' means to put an additional \ in front of that character
> 
> wifi_ssid=""
> 
> wifi_password=""
> 
> # Wi-Fi setting. Select a two-letter country code suitable for your location
> 
> # E.g. US (default), DE, AU, NZ...
> 
> # You may infringe on local legislature otherwise
> 
> # See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab
> 
> wifi_country=""
> 
> # Eventually disable all IPv6 e.g. on installation problems
> 
> # values: "enable", "disable"
> 
> ipv6=enable
> 
> # repo and branch to clone from
> 
> repositoryurl=https://github.com/openhab/openhabian.git
> 
> clonebranch=openHAB3
> 
> # initial openHAB configuration to import (URL or filename)
> 
> # the file needs to be a zip archive created from openhab-cli backup
> 
> # initialconfig=/boot/initial.zip
> 
> # debug verbosity mode
> 
> # off, on (verbose output in log) or maximum (show every command)
> 
> debugmode=off
> 
> # the framebuffer on RPi is enabled by default
> 
> framebuffer=enable
> 
> # fake hardware
> 
> # force treating your box as if it was a ...
> 
> # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, x86
> 
> # hw=
> 
> # Hardware architecture
> 
> # x86_64, amd64, armv6l, armv7l, aarch64, arm64
> 
> # hwarch=
> 
> # OS distribution/release
> 
> # Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bionic, focal
> 
> # osrelease=

I think I got it… -b openHAB3 tells git to load the old branch. Seems the documentation is outdated… just omit -b openHAB3 to get the main branch

1 Like

No more, I’ve just forwarded the main branch (which does not have the issue) to openHAB3.
Good find, thanks.

1 Like

:You’re welcome :slight_smile:

1 Like

Thanks to all of you and I just gave it a try to check it out. Even it might work with omitted I trust you like to have it working with that as well.

I run into other Fails now :-/

2021-09-26_18:13:47_CEST [openHABian] Installing selected openHAB3 version… FAILED (update apt lists)
2021-09-26_18:14:22_CEST [openHABian] Installing Frontail prerequsites (NodeJS)… FAILED
2021-09-26_18:14:26_CEST [openHABian] Applying file permissions recommendations… FAILED (please execute after openHAB is installed

w/r to

update apt lists

I run

apt-get update
apt-get install git

before installing openHABian :wink: