Skip to Content

← Raspberry Pi Kiosk Mode for a Node-RED Dashboard HMI

Automated agricultural irrigationRaspberry Pi (Docker)HTTPHMI / Dashboard

Raspberry Pi Kiosk Mode for a Node-RED Dashboard HMI — full example

Turn a Raspberry Pi with a touchscreen into a dedicated plant HMI: Chromium kiosk mode under Wayfire boots straight into the Node-RED dashboard.

Complete, runnable program for the Raspberry Pi (Docker) (kiosk-wayfire-chromium.sh): wiring header, requirements and integration notes included.

Download the full project pack — freeThis example + the related ones + bill of materials

Read-only preview.

#!/bin/bash
# =============================================================================
# COMPLETE EXAMPLE — On-screen kiosk mode (Wayfire + Chromium)
#
# Hardware:  Raspberry Pi (Docker) with touchscreen — Raspberry Pi OS Bookworm
# Based on:  automated agricultural irrigation project
#
# Requirements:
#   - Raspberry Pi OS Desktop (Bookworm) with a Wayland/Wayfire session,
#     which is the default compositor on Pi 4 / Pi 5.
#   - Autologin of the plant-floor user enabled (raspi-config -> System
#     Options -> Boot / Auto Login -> Desktop Autologin).
#   - The Docker stack running: the Node-RED dashboard must respond
#     at http://127.0.0.1:1880/dashboard before Chromium opens.
#
# What it does:
#   1. Adds the [autostart] section to ~/.config/wayfire.ini to launch
#      Chromium in kiosk mode pointing at the Node-RED dashboard.
#   2. Hides the mouse cursor (dedicated touch HMI).
#   3. Disables screen blanking (DPMS) for an always-visible HMI.
#
# Usage:
#   chmod +x kiosk-wayfire-chromium.sh && ./kiosk-wayfire-chromium.sh
#   sudo reboot   # the kiosk starts on its own after the reboot
# =============================================================================

set -euo pipefail

DASHBOARD_URL="http://127.0.0.1:1880/dashboard"   # URL of the Node-RED HMI
WAYFIRE_INI="$HOME/.config/wayfire.ini"

mkdir -p "$HOME/.config"
touch "$WAYFIRE_INI"

# --- Backup before touching anything ------------------------------------------
cp "$WAYFIRE_INI" "$WAYFIRE_INI.bak.$(date +%Y%m%d%H%M%S)"
echo "Backup created: $WAYFIRE_INI.bak.*"

# --- Avoid duplicates if the script runs twice ---------------------------------
if grep -q "^\[autostart\]" "$WAYFIRE_INI"; then
    echo "WARNING: an [autostart] section already exists in $WAYFIRE_INI."
    echo "Review it manually and merge the lines below if needed."
fi

# --- Kiosk autostart section ---------------------------------------------------
# chromium-browser in kiosk mode:
#   --kiosk                  full screen without toolbar or buttons
#   --noerrdialogs           no "Chromium closed unexpectedly" dialogs
#   --disable-infobars       no automation notices
#   --check-for-update-interval  do not nag about updates
cat >> "$WAYFIRE_INI" <> "$WAYFIRE_INI" <
Download the full project pack — freeThis example + the related ones + bill of materials