openHABian hassle-free openHAB Setup

Hey, thanks for the answer. As I said before, I don’t need grafana on the RPi 1. It’s not the recommended platform for openHAB anyway and honestly not the system I would put it on performance-wise.
InfluxDB+Grafana is a nice addition to an openHAB end user setup and that’s why I want to include both (for RPi2/3, jessie) if possible. It would be preferable if prebuild binaries were used in this process and that’s what you are offering. I’ll upgrade to a RPi3 myself next week and then go through the whole setup process again. If it works as expected, I’ll include installation of your binaries in openHABian and hereby thank you for providing them.

I had problems with both installing your binaries as well as building them on my “Raspberry Pi Model B Plus Rev 1.2”. If you are interested I can go through the process again and provide details, if you are interested in providing a grafana build for ARMv6 ??

Not directly : I don’t have and won’t buy a rpi1. But indirectly, this could be possible. I pushed a PR in grafana to support crossbuild. So, depending on where the build is failing, an armv6 build could be done using this feature.

I also plan to provide the .deb in a more classical way on bintray. In fact I already have debian repo there with grafana v3.1.1 :

sudo apt-get install apt-transport-https
echo "deb https://dl.bintray.com/fg2it/deb jessie main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-cache madison grafana
#   grafana | 3.1.1-1472506485 | https://dl.bintray.com/fg2it/deb/ jessie/main armhf Packages

Running openhab as root resolves this. Not sure how I feel about it though…

Thom,

Thank you for openHABian! I set up my second RPi3 using this and it works flawlessly.
I’m really looking forward to the new things you’re working on.

What was difficult to me was the wifi configuration on my RPi3. I’ve seen your discussion in this thread, however following it didn’t help - I needed to manually install wifi drivers in order to see “wlan0” on the interfaces list.
I’d love to see seamless wifi configuration option inside openhabian-config and - if possible - ability to have it working without Ethernet cable.

As this topic is getting more and more crowded (158 posts and counting :slight_smile:), maybe it’d be a good idea to start migrating the knowledge from here to project’s wiki page?
I can help!

Thank you again for splendid work.
I hope openHABian will grow as an official channel of openHAB for RaspberryPI users some day.

I think I’ll put this on hold for now. RPi 2/3 is more important in the context here.

That would be a big step forward :thumbsup: is the url you posted the one I can safely start integrating or are you going to change it once more? Just asking because of the “I also plan to provide…”

Hey @kubawolanin,
happy to hear everything went fine. The wifi configuration is one thing definitely in the ToDo list! I’ll look into that as soon as I got the RPi3 I ordered a few days back. Setting up Wifi from within openhabian-config is not going to be a problem, making the whole setup process wireless (that’s what was discussed earlier) is currently out of the scope of openhabian as it’s an issue dealt with over here.

I’ve thought about the future of this thread myself. Whith openHABian soon reaching Version 1.0, I’m planing to close this “beta discussion thread” and create a dedicated category for questions regarding openHABian here in the forum. You are right, that a more in-detail documentation should exist. I was planing to put one next to this article at docs.openhab.org. openHABian will also be transfered out of my personal account into the openhab github organization. This transfer, the documentation and a few small cosmetic changes to the menu are what’s needed before I’m going to release Version 1.0.

That’s great! Regarding the openHABian documentation I’m mostly going to rephrase what’s already posted here and in other places. Of course you can participate in that but let me write a first draft before we talk more. Evaluated at what’s currently available here, which information would you like to additionally include?
Would you be interested in helping out with the docs.openhab.org in general? I can point you to a few articles which need creation or serious rework…

I have tried the steps pointed out above, however, the command as step 4 fails as follows:

chown -R influxdb:influxdb /var/lib/influxdb
chown: cannot access ‘/var/lib/influxdb’: No such file or directory

I guess this is no surprise as the directory (or file) in question is not there.

Is there a missing step that is supposed to create this?

Hmm… It seems it is really the first step - the extraction of the archive - that fails to place the files in the correct locations;
/etc
/usr
/var

Instead it creates a top-level directory called ‘influxdb-1.0.0-1’ where the files are stored.

Oh damn, sorry. I reduced the commands to a minimum and overlooked that detail. Why would they put these three files in another folder. I’ll fix that in my steps, thanks for pointing it out. I received my RPi3 today and will finish the whole InfluxDB+Grafana setup next week. Stay tuned :wink:

I fiddled a little more with this and it seems this works:

curl -L https://dl.influxdata.com/influxdb/releases/influxdb-1.0.0_linux_armhf.tar.gz | tar xvz -C / --strip 2

The ‘–strip 2’ option skips the two first levels of directories inside the archive (it seems it was actually packed with two levels of rubbish in front of the files).

Now it is step 6 that gives an error:

systemctl enable influxdb.service
Failed to execute operation: No such file or directory

I simply did the next (and last) step and it succeeded.

Doing ‘systemctl status influxdb.service’ indicates that the service is running, and the admin web interface is availabel (at port 8083) so all seems to be well! :slight_smile:

Looking a bit closer, the structure inside the archive is actually ./influxdb-1.0.0-1/etc/...:

   .   / influxdb-1.0.0-1 / etc / ...
level1       level2       level3

Somebody did not have enough coffee while inventing this archive :smiley:

Great but is enable still not working? It really should…

Discussion on integrating my.openhab setup in openhabian-config:

Yes, you can. I meant I didn’t yet advertise this repo. But, it is already populated with my last build and I will update the repo with grafana v4.
One thing could change, but it is probably without effect : currently, the packages are signed with bintray public key. I don’t know if it will stay like this, I could change for a personal pubkey.

Anyone recently had problems with openhabian? I tried a new installation today (have used it already several times successfully in the past). OpenHAB is running, but I get a couple of java exceptions (“java audio source”) at every start. apt-get update && upgrade didn’t change anything. I thought of a mistake during installation and did a second try -> same result.

After that I “manually” installed Openhab according to the docs (raspbian install and after that an apt-get installation of the snapshot offline version). I had no java errors with this installation…

As openhabian actually doesn’t do other things than a raspbian installation with openhab snapshot, I am a little bit confused about this…

Sorry for my laziness, but I haven’t written down the exact java error message…

I recently used openHABian after my micro SD got corrupted. I have to say, it was AWESOME (for someone who is a very Linux newbie).

I can’t comment on the exception above, I haven’t run the log yet while working on the system (a bad habit of mine).

A few questions though…

  1. When I run stuff as Sudo, the system randomly asks for the password, even after I already put it in. My old setup on OH1 never asked for the password after I did the initial SSH. Not that it’s the end of the world, simply a nuisance, but is this able to be gotten rid of? Is it even advisable to get rid of it?

  2. On my OH1 setup, whenever I created new files (.items, .persist, ect.) I had to give Openhab ownership. Is the process the same or do I give openHABian ownership?

Thanks for the fantastic work! OH2 is not newbie friendly (yet), but at least the part of getting the system up and running was!!

I haven’t got an answer for your first question, but for the second one, the answer is: Ownership for user openhab is correct.

Hi Frode
Her is a copy of my notes for my Aeon USB Stick, that might help :

// Importen - In the /etc/init.d/openhab have you added somewher in the beginnig of det file
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0
#sudo reboot
sudo adduser openhab dialout
sudo adduser pi dialout
sudo adduser openhab tty
sudo adduser pi tty
sudo usermod -a -G dialout openhab
sudo chown -R openhab.users /dev/ttyUSB0
sudo chmod 775 /dev/ttyUSB0
sudo chown -R openhab.root /var/lock
sudo chmod 775 /var/lock

Br Jesper

1 Like

Matthew,

In answer to your first question:

Sudo normally caches your password for 5 minutes when you authenticate to sudo. That means that if you use sudo again within five minutes, you will not be required to re-authenticate. After five minutes you will be asked again for your password. You can override this behavior in multiple ways, but the default behavior is probably optimal in terms of convenience and security.

For more info about how you can change the default password caching behavior of sudo, take a look at the man pages for sudoers(5).

ScottK

Thanks. Just a nuisance issue. I’ll leave it.

Hey guys,
a short note an “successful installation”. I did everything I could to make sure that an installation either ends with the full set of working programs or in a clearly identifiable failure state.
At the end of the setup process you should see the green RPi LED blinking in a heartbeat like rythm (☼.☼…☼.☼…) and the openHABian logo on ssh login. The failure state is observable in a fast blinking of the LED (☼.☼.☼.☼.☼.☼.) and a failure text on ssh login.
If the setup was not successful please try again. There are a few reasons why one installation could fail (repository unavailable, internet connection outages,…) but don’t worry. I did not run into that problem once in all my testings.

@jaydee73 are you still seeing that problem? I did not quite understand how you observed the problem but I just did a new setup on my RPi1 and everything seems to be just fine…

@RHINESEL Happy to hear you are happy with the result. Scott already did a good writeup on sudo. I do not see a problem in extending the sudo re-authenticate time but disabling a first password prompt is a big security risk and should not be a default setting. I referenced a link on how to disable the prompt a few comments above but would really not recommend it for a couple of reasons… of course the whole topic is pointless as long as 95% of Raspberry Pi users never change the password to something other than “raspberry” :monkey:

On permissions: You do not have to give ownership to openhab for openHAB to work actually. openHAB does not write to these files and in normal case they will be readable by “others”, which includes openhab. HOWEVER: if you are using samba, you are going to be working as user openhab and thereby probably want to have write access.
So yes, out of a maybe different reason, you want to make sure all config files belong to openhab.
“openHABian” is by the way not an existing linux user :wink: