Everything About People Counting Solutions & Features

Raspberry Pi occupancy alerts — Automation Guide for Raspberry Pi Occupancy Alerts | Vemco Group

Written by Admin | Jul 14, 2026 10:21:41 AM

A Raspberry Pi sitting on a shelf near a doorway will happily fire an alert the moment a room crosses your headcount limit — but the interesting part isn't the alert. It's what happens in the 30 seconds after. Does it debounce a person who walks in and immediately turns back? Does it double-count a group entering shoulder to shoulder? Does the message reach a facility manager who can actually act, or does it die in a Slack channel nobody watches on weekends? Those questions decide whether your occupancy project is a demo or an operating tool.

Why the Pi is a good starting point, and where it stops

The Raspberry Pi earns its place because it does three jobs at once: it reads a sensor, runs local logic, and pushes an alert without a cloud round-trip. For a single meeting room, a lab, or a small library floor, that's often enough. You can wire a PIR sensor, a mmWave radar module, or a small camera with on-device inference, then run a Python service that maintains a running count and compares it against a threshold.

Where the Pi stops is scale and accountability. One Pi per zone is manageable. Forty Pis across a campus, each with its own firmware version, SD card wear, and Wi-Fi drop-outs, becomes a maintenance job nobody budgeted for. This is the line where teams either invest in a managed fleet or move counting to purpose-built sensors and keep the Pi as an edge relay.

Choosing your counting method

Your sensor choice sets a ceiling on accuracy before you write a line of code.

  • PIR: cheap, presence-only. Good for "is anyone here" automation, useless for counting.
  • mmWave radar: handles low light and privacy well, but struggles with dense groups and static occupants who don't move.
  • Overhead camera with on-device AI: the most accurate for directional counting, but you need good mounting height, even lighting, and a clear entry line.

A practitioner note that saves rework: side-mounted cameras look easier to install but wreck your count the first time two people cross in opposite directions. Overhead, top-down placement is worth the extra ladder time.

Building the alert logic

A count is not an alert. The logic between them is where most Pi projects quietly fail. Start with these rules baked into your service:

  • Debounce transitions: require the count to hold above the threshold for a few seconds before firing, so a single walk-through doesn't trigger a page.
  • Hysteresis on clearing: if your limit is 20, don't send an "all clear" the instant it drops to 19. Set a lower reset band to avoid flapping.
  • Exclude staff: counting employees against a public-space limit gives a false picture. Staff exclusion keeps the number tied to actual visitor load, which is exactly how Vemco separates operational headcount from occupancy figures.
  • Route by severity: a warning at 90% of limit goes to a dashboard; a breach goes to SMS or a webhook that a person owns.

Being honest about accuracy

If you present a number to a facility team, they will treat it as truth, so state its limits. A well-placed AI-based counting system typically reaches 98–99% accuracy when lighting, layout and visitor behaviour cooperate, with a contractual minimum around 96%. Vemco works to exactly that standard: a 96% floor, 98–99% in good conditions. Do not promise a flat 99% on a Pi rig you assembled last week — the moment sunlight hits a lens at the wrong angle, that claim collapses and your credibility with it.

Connecting alerts to real automation

An alert that only notifies is a fraction of the value. The payoff comes when occupancy drives building systems. When a floor empties, lights and HVAC should step down instead of running through the night — the always-on waste that quietly inflates energy bills in offices, universities and public buildings. On the Pi side, you expose the state through MQTT or a REST endpoint and let your BMS subscribe.

This is also the point where a DIY prototype and a production platform diverge. Vemco's VemFusion connects occupancy data directly to HVAC, BMS and security, so a threshold event isn't just a message — it's a state change other systems trust. VemSpace turns the same stream into space utilisation and facility optimisation reporting, which is what actually justifies the project to whoever signs off the budget. A Pi can prototype both ideas cheaply; a platform makes them auditable across a portfolio.

A deployment sequence that holds up

  • Mount the sensor, then validate raw counts by hand for a full day before touching alert logic.
  • Run the Pi service under systemd with auto-restart; log every count change with a timestamp for later tuning.
  • Use a read-only root filesystem or industrial SD cards — consumer cards die under constant writes, usually the week after you leave site.
  • Send a heartbeat alongside alerts, so silence means "sensor offline," not "room empty."
  • Set thresholds with the people who respond to them, not from a spreadsheet.

That heartbeat detail catches integrators out constantly. A missing alert reads as an empty, safe room right up until someone walks in and finds it packed.

Where a Pi ends and a partner begins

A Raspberry Pi is an excellent way to prove that occupancy alerts change behaviour in your building. Once the concept earns trust and you need accuracy guarantees, fleet management, and integration your BMS won't argue with, the economics shift toward a supported platform. Vemco has built exactly that since 2005, and the fastest path from a working prototype to a system your facility team relies on is a conversation about your specific spaces and thresholds. Talk to Vemco about turning your Raspberry Pi occupancy alerts into production-grade monitoring.