Real time parking occupancy monitoring and RFID gate access, built on an ESP32 and Firebase, with a static web dashboard.
- Overview
- How it works
- Requirements
- Repository layout
- Installation
- Configuration
- Usage
- Deployment
- Documentation
- License
AutoStelle monitors a small car park and controls a barrier at its reserved bays. Ultrasonic sensors report whether each slot is occupied, an RFID reader decides who may pass, and a browser dashboard shows the current state to anyone who opens it.
| Capability | Description |
|---|---|
| Occupancy monitoring | One ultrasonic sensor per slot; state changes are pushed to the database and appear in the dashboard within about a second |
| Access control | Tag UIDs are checked against the database on every tap; unknown tags are refused |
| Tag enrolment | Admins register a tag from the browser through a scan handshake, with no reflashing |
| Register management | Search, sort, delete and bulk delete of registered tags |
| Access model | Occupancy is world readable, everything else requires a signed in account |
| Credential handling | Firmware credentials live in an untracked arduino_secrets.h |
The reference build uses six slots, three normal and three reserved. The slot count is set by the pin arrays in the firmware, and by the slot markup and slot map in the web app; see Configuration.
flowchart LR
subgraph Site
US[Ultrasonic sensors] --> ESP[ESP32]
RF[MFRC522 reader] --> ESP
ESP --> SV[Gate servo]
end
ESP <-->|sign in + read/write| FB[(Firebase Realtime Database)]
subgraph Browser
MON[Monitor page]
ADM[Admin panel]
end
FB -->|live listeners| MON
FB <-->|sign in + writes| ADM
The database is the only channel between the device and the browser. Neither side talks to the other directly, so the dashboard works from any network.
The firmware uses both ESP32 cores. Core 1 runs a task that sweeps the
sensors and writes occupancy; core 0 runs the Arduino loop(), which reads
tags and drives the servo. Each has its own Firebase connection object.
Full data model and the enrolment sequence: docs/FIREBASE.md.
| Category | Requirement |
|---|---|
| Hardware | ESP32 development board, one HC-SR04 per slot, MFRC522 reader and tags, hobby servo, 5 V supply. Details in docs/HARDWARE.md |
| Firmware toolchain | Arduino IDE 2.x with the ESP32 board package, or PlatformIO |
| Backend | A Firebase project with Realtime Database and Email/Password authentication, on the free plan |
| Web | Any static file server for local use; a modern browser with ES module support |
AutoStelle/
|-- web/ static dashboard, no build step
| |-- index.html monitor page and admin panel
| |-- login.html admin sign in
| |-- assets/css/style.css
| `-- src/
| |-- config.js Firebase project config and database paths
| |-- firebase.js app, auth and database handles
| |-- login.js sign in flow
| |-- monitor.js live slots, enrolment, register
| `-- ui.js modals and password toggle
|
|-- firmware/
| |-- AutoStelle/
| | |-- AutoStelle.ino sketch
| | |-- config.h pins, thresholds, database paths
| | `-- arduino_secrets.example.h credential template
| |-- platformio.ini optional PlatformIO build
| `-- README.md libraries, board settings, upload
|
|-- database/rules.json Realtime Database security rules
|-- docs/ setup, hardware, Firebase, configuration
`-- .github/workflows/ Pages deploy, firmware compile check
Summary; the step by step guide is docs/SETUP.md.
git clone https://github.com/EagleStelle/AutoStelle.git
cd AutoStelle-
Backend. Create a Firebase project, enable Realtime Database and Email/Password sign in, create an admin user and a device user, then apply
database/rules.json. See docs/FIREBASE.md. -
Web app. Put your own Firebase project values in
web/src/config.js, then serve thewebfolder. ES modules do not load overfile://:cd web python -m http.server 5500 # then open http://localhost:5500
-
Firmware. Create the credentials file, fill it in, and upload:
cp firmware/AutoStelle/arduino_secrets.example.h firmware/AutoStelle/arduino_secrets.h
Open
firmware/AutoStelle/AutoStelle.inoin the Arduino IDE, select ESP32 Dev Module, and upload. Library list and board setup are in firmware/README.md.
Three files hold all configuration. Nothing else needs editing to run the project against your own Firebase project and wiring.
| File | Tracked in git | Holds |
|---|---|---|
firmware/AutoStelle/arduino_secrets.h |
No, ignored | Wi-Fi credentials, Firebase API key, database URL, device account |
firmware/AutoStelle/config.h |
Yes | Sensor and servo pins, occupancy threshold, timings, database paths |
web/src/config.js |
Yes | Firebase web config and database paths |
The secrets file is created by copying arduino_secrets.example.h. The sketch
will not compile without it:
error: Missing arduino_secrets.h - copy arduino_secrets.example.h to
arduino_secrets.h and fill in your credentials.
In the Arduino IDE the file appears as its own tab beside the sketch, which is where Arduino projects conventionally keep credentials.
The values in web/src/config.js are public Firebase identifiers rather than
secrets, since any visitor can read them from the browser. What protects the
data is database/rules.json. Every option is described in
docs/CONFIGURATION.md.
- Open the dashboard. Occupied slots are highlighted as sensors detect a vehicle.
- Double click the AutoStelle branding in the footer to reach the sign in page. "Continue as User" returns to the read only view.
- After signing in, the gear button in the footer switches between the monitor and the register.
- Choose Reserve, enter a name and plate number, then tap a tag at the reader to register it.
- Tapping a registered tag opens the gate for three seconds. Unregistered tags are logged as denied on the serial monitor.
The web app is plain static files, so any host will serve it. The included
workflow publishes web/ to GitHub Pages on every push to main; enable it
once under Settings > Pages > Build and deployment > Source > GitHub Actions.
When serving from a custom domain, add that domain under Firebase console > Authentication > Settings > Authorized domains, or sign in will be rejected.
| Document | Contents |
|---|---|
| docs/SETUP.md | Step by step setup, verification, troubleshooting |
| docs/HARDWARE.md | Bill of materials, pin map, wiring notes, calibration |
| docs/FIREBASE.md | Accounts, security rules, data model, enrolment flow |
| docs/CONFIGURATION.md | Reference for every configuration option |
| firmware/README.md | Libraries, board settings, upload, PlatformIO |
AGPL-3.0. Copyright (c) 2025 EagleStelle.