Building a home automation system (part 1)

I had a Raspberry Pi and a Raspberry Pi 7" WVGA Touch screen laying around and decided to build a dashboard for displaying the hourly electricity price, mainly for charging the hybrid cars at the correct times. This is a quick tutorial of what I did to get it up and running.

Raspberry Pi home automatio


  1. Install the Raspberry OS
  2. The display was upside down, you can fix it with modifying/adding lcd_rotate=2 sudo nano /boot/config.txt
  1. Install Ngrok for remote access
  2. Set a website with electricity prices to run in kiosk mode sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xset s off
@xset -dpms
@xset xset s noblank
@chromium-browser --kiosk
  1. I noticed that the brightness was really bright in the evenings, so I added a cron that dims it in the evening and lights it up in the morning. sudo crontab -e
0 19 * * * bash -c "echo 20 > /sys/class/backlight/rpi_backlight/brightness"
0 8 * * * bash -c "echo 100 > /sys/class/backlight/rpi_backlight/brightness"

Raspberry Pi home automatio

Next up

  • Connect it to my cars so that I can start the heater and control the charging:
  • Add a Zigbee dongle to control the lights (IKEA trådfri), e.g. Sonoff Zigbee Dongle
  • Read Ruuvi tags temperature sensors with gokrazy

Related projects

Home automationIKEA trådfriRaspberry Pi