Updating the Pi Dashboard: Part 1

Years ago, I set up a monitoring dashboard on a Raspberry Pi 3. It has generally worked very well, though performance was always a bit limited due to the CPU capabilities of the Pi 3.

Recently, this dashboard began to exhibit some strange behaviors. Various graphical elements would disappear for long periods of time. I haven’t quite figured out why – though I suspect perhaps the SD card has reached its useful life (excess writes). I’ll have to confirm that later.

In any case, I’m using this as an excuse to upgrade to a Raspberry Pi 5 and give the dashboard a refresh. I’m going to document the setup procedure here.

Write the Image

Like last time, I’m using an SD card rated for a large(r) number of writes. I’m using a Delkin Utility Endurance 32GB microSD card that utilizes pSLC flash. It’s rated for -40°C to +85°C operation with 30,000 P/E cycles and a sequential R/W rate of 95 MB/s and 85 MB/s, respectively.

I downloaded the latest “Lite” version of Raspberry Pi OS (bookworm 64-bit). With my SD card identified as /dev/sdc, I wrote the image to the SD card on my desktop PC as follows:

Bash
xzcat ./2025-05-13-raspios-bookworm-arm64-lite.img.xz | sudo dd bs=4M of=/dev/sdc

Then, I installed the SD card into the Raspberry Pi. Upon first boot, a few prompts ask to set the regional settings, and create an initial user. I created a user for myself to facilitate remote login.

Initial Configuration

The SSH server isn’t installed by default on the Lite version, so let’s get that installed and started:

Bash
sudo apt-get update
sudo apt-get install ssh
sudo systemctl enable ssh.service
sudo systemctl start ssh.service

Now, all management can be done remotely, if desired. Identify the IP address by typing:

Bash
ip addr

I’d like to keep my personal login separate from the auto-login user that we’ll use to bring up the dashboard upon boot. So, I’m adding a generic user named “pi” that will support this:

Bash
sudo adduser pi

This brings up interactive prompts to set the full name, password, and a few other identifiers (these can be blank). Make sure to copy down the password in a secure location.

We’ll want the pi user to be able to sudo, so add it to the list of sudoers:

Bash
sudo usermod -a -G sudo pi

Next, install the required packages to support Chromium. Credit to this blog for the list of packages.

Bash
sudo apt-get install --no-install-recommends xserver-xorg-video-all xserver-xorg-input-all xserver-xorg-core xinit x11-xserver-utils chromium-browser unclutter

Unfortunately, for the Pi, we’re missing one vital package that will prevent startup of X11. To eliminate the error “cannot run in framebuffer mode”, install this package:

Bash
sudo apt-get install gldriver-test

Going back to Rob Anderson’s blog again, we need to create a couple of files to support kiosk mode. First, create a file /home/pi/.bash_profile with the following text:

if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]
then
  startx
fi

Then, create a file /home/pi/.xinitrc:

#!/usr/bin/env sh
xset -dpms
xset s off
xset s noblank

unclutter &
chromium-browser https://yourfancywebsite.com \
  --window-size=1920,1080 \
  --window-position=0,0 \
  --start-fullscreen \
  --kiosk \
  --incognito \
  --noerrdialogs \
  --disable-translate \
  --no-first-run \
  --fast \
  --fast-start \
  --disable-infobars \
  --disable-features=TranslateUI \
  --disk-cache-dir=/dev/null \
  --overscroll-history-navigation=0 \
  --disable-pinch

Edit the URL and window-size parameters as desired. Rob has a few more details on his blog that you may wish to consider.

One other step that’s needed is to support auto-login. Type the following:

Bash
su pi
sudo raspi-config

From here, select System Options – Auto Login. I believe (though I have not confirmed) that the first step (su pi) is needed to identify which account is automatically logged in. It worked as desired, so I did not investigate further.

Install InfluxDB2

The steps below are from this page. It refers to the influxdb package – though it also seems to work just fine for influxdb2. I’m going with the latter, as I’d rather use the newer version. I’m aware that InfluxDB3 is out, but for whatever reason the installation procedure seemed far less straightforward, so maybe I’ll come back to that later.

First, set up the repository (we assume that wget is already installed):

Bash
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list

Next, install InfluxDB2:

Bash
sudo apt-get update && sudo apt-get install influxdb2

Set up InfluxDB(2):

Bash
sudo influx setup

Install Grafana

To install Grafana, I followed the steps on this page to install from the apt repository.

First, import the GPG key:

Bash
sudo mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null

Add the repository for stable releases:

Bash
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

Update and install:

Bash
sudo apt-get update && sudo apt-get install grafana 

Start Grafana:

Bash
sudo systemctl daemon-reload
sudo systemctl start grafana-server