An open API service indexing awesome lists of open source software.

https://github.com/crazyvito11/rpi-ha-dashboard

Script and setup instructions for getting a functional RPI Home Assistant Dashboard
https://github.com/crazyvito11/rpi-ha-dashboard

dashboard home-assistant raspberry-pi smart-home

Last synced: 3 months ago
JSON representation

Script and setup instructions for getting a functional RPI Home Assistant Dashboard

Awesome Lists containing this project

README

          

# RPI-HA-dashboard
Script and setup instructions for getting a functional RPI Home Assistant Dashboard.

Created and tested on a Raspberry Pi 5 4GB running Raspberry Pi OS 64-bit Bookworm.

## Dependencies
- Chromium
- Dotool _(Will be installed in the setup instructions)_
- Labwc _(Wayland)_

## Setup instructions
### Prepare the environment file
To make sure that no secrets are published on GIT, we use a `.env` file instead to store the secrets.

An example `.env` file has been provided in the form of `.env.example`.

Simply make a copy of that file, call it `.env` and then edit the values to match your environment.

### Install Dotool
The kiosk mode of Firefox and Chromium are broken when using labwc at the time of writing, so we will use Dotool to automatically send key inputs.

1. Install the Dotool dependencies: `sudo apt install libxkbcommon-dev golang scdoc`
2. Clone the repository: `git clone https://git.sr.ht/~geb/dotool`
3. Enter the `dotool` directory: `cd dotool`
4. Compile and install Dotool: `./build.sh && sudo ./build.sh install`
5. Configure the udev rules: `sudo udevadm control --reload && sudo udevadm trigger`

And that should be it, reboot and then you can try the following command to see if it works:

```sh
echo type hello | dotool
```

### Update your labwc autostart
To make labwc automatically start the Dashboard on startup, we need to edit the autostart file of labwc.

Open a terminal and run the following.

```sh
mkdir -p ~/.config/labwc
touch ~/.config/labwc/autostart
chmod +x ~/.config/labwc/autostart
nano ~/.config/labwc/autostart
```

Inside this file we need to add the following, please verify the path to make sure it also matches the location that you used.

```sh
#!/bin/sh

$HOME/Projects/RPI-HA-dashboard/open_ha_dashboard.sh &
```

### Add execution rights to `open_ha_dashboard.sh`
To make sure that the script can run, we should check the permissions of the `open_ha_dashboard.sh` file.

We can make sure its executable by running `chmod +x open_ha_dashboard.sh`.