Raspi 7" touch display as openHAB GUI // How-to

Tags: #<Tag:0x00007f1741a24fb8> #<Tag:0x00007f1741a24dd8> #<Tag:0x00007f1741a24d10>

Hi community,

I recently bouhgt a rapsi 7" touch display and want to let you know how I transformed it into a openHAB client for the “living” room.

My hardware:

  • Install Raspbian wheezy
  • Set it up so the GUI comes up after booting
  • Sometimes the screen and touch control get’s mixed up, so you have to change the following
    in /boot/config.txt:
    sudo nano /boot/config.txt lcd_rotate=2
  • Start the epiphany browser so it automtically sets up its profile
    *Switch off the screensaver and let the browser start automatically with the openHAB URL:
    sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
    @xset s off @xset -dpms @xset s noblank @epiphany-browser -a --profile ~/.config http://UrlToOpenhab/openhab.app?sitemap=xxx

then do a:
sudo reboot

and your openhab should come up automatically
That’s it.

What I did additionally to improve the WAF (previously there was a clock where the pi now is placed)
Modified a python script I found on the web to show the current time:
If I touch the clock it disappears and comes up after 30 seconds:

download here:

Also dont’ forget to add it to autostart (see above):
@/usr/bin/python /home/pi/tk_clock101.py



Python with no indentation posted; always a challenge :wink:

1 Like

Thanks @jvanzuijlen: you’re right. I changed it and will post the file elsewhere

1 Like

Thanks @Mitch77 !

do you have any pics of this in action? I would be REALLY interested in seeing this. This sounds like a great option for me.

Hi Jason, see here the final result :smile:
Anymore specific pictures?
BR, Michael

1 Like

Really Nice! Thanks for sharing.
I was thinking to use an old kindle for this. The E-Ink display is perfect for status information like temperature, etc.

If you’re just displaying the Openhab pages in the browser, it’s worth switching it to full-screen (“kiosk”) mode to gain a bit more display space.
Unfortunately its a little more involved than another command line option (as far as I could find).
There are instructions here, among other places
I’ve actually commented out the lines beginning ‘xset’, since I wanted the screen to blank after a while

Hi Michael,

how did you change the script that the temperature and the lights are shown in the top? Can you share it?

Hi Thomas.

the temperature comes directly from my MQTT server, the “sum of lights on” from openhab via REST. Those are put into different “containers”.

Please find the modified script here:

I’m not really familiar with Python so putting this together was kind of copy&paste, try&error. Python gurus please bear with me. :pensive:


Hi Michael,
thanks for sharing with us :slight_smile:
I like to have a display for the living room too.

So i think about different solutions:

  • arduino with a e-ink display
  • raspberry with a touch display
  • android tablet

My requirements are:
-low energy

  • shutdown the display on the night.

The problem with the pi ist, that it has no wakeonlan. So at the evening i can shutdown, but in the morning no reboot :frowning:
But it is possible the shutdown only the display.

Do you know the wattage? (Off and On)
And do you have the display on the whole day?


@schlaubi A 5V 2.5A power supply (which is what’s recommended for use with the display) can put out at most 12.5W of power, so it’s probably going to draw a little more than that at peak usage since power supplies aren’t 100% efficient. And that’s the maximum, typical usage is going to be much less.

As far as blanking the screen at night there are many ways to handle that. The backlight can be turned on/off from software so you could use a button, a PIR motion detector, link into the astro binding in openHAB etc - the possibilities are endless.


The main downside of the RPi screen that I’ve found so far is that I haven’t found a good on-screen keyboard, so you’d need to keep a keyboard handy for anything that required more than point-and-click.

@schlaubi You can workaround WOL by switching off/on power source of RPi with some remote controlled power plug or relay.

Also please note: http://www.androidheadlines.com/2016/05/google-add-raspberry-pi-3-android-open-source-project.html

yes, as it’s nicely showing temperature outside and a clock.

Agree. That’s what I would recommend, too for a RPi.

Thanks! I will be doing this as soon as I get OpenHAB up and running!

I have installed the epiphany browser. But allways when I try to start the browser i get the message

Unable to init server: Could not connect: Connection refused Failed to parse arguments: Cannot open display:

Do you know where the probleme is?

I use openhab2.3 and the raspberryPI Touchscreen. My goal ist to use the openhab panel on touch screen.