📦 DeliveryBox ↔ Switch
Box Offline
⇄ —
Announcement language
—
Front · Delivery —
Rear · Collection —
Courier Access PIN · auto-rotates after each use
----
🔐 Confirmation Codes / OTPs
Spoken at door-close when delivery weight doesn't match any configured slot.
Configure Delivery Confirmation Codes · 5 slots
Set OTP + courier + expected weight per delivery. Box auto-announces the matching code when that weight is placed inside.
Delivery 1
Delivery 2
Delivery 3
Delivery 4
Delivery 5
Spoken at door-close when pickup weight doesn't match any configured slot.
Configure Pickup Confirmation Codes · 2 slots
Place the return/exchange item in the box. When the courier removes it, the box auto-announces the matching OTP to confirm successful pickup.
Pickup 1
Pickup 2
● Idle
Arms a collection cycle. The box welcomes, waits for the chosen door to open, then announces parcels collected after close.
Gate —
Live Box Status
Keypad Entry
- - - -
Enter PIN on box
● Box Offline
Live Weight
-- g -- kg
⏳ measuring…
Front · Delivery
—
Rear · Collection
—
0 5 kg --
Last Delivery
-- g -- kg
Detected
—
Box Contents
Box is empty.
Offline OTP single-use · offline · tap to copy
Loading…
📸 Delivery Photos · recent shots
No delivery photos yet — first one will appear here when a delivery is detected.
📋 Activity Log · since last collection
📥 Deliveries · max 6
No deliveries recorded this session.
📤 Pickups · max 3
No pickups this session.
📦 Collections · max 3
No collections this session.
⚙ Settings & Advanced (saved in this browser)
Broker: —
🛰 Box Connectivity & Diagnostics

The box POSTs a heartbeat every 30 s. It is shown as offline once 90 s pass with no heartbeat. This is independent of whether this app is connected to the MQTT broker — the broker stays reachable even when the box is unplugged, which is why the two are reported separately.

📶 WiFi Networks
Connected to: —

Saved networks are tried in order on boot and on every reconnect. The box skips any that are not currently in range, so a dead entry costs seconds, not minutes.

📲 Bluetooth Wi-Fi Setup (works offline)

Setup Hotspot (works on any phone)

The box raises its own Wi-Fi hotspot. Join CourierBox-Setup with password 12345678, and the setup page opens by itself. The box does this automatically after two minutes offline — this button is for triggering it early, and needs the box to still be reachable.

⚖ Weight Sensor Calibration

Two-step calibration: first tare with nothing on the scale, then place a known weight and calibrate. Works over MQTT from anywhere.

Current Reading
-- g
Scale: --
Offset: --
g. Bigger values above this show exactly. Readings over 50 kg are ignored as bad reads.

Remove all weight from the scale, then click Tare.

Place a known weight on the scale, enter its value in grams, then click Calibrate.

MQTT Connection

Tip: MQTT works cross-origin. HTTP fallback requires device CORS headers.

🎨 Theme
Light, Dark, or Auto (follows your device). Saved in this browser.
📡 Device Access — AP Mode

Start AP mode to add a new network from another device. The box stays connected to its current network while AP is active.

📷 ESP32-CAM
Status of the camera peer device + sensor tweaks. Status auto-updates every ~30 s.
SSID: — IP: — mDNS: — RSSI: — Sensor: —
Preferred — delivery photos load from <worker>/photo/<file> via Cloudflare's HTTPS edge. The cam uploads each new snap to this URL automatically.
Optional fallback. Used for /stream (live MJPEG) and as the photo source if the Worker URL above isn't set. Only needed if you want internet-reachable live preview.
🔬 Camera diagnostics
MQTT broker: — Cam online (last state): — Worker URL configured: — Cam knows Worker URL: — Upload queue depth: — Last upload: —
☁ Photos on Worker (—)
(not loaded — tap 🖼 Refresh gallery)
📋 Live camera event log
WiFi for the camera
The ESP32-CAM has its WiFi credentials baked into the firmware (currently Grace_5G). To switch networks, edit WIFI_SSID/WIFI_PASS in esp32-cam-firmware/src/main.cpp and re-flash. Full MQTT-driven WiFi management (like the main box has) is on the roadmap.
Controls — LED & Relays
State: …
-- g
Raw: -- · Age: --
🔒 Lock Settings

How long the door-lock solenoid stays energised per unlock. Trim it to the shortest time that still reliably throws the bolt — shorter pulses run cooler and extend the solenoid's life. Accepts decimals for fine tuning.

Current lock pulse
-- s

Range 0.10–10.0 s. Applies to the front-door lock (the main gate keeps its own timing). Saved on the device; the built-in default is used until you change it.

Door-closed hold

How long the door must stay closed, without a single flicker, before the box treats it as locked — only then does it announce the confirmation code and tell the app the parcel is secure. Raise it if a door resting on the catch ever counts as locked; lower it if couriers are left waiting. Any flicker restarts the hold.

Current hold
-- s

Range 1.0–15.0 s, clamped on the device. Default 3.5 s. Watch Diagnostic — Last door-close judgment below while testing: it reports how many times the hold restarted, which is the number that tells you the mechanism needs a longer window rather than a luckier push.

💡 Lighting & UV
Box light

What the light does when nothing is happening. It still comes on by itself at every unlock, stays on while the door is open and goes off 5 s after it closes — that is unchanged in all three modes.

Sunrise
--:--
Sunset
--:--
Box clock
--:--
—
Location · for the sunrise/sunset schedule

The box fetches its sunrise and sunset times for this position once a day and caches them. It keeps using the cached times when it is offline — they drift only a minute or two a day, so even a week-old copy is within ten minutes.

Saving clears the cached times and re-fetches, so the box is never lit to the previous location's dusk. India is 330 minutes (UTC+05:30).

UV lamp · relay channel 3
⚠️
This lamp does not sanitise anything. The fitted unit is a screen-protector glue curer — UV-A, 365–405 nm. Disinfection needs UV-C at about 254 nm. Treat this as an auxiliary light on a timer.
It still will not run while the door is open, while the lock is unconfirmed, while the rear hatch is open, or within moments of anyone touching the keypad.
Lamp
—
Used today
-- min
—

A cycle is one run, capped at 60 min. Min gap stops back-to-back runs when several parcels arrive together. The daily cap bounds the total and counts minute by minute while running, so an interrupted cycle still costs its budget. 0 means uncapped. Default is 10 min — long UV exposure embrittles the box's own plastics and gaskets, which is why an hour per delivery is not offered.

🔊 Speaker Volume

Playback level per kind of sound, saved on the box. Drag a slider and release to apply — each one is sent on its own, so moving Announcements never overwrites a level you have not refreshed.

--%
Confirmation codes, welcomes and box summaries — the voice a courier has to hear from outside.
--%
Beep on each accepted key. Drag to 0 to switch the tone off entirely.
--%
Wrong PIN, door left open, gate lockout.
Keypad Log
Input: (empty) age: -- ms

Requires Device HTTP Base + CORS on device.

Session
🔍 Diagnostic — Last door-close judgment
Shows what the device decided at the last door close. Useful only for debugging when OTPs don't speak as expected.
Last delta: —
Decision: —
OTP spoken: —
Delivery manual in memory: —
Pickup manual in memory: —
🚪 Main Gate ↔ Switch
Box Offline
🚪
Main Gate
🔓 HOLD TO UNLOCK press & hold ½ s
No unlocks yet
🔑 Main Gate Access
Recent activity
No activity yet — unlocks (PWA or wireless remote) will show up here.