openHABian hassle-free openHAB Setup

i ssh ed into openhabian on port 22. then i typed

ssh openhab@localhost -p 8101

nothing happened until it timed out.

for giggles, i typed sudo before ssh, then was able to access the karaf console.

Is this a yes or no from your side? :confused: Being bound to the localhost interface is the default. Binding to all interfaces could be dangerous as a default setting (because of the password, as you already concluded). In order to make a public interface acceptable, the password has to be non-default from the beginning. Maybe as an activate-and-set option in PaperUI?
openHABian doesn’t change the default openHAB2 installation unless the user selects this option from the menu. I could add a prompt for a password at this point if you are concerned of insecure end user systems. What do you think?

@staehler67 might answer that better than I can. Link:

This will install knxd (successor to eibd) to support your KNX bus system. Please edit /etc/default/knxd to meet your interface requirements. For further information on knxd options, please type knxd --help.

This is a known problem and related to the comparably weak RPi system. Upon first connection to the karaf ssh socket, a strong encryption key is calculated - which takes too long. Just try connecting another 1-2 times.

also, i created a new items file via nano, tried to save it as many different ways in the items folder, but it doesnt save into that folder. when i wrote out, orginally it said to save in openhab-confitemshome.items. I tried that way, tried adding / between conf and items and file name. i cannot see it in the folder

and thatbis openHAB-conf/items folder, sorry for the hab

As usual I’m playing both sides.

For a security engineer, my tolerance for risk is actually pretty high. So long as the password gets reset to something non-default at some point in the install and configuration process I’m fine with it. The risk is pretty low to nonexistent.

My main thought was, if I see the direction that openHABian is going, from a usability perspective it makes a lot of sense to expose the Karaf console so users really don’t have to muck around in the base OS much if at all (eventually, I don’t think the UIs are there yet but I think something like that should be a goal). I’m thinking of similar appliances like dd-wrt, OPNSence, PFSense, OpenELEC, XBMC (or whatever they are calling it these days), etc. They are all Linux (or FreeBSD in the case of OPNSense) but one almost never has to mess around with the base OS directly.

stupid question. …

can i use notepad in windows to create my item file and save it in the correct folder on the network

Let’s make a step back.

You seem to have only little linux knowhow, which is okay (!) because openHABian is here because home automation enthusiasts should not concern themselves with a whole new operating system.

That’s why openHABian installs and configures Samba by default. You can find all you need to know here. You will find two shares of which only the config folder is of real relevance for now. Mount the share by assigning a drive letter and voila you can freely edit all configuration files from your Windows machine (with notepad or preferably something “better”). Remember to look into the SmartHome Designer as well.

Regarding your original question: Your nano command should have been something like nano /etc/openhab2/items/home.items

If you want to learn about linux, I can highly recommend

i have used linux with the rpi for over a year now, for oh1 and oh2. i am not an expert by any means, but have never used it headless before; always through the gui and been able to find my file locations via it, which is why i asked early on about a gui.

Ah right, sorry I forgot about that.

Has anybody been able to get the GPIO binding to work with openhabian? I am trying and it doesn’t seem to work. I followed directions for setting up a simple sitemap/items from here:

In /var/log/openhab2/events.log I have the following entries.
2016-09-28 11:15:21.605 [ItemCommandEvent ] - Item ‘RaspiLED’ received command OFF
2016-09-28 11:15:21.612 [ItemStateChangedEvent ] - RaspiLED changed from ON to OFF
2016-09-28 11:15:22.686 [ItemCommandEvent ] - Item ‘RaspiLED’ received command ON
2016-09-28 11:15:22.692 [ItemStateChangedEvent ] - RaspiLED changed from OFF to ON

My entry in Pool.items
// Raspberry Pi
Switch RaspiLED{ gpio=“pin:17” }

pin 17 the way I am reading this is GPIO17 (pin 11). Which is hooked up and works with a python script I wrote.

I believe the problem is that openhabian didn’t include the gpio group in the build and my openhab is running as openhab not root (so openhab has no access to gpio…needs to either be included in the non-existant gpio group or added to root).

Yes, you need the right privileges.
You could switch to root once as proof of concept.
Regarding the gpio group: I’m not sure why it is not there and how you could use it. Would you consider trying to create one and then working through this:

Hello @KjetilA,
a short update on that topic. Here are the steps to get InfluxDB up and running:

The second part is the installation of Grafana. There was a mentioning regarding this over in the InfluxDB+Grafana thread but I didn’t get it to work. @fg2it thanks for the detailed instructions in your github README. I was not able to get the binaries installed on my ARMv6 architecture RPi1, neither did I get the build process to finish without errors. Maybe @KjetilA could test the binaries on ARMv7. I would be okay with binaries only for ARMv7 as the RPi 1 is not officially recommended for the use with openHAB and will be used less and less.

Thom…thanks for your reply. I did sudo adduser openhab root to add openhab to the root group as a test and rebooted. Get a different error now…

2016-09-28 11:42:18.894 [ERROR] [ab.binding.gpio.internal.GPIOBinding] - Error occured while creating backend object for item RaspiLED, exception: /sys/class/gpio/export

[11:44:07] pi@openHABianPi:/var/log/openhab2$ ls -la /sys/class/gpio
total 0
drwxr-xr-x 2 root root 0 Sep 28 11:45 .
drwxr-xr-x 48 root root 0 Dec 31 1969 …
–w------- 1 root root 4096 Dec 31 1969 export
lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip0 -> …/…/devices/platform/soc/3f200000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 Dec 31 1969 gpiochip100 -> …/…/devices/platform/soc/soc:virtgpio/gpio/gpiochip100
–w------- 1 root root 4096 Dec 31 1969 unexport

I think I am going to do a new build of openhabian and start from scratch. I will document the components that are missing (compared to a NOOBS build) that might be related to issues using GPIO.

Sorry I was not clear enough. My binary are for raspberry pi 2 : I tested them on this hardware with wheezy and jessie (but the one I linked was reported to work on raspberry pi 3 too on an other forum).
Build instructions depend on your distro. Could you provide details on your build platform and the errors you got ?

I wrote a few comments on your commit 497f6bd1.

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 jessie main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-cache madison grafana
#   grafana | 3.1.1-1472506485 | jessie/main armhf Packages

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


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…”