Skip to content

Home Automation


How do I run DietPi-Software and install optimised software items?

To install any of the DietPi optimised software items listed below run from the command line:


Choose Browse Software and select one or more items. Finally select Install.
DietPi will do all the necessary steps to install and start these software items.

DietPi-Software menu screenshot

To see all the DietPi configurations options, review the DietPi Tools section.

Return to the Optimised Software list

Home Assistant

Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control. Perfect to run on a Raspberry Pi.

Home Assistant pictogram

The install process on slower SBC models can take a very long time, up to 2 hours, hence take a coffee, find some other activity and check back once in a while. It will show Installing Python-3.8.0… a very long time.
If you want to see processing details, run htop on a dedicated terminal or SSH session to watch Python build process live.

After dietpi-software has finished and the service starts the first time, please go through the following steps manually:

  • Run htop and wait until the CPU usage of the homeassistant processes goes down to nearly zero.
  • Run systemctl restart home-assistant
  • Run htop and wait until the CPU usage of the homeassistant processes goes down to nearly zero.
  • Open the HA web UI (see below). It will again install some Python modules on first access, which can again take a little while. Always check htop if you are unsure, which reveals any Python/pip module install process, if currently done.

The web interface is accessible via port 8123:

URL = http://<your.IP>:8123

The configuration files are stored system-wide within:

Please see the online documentation:

Home Assistant is installed within a dedicated Python environment, powered by: pyenv/pyenv.
This places a standalone Python instance which runs completely independent from any other installed Python instance or modules. If you need to install additional Python modules into this pyenv environment, update Python itself or similar, you need to open a shell as user homeassistant and activate the pyenv environment:

sudo -u homeassistant bash
. /home/homeassistant/
pip3 install <module> # Or whichever install/update you need to do

To quickly update Home Assistant to the current version, run:


IKEA TRÅDFRI: apt install autoconf

Official documentation:


Turn your Raspberry Pi into an energy usage monitor with web interface.

emonCMS web interface screenshot


The DietPi optimised installation for emonPi is aimed at users who want the following:

  • Ultra lightweight alternative installation to the official emonPi image, with all the optimisations and features of DietPi. Allowing additional uses for your RPi device (e.g.: ownCloud server): htop image of RPi Zero @700 MHz, running our emonHub installation.
  • Real time and historical energy usage statistics uploaded to the cloud, viewable from a web browser and the Android App, from anywhere in the world.
  • Use an existing RPi, or, do not wish to purchase the full emonPi package with case and LCD.
  • Comfortable attaching the emonPi to your Raspberry Pi GPIO. No soldering or wiring is required.

Missing support

The DietPi installation does not setup all features OOTB, but they can be manually enabled:

  • RF transmission. RF receiver (sensor nodes) is supported (e.g.: emonTX/emonTH)
  • emonPi LCD screen
  • Local emonCMS webserver on RPi. All emonPi data is sent to cloud by default.


The following hardware is required:

  • 1x emonPi PCB - Order one here: Select 1 Clip-on CT Current Sensor (all together £33.42), or sensors based on your needs. Image of what you will receive.
    This installation also supports the optional temperature sensor, but its not required.
  • 1x Raspberry Pi (any model)
  • 1x Good quality Raspberry Pi PSU. The emonPi does not need its own power supply. It will draw power directly through the GPIOs on the RPi.
  • Alternatively you can power the RPi through the emonPi shield via GPIO. For this, add the emonPi PSU to the chart and skip buying a dedicated PSU for the RPi itself.

You will be asked to create a account and input your unique API Key. DietPi will automatically apply your API Key during installation. If you did not complete this, or wish to change the API Key on your system, please follow the steps located here, otherwise continue below.

  • Attach GPIO extender/riser to RPi:
    Raspberry Pi emonPi attachment photo 1
    Raspberry Pi emonPi attachment photo 2
  • Attach emonPi to RPi:
    Raspberry Pi emonPi attachment photo 3
  • Verify pins are visible:
    Raspberry Pi emonPi attachment photo 4

Connect the sensor to measure the power consumption to the emonPi:

  • Plug the 3.5mm power consumption sensor into the emonPi:
    Raspberry Pi emonPi attachment photo 5
  • Clip the power consumption sensor onto a positive (red) cable (cables are live, use caution):
    Raspberry Pi emonPi attachment photo 6

Assign a name to your power sensor input

Inputs are the real time value of the data received from the emonPi. We will assign a name to the power value so we can use it later.

  • Login to your account
  • Click Setup at the top right of screen, then click Inputs
  • Node 5 and Key 1 is your power value reading. Click the pencil on right hand side and change the name to Power WATT. Click the tick to save.

Setup feed

Feeds allow your emonPi data (inputs) to be saved to a database. You will need feeds setup if you want to view historical (and pretty) stats.

  • Login to your account
  • Click Setup at the top right of screen, then click Inputs
  • Select the spanner on the far right of Power WATT
  • Check the screen matches the following image
    emonPi setup screenshot 1
    then click add
  • To verify the feed is active, click Setup at the top right of screen, then click Inputs. You should see log under Process list of Power WATT:
    emonPi setup screenshot 2

My electric is an application that will allow you to view historical usage of your electricity. Also renders a pretty graph and can calculate costs.

  • Login to your account
  • Click Apps at the top of screen, then click My Electric
  • Under the Logout button at the top right, click the spanner
  • Under Power feed (Watts): select Power WATT
  • Under Bar graph feed: select Power WATT
  • Under Wh or kWh feed?: select Watt hours elapsed
  • Enter your unit costs for your electric (optional).

Then click Save.
Press F5 to refresh the page and view your energy consumption.

Official usage guide:
Official config docs:
Source code: openenergymonitor/emonhub


Domoticz is a Home Automation System that lets you monitor and configure various devices like lights, switches, various sensors/meters like for temperature, rain, wind, UV radiation, electric fields, gas, water and much more. Notifications/Alerts can be sent to any mobile device.

Domoticz web interface screenshot

The web interface is accessible via port 8124 resp. 8424:

  • HTTP: http://<your.IP>:8124
  • HTTPS: https://<your.IP>:8424
journalctl -u domoticz

Use the following commands to control the Domoticz system service:

systemctl status domoticz
systemctl stop domoticz
systemctl start domoticz
systemctl restart domoticz



Source code: domoticz/domoticz


TasmoAdmin is an administrative website for devices flashed with Tasmota to be used for smart home systems.

Also installs:

  • Webserver (based on your preference)
  • PHP

TasmoAdmin logo


Source code: reloxx13/TasmoAdmin
Credits: Implemented by svh1985

Return to the Optimised Software list