openHABian hassle-free openHAB Setup

I think this is due to the fact, that per default samba would not allow to follow symbolic links, but this is just a guess.

1 Like

See /etc/fstab. The first column is the real location. The second is a directory loopback mount of the same dir to allow for Samba to easily share it (you can remove it from /etc/fstab if you don’t want it, also IIRC it’s a reversible config option in openHABian). So no, you do not want to move /srv/.

I have a NAS, too, and chose to mount logs (var/log/openhab2) and /var/lib/openhab2 (to contain persistence data etc). I chose to however NOT mount /etc/openhab2 so in case of trouble with the NAS or connection openhab still has access to the config.

1 Like

Thank you @mstormi for this detailed information and for sharing your experience about using a NAS.
Before my update to openhabian, the entire (manual) openhab installation was located on a mounted nfs folder. But the setup is completely different now. I think I will now also keep everything on the sd card and make regular backups instead (maybe even executed by rules via the exec binding).

I’d still strongly suggest to put logs and persistence data on the NAS mount. They account for the vast majority of writes, and once you move these, you’ll be ‘reasonably’ safe from SD card corruption.
You’ll still have to do backups, of course. Check out the Amanda backup system install option in openHABian.

Thanks @Lionello_Marrelli I had similar issues for installing redis-py, but I had to do this:

(running as root)
apt-get remove python-pip
easy_install pip

and then I had to use the full path to run pip

/usr/local/bin/pip install redis

I raised this topic/problem on the beginners forum:-

and have been advised to move it it seems to be a problem with openhab setup. The same Pi with raspbian stretch works fine, so the problem is not the hardware.

I have tried a number of times now to get the wireless working, each time the result is the same, the pi no longer boots and I have to reflash the card.

Any help/advice/solutions would be gratefully received- as I stated in the beginners forum, using wired on my home network is not an option for me except for testing.

Thanks to Metin over on the beginners forum (seethe last couple of posts on link above), the problem is now solved.

After being unsuccessful to install OpenhabianPi 1.4.1 on my new RBP3+ through WiFi, I was able to install OH through Ethernet.
Then I wanted to make WiFi active using openhabian-config, but the I got this message:

┌────────────┤ Incompatible Hardware Detected ├────────────┐
│                                                          │
│ Wifi setup: This option is for the Pi3, Pi0W or the Pine │
│ A64 system only.                                         │
│                                                          │
│                                                          │
│                                                          │
│                          <Ok>                            │
│                                                          │

Should I wait for an update that includes WiFi support?

Yes, it’s underway. Please follow:

BTW its

sudo update-alternatives --config java


sudo update-alternatives --config-java

but thanks for the help…its also so much faster now too running on the 32bit JVM. Good Job!

Hello, I have problem on my openhabian setup.
I installed openhabian on RPi 3 using etcher, twice, in same SD card. I run mqtt, influxdb+grafana, and pihole (which never used anyway)
First one I install OH 2.1.0 and get disk space full and since I don’t know anything about linux back then, I reflashed the card using new openhabian that have OH 2.2.0 with same additional software as before.
However I ran into same problem again, finally found out that the culprit is located on /var/lib/apt/lists/partial (it eats all free space from 26% used to 100%), I deleted this folder and rebooted, everything run normally again.
Just now, without doing any update and upgrade at all, no apt-get update nor upgrade, it become full again, with same culprit, and then deletes all my things, break the runtime that I have to reinstall openhab twice from openhabian-config to make OH running again.

What is the possible problem that makes me run into this more than twice? Thanks in advance

Bad sd card? Try using a spare one.

is bad SD card may cause that partial folder getting filled with incomplete list from apt-get? I have run my last installation for the past 3 months. only 3 temperatures and 1 humidity persisted every change and logged almost nothing since I purchased that SD card to use exclusively on openhabian.
I don’t have any spare SD card yet, will purchase soon

No idea. From other posts (search the forum) I know that a bad sd card can cause very weird problems. A raspberry user should always have a spare card handy :rofl:

Quick note to say thankyou to the developers for this - I was able to get a PI up and running in no time using openHABian. I am completely unfamiliar with Linux and the command line so I wasn’t sure I should stray from a Windows PC. So far very I happy I have!

And a quick question - can I move openHAB configuration from my windows box to the PI or should I just start over?


That’s definitely possible, you have to ensure, that there are no windows-specific configurations, though. (e.g. some paths)

Is there a way to restart/reboot a Raspberry PI or openHAB from the console? Or any other method?

Restart openHAB:
sudo systemctl restart openhab2.service

Restart Linux (also on a Pi):
sudo reboot now

1 Like

I’m not familiar with the Windows OH setup, but as long as you have the same layout for the configuration folder (i.e. the folder with separate directories for items/sitemaps/services/scripts/rules/etc…) you should be able to simply:

  1. Zip them up
  2. Move the compressed file over to your Raspberry Pi (openHabian should have already set up a Samba share for you, if not - run the Apply Improvements -> System Tweaks menu item from openhabian-config) - you should be able to access it from your Windows explorer.
  3. Unzip the file over the existing folders
  4. Restart openHAB.

This is actually a very easy way to back up/restore your OH configuration in case you ever lose it (or screw something up in a config file). As long as you’re keeping all your configs in those hardcoded files, you never need to worry about losing OH (if so, just restore again).

1 Like

I’m about to upgrade my Hardware from Raspberry Pi 2 to Raspberry Pi 3B +. Can I just switch over the micro-SD card? Or are there other precautions to be made?