Set up Supabase-backed remote monitoring for your HIL benches with a GitHub Pages dashboard.
- Go to supabase.com and create a new project.
- Note the Project URL and anon public API key from Settings → API.
Open the SQL Editor in the Supabase dashboard and run each migration file in order:
supabase/migrations/001_create_tables.sql— createsbenches,bench_status_current,bench_eventstablessupabase/migrations/002_rls_policies.sql— enables row-level securitysupabase/migrations/003_dashboard_view.sql— creates thebench_dashboardview
For each bench Pi, create a user in Supabase Auth:
- Go to Authentication → Users → Add user
- Set email (e.g.,
bench-01@your-domain.com) and password - In user metadata, add:
{"bench_name": "your-bench-name"}
The bench_name in metadata must match the bench_name in the bench's config.yaml.
For anyone who needs to view the dashboard (but not publish data):
- Go to Authentication → Users → Add user
- Set email and password
- No user metadata is needed — any authenticated user can view all benches
Viewer accounts are read-only. The RLS policies only allow writes from accounts with a matching bench_name in their metadata.
On each Pi, create /etc/hil-bench/supabase.env:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key
BENCH_EMAIL=bench-01@your-domain.com
BENCH_PASSWORD=the-password-you-setSet permissions:
sudo chmod 600 /etc/hil-bench/supabase.envOr use the bootstrap script:
sudo ./bootstrap/install_publisher.sh /path/to/repo https://your-project.supabase.co your-anon-key# Install supabase package
/opt/hil-bench/venv/bin/pip install "supabase>=2.11"
# Test one-shot publish
benchctl publish status
# Enable heartbeat service
sudo systemctl enable --now hil-bench-publisher-
Add repository secrets:
VITE_SUPABASE_URL— your project URLVITE_SUPABASE_ANON_KEY— your anon key
-
Enable GitHub Pages (Settings → Pages → Source: GitHub Actions)
-
Create a release tag:
git tag dashboard-v0.1.0 git push origin dashboard-v0.1.0
cd dashboard
cp .env.example .env
# Edit .env with your Supabase credentials
npm install
npm run dev- Check bench registration:
benchctl publish config - Run one-shot publish:
benchctl publish status - Verify in Supabase: check the
bench_dashboardview in Table Editor - Open the dashboard URL and sign in
- Confirm your bench appears with current state and heartbeat