How ivancordova/smart-doorbell-api works
Smart Doorbell is a multi-service ESP32-CAM doorbell: the API streams video, identifies visitors, records events, and serves a web panel; voice handles visitor announcements and wake-word commands; NLU interprets commands and returns spoken responses and actions. The documented command path runs from microphone/ASR through voice and NLU, consults API state for CHECK, then returns commands through the API to the camera relay. The API implementation is sampled only in part; unsampled capabilities and service links are included where the README documents them.
Main entry points: app/main.py Video API · app/main.py NLU orchestration · voice_service.py Voice orchestration · nlu_service.py NLU HTTP adapter
Components 21
Video gateway
- Video API
services/api/app/main.py - Face detection and recognition
services/api/app/main.py - Visit and event history
services/api/app/main.py - People registry
services/api/app/main.py - Web panel
services/api/templates/home.html - Registration view
services/api/templates/register.html
Voice service
- Voice orchestration
services/voice/app/voice_service.py - Audio capture and ASR
services/voice/app/audio_asr.py - Wake word and command FSM
services/voice/app/voice_service.py - Speech output
services/voice/app/voice_service.py
Language and access
- NLU HTTP adapter
services/nlu/app/nlu_service.py - NLU orchestration
services/nlu/app/main.py - Lexical normalization
services/nlu/app/preprocesador.py - Dependency analysis
services/nlu/app/analizador_sintactico.py - Legacy intent matching
services/nlu/app/intents.py - Access ontology
services/nlu/app/ontologia.py - Action executor
services/nlu/app/actuador.py
Camera and access
- ESP32-CAM
- Camera relay client
services/api/app/relay.py
Other components
- Visitor
- Panel user
Connections 25
- Visitor → ESP32-CAM: appears before
README.md - ESP32-CAM → Video API: sends MJPEG
README.md - Video API → Face detection and recognition: processes frames
README.md - Face detection and recognition → Visit and event history: records events
README.md - Face detection and recognition → People registry: matches registered faces
README.md - Video API → Web panel: renders panel
README.md - Video API → Registration view: renders registration
README.md - Panel user → Web panel: uses
README.md - Video API → Voice orchestration: announces visitors
README.md - Voice orchestration → Audio capture and ASR: uses recognizer
services/voice/app/voice_service.py - Audio capture and ASR → Wake word and command FSM: provides audio chunks
services/voice/app/voice_service.py - Wake word and command FSM → NLU HTTP adapter: submits transcript
README.md - NLU HTTP adapter → NLU orchestration: classifies text
services/nlu/app/nlu_service.py - NLU orchestration → Lexical normalization: normalizes text
services/nlu/app/main.py - NLU orchestration → Dependency analysis: analyzes syntax
services/nlu/app/main.py - NLU orchestration → Legacy intent matching: checks compatibility
services/nlu/app/main.py - NLU orchestration → Access ontology: resolves access
services/nlu/app/main.py - NLU orchestration → Action executor: executes action
services/nlu/app/main.py - Action executor → Access ontology: updates access state
services/nlu/app/actuador.py - NLU HTTP adapter → Video API: reads CHECK context
services/nlu/app/nlu_service.py - NLU HTTP adapter → Voice orchestration: returns command and reply
README.md - Voice orchestration → Speech output: speaks response
README.md - Voice orchestration → Video API: sends voice command
README.md - Video API → Camera relay client: dispatches relay action
services/api/app/main.py - Camera relay client → ESP32-CAM: calls relay endpoint
README.md