openHABian hassle-free openHAB Setup

I tried now twice.

The first time I had a little trafic on the ethernet port, but the RPi was not pingable.

On the second try there was no trafic at all.

I took an image from the sd-card and copied it to a new (bigger) one.

But it still does not reboot :frowning:

What can I do now?

I think the sd-card is not broken there is something wrong with the openHABian.

Is there a possible way to fix the image via a win10 PC?

Take the new sd card and make a new clean installation from scratch. Afterwards copy /etc/openhab2/ and possibly /var/lib/openhab2/ from the old installation to the new one.

Don’t lose time with trying to repair the old installation.

1 Like

I switched from a Rasüberry Pi to an Intel NUC based on Ubuntu. I’m a big fan of openHABian so i tried to install it on Ubuntu. Unfortunatlelly I was not able to install Zulu JDK via config tool:

$ apt -y install zulu-embedded-8 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package zulu-embedded-8
FAILED

The solution was to install Zulu JDK manually:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
apt_source='deb http://repos.azulsystems.com/debian stable main'
apt_list='/etc/apt/sources.list.d/zulu.list'
echo "$apt_source" | sudo tee "$apt_list" > /dev/null
sudo apt-get update
sudo apt-get install zulu-8

Is this the way to go or how should Zulu JDK be installed on Ubuntu?

strange… with that repo added to your list (and apt-get update run), you should get:

root@rpi3:/home/pi# apt-cache search --names-only '^zulu-.*'
zulu-embedded-8 - Azul Systems Zulu Embedded is a binary distribution of OpenJDK

edit: oh…wait… Intel NUC running “regular” Ubuntu… then you should use the “regular” Zulu (like you did), not the embedded one for ARM systems.

Would It be possible to have karaf console in a web browser window, similar to frontail? Love this new feature, and the openhabian package is awesome!! great job!

There is a tool called: Apache Felix Web Console for this but if I am not wrong, you can’t issue console commands from it (but you can manage certain aspects of Karaf from this)…
Note: this is a more advanced tool and not really recommended for all users (I don’t use it).

check:

Installed openhabian yesterday, working like a charm

but… i cant reboot

try some changes to su root, but the password is not valid

[16:05:39] openhabian@openHABianPi:~$ sudo reboot

sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy’
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins

any ideas

Hello everybody,
i’m new in the world of openhab, linux and rasberry. After some days learning, everything seems ok, happy to be here with you.
Everething, not really, I want to use the command “sudo raspi-config” to enable the rpi camera module. It seems I need to do that on Karaf, but I’m front a strange behaviour (all that with putty) :
Connection to openhabian : OK
Change all passwords (all the same for now) : OK
openhabian@openHABianPi:~$ ssh openhab@localhost -p 8101 OK

Password authentication
Password: my_password

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.1.0
                               - release build -

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab>

OK
But, when I try a sudo, not OK !!! :

openhab> sudo raspi-config
Password: my_same_password
Error executing command: login failed
openhab>

What I’m missing ?
When I was trying to deal with GPIO and script, I used “sudo visudo” :

Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
openhabian ALL=(ALL) NOPASSWD: /usr/bin/python

Thanks !
JR

No, that has to be done through the “plain” linux bash.
BUT: see release notes of openHABian

With these additions raspi-config is now finally abandoned from the Raspberry Pi openHABian system.

Edit: see also

1 Like

Thank you.
But in openhabian-config has no option to enable camera pi module… :frowning:
No way to do that with openhabian ?
Doc doesn’t help me…

Ok, it’s work !
You need to edit config.txt :

sudo nano /boot/config.txt

Change last line and add one :

gpu_mem=128
start_x=1

Check camera presence with :
vcgencmd get_camera

Solution found here :
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=63276&start=1500

2 Likes

Hey @RollandJ, great you’ve got that working. Did you already find a way to include the camera module in openHAB? There are solutions for cameras out there, if you got a working setup for the RPi module, tell us about it :wink:

Hey all, sorry for the late reply.

@ikjes_to The user root is not available by default. That’s not specific to openHABian but a recommendation and default for many Linux OSs nowadays. The command sudo reboot should work fine, the error suggests you did changes to your sudo config you shoudn’t have. Check google for a solution.

@peaeater did you slve your issue?

I changed to an RPi 3 and I’am booting now directly from USB.

We will see if it will run now longer than a few month.

I was not able to restore a thing, because my SD-card is not booting any more.

I tried to understand what amanda backup is about, but I’am not getting the clue. It looks to complicated for me. And I’am sure that on restore time there will be missing to much.

I would like to create a continously (daily) image backup from my usb-stick to my nas drive out of the running system.

It is not enough to restore only a few file of openHAB, I also have to restore influxDB with all the data, grafana, and may be more. All the distinc user accounts/password have to be restored as well.

At the moment I have a running system again, with influx, with grafana and my fundamental bindings.

Still missing is the new modbus binding and digitalstrom binding.

All this is costing a lot of time and I will have to invest it again when my usb-stick crashes.

I tried to find out if I could rund an InfluxDB Server on my Synology DS216j, but there is no package available.
But I could install GIT to get at least all my configuration restored. But this also is not done in five minutes.

The ds216j is not capaz to run docker so this way is also not working.

So far I’am happy again.

But I have to find out urgently a working backup solution.

I’m running a 128GB SSD harddrive since one year without any issues.

If you don’t like Amanda, take a look at raspiBackup:

https://www.linux-tips-and-tricks.de/en/quickstart-rbk

This looks good. But the problem I have with that is: How can I find out which services are running? How do I have to stop them and how do I restart them? If I make an mistake here the solution is not working for me.

But when I could solve this, this may be a working solution for me. Also the possiblity to compress the backup sounds good.

Actually you don’t have to stop any services if you don’t want to. This is the way I’m using it since almost 3 years now and back in the old days where I was using sd cards I had to restore a backup twice and it worked fine.
The only thing you would loose are some logs, but who cares.
A very nice feature are the the rsync backups with hardlinks.
If you want to be on the safe side, choose a backup strategy, make a backup and then restore it: you will see it works :grinning:

systemctl list-unit-files | grep enabled

If this realy works I will give it a try in the next days.

I promise :sunglasses: