Sensor Dashboard Demo
This page demonstrates an environmental sensor dashboard. The demo uses ubuntu-frame and wpe-webkit-mir-kiosk to automatically launch a full-screen headless browser window to display the dashboard. Adafruit Blinka allows the app to read environmental data from the BME280 sensor over I2C.
snap install ubuntu-frame wpe-webkit-mir-kiosk
The HDMI display will start showing a default web page when the kiosk app install completes.
BME280 Dashboard
The BME280 dashboard app is a locally built snap file. It is not distributed through the snap store like ubuntu-frame and wpe-webkit-mir-kiosk. The code for this snap can be found on the Building Snaps page of this guide.
Download & Copy Snap
Use the button below to download a copy of the file bme280-dashboard_0.1_arm64.snap.
Copy the file to the Ubuntu Core device. One easy way to copy it is scp.
# Run on your main computer to copy the snap file to the Ubuntu Core device scp -i [keyfile] bme280-dashboard_0.1_arm64.snap [username]@[hostname-or-ip]:/home/[username]/ # example: scp -i ~/.ssh/id_ubuntucore bme280-dashboard_0.1_arm64.snap [email protected]:/home/foamyguy/
Install Snap
Install the snap file with the following command. The --dangerous flag is required to install snap files that are not distributed through the snap store. The --devmode flag loosens some of the restrictions within the OS for development. It allows the Pi 5's GPIO access to work without further customization of the system image. It's required on Pi 3 and 4 as well because they all use the same Snap for this demo. It would be possible to modify and rebuild the snap to target only Pi 3 or 4 to avoid needing the --devmode flag.
sudo snap install ./bme280-dashboard_0.1_arm64.snap --dangerous --devmode
Connect Plugs to Slots
Ubuntu Core apps are sandboxed and locked down by default, with minimal access to the hardware on the device. The permission model is based on plugs and slots. If an application wants to use a particular piece of hardware on the device, the app declares a plug for the hardware. The OS provides slots that the plugs need to be connected to in order to actually be granted access to the hardware.
For testing a custom built snap, the only way to connect the plug to the slot is with a command. For building a custom image and deploying, it is possible to use a customized gadget snap to make these connections automatically upon first boot up. A custom gadget snap is also what would be required to target the Pi 5 with this snap and remove the need for the --devmode installation flag.
Run these commands to allow permission for the i2c bus and hardware-observe plugs, both are required by the Blinka demo.
sudo snap connect bme280-dashboard:i2c pi:i2c-1 sudo snap connect bme280-dashboard:hardware-observe
Test Script
To confirm everything is working, use the sudo bme280-dashboard.blinka-test command. You should see output similar to this.
Press ctrl-c to stop the program.
Set Dashboard URL
Finally, configure the kiosk URL to point to the dashboard, which is being hosted by a small webserver inside the snap on localhost port 8080.
snap set wpe-webkit-mir-kiosk url=http://localhost:8080/
The display will change from the default Ubuntu Core web page to the sensor dashboard demo.
Page last edited June 08, 2026
Text editor powered by tinymce.