How vysocan/ohs_2-gateway works
Open Home Security GW is firmware for an STM32-based home-security gateway. Its user-facing workflow is browser or MQTT command → gateway handler → security state/configuration, with status and alerts presented through the interface or messaging integrations. The tree also identifies radio, RS-485, modem, sensor, timer, trigger, logging, and service subsystems. The excerpts confirm HTTP page dispatch and MQTT group-control calls, but omit much of startup and task wiring; uncertain runtime links are therefore left out.
Main entry points: ohs_httpd_handler.h HTTP page dispatch · ohs_conf.h Persistent configuration · httpd_handler_group.h Group controls · mqtt_cmd_handler.h MQTT commands
Components 22
Web interface
- HTTP page dispatch
ohs_httpd_handler.h - Group controls
httpd/httpd_handler_group.h - Settings pages
httpd/httpd_handler_setting.h - Trigger editor
httpd/httpd_handler_trigger.h - Timer editor
httpd/httpd_handler_timer.h - Script editor
httpd/httpd_handler_tcl.h
Security domain
- Alarm groups
ohs_th_alarm.h - Zones
ohs_th_zone.h - Trigger evaluation
ohs_th_trigger.h - Scheduled actions
ohs_th_alarm.h - Tcl scripts
source/tcllib.c
Connectivity
- MQTT integration
ohs_mqtt_functions.h - MQTT commands
mqtt_cmd_handler.h - Radio link
ohs_th_radio.h - RS-485 link
ohs_th_rs485.h - Cellular modem
ohs_th_modem.h
Runtime services
- Firmware entry
main.c - Event logging
ohs_th_logger.h - System service
ohs_th_service.h - Persistent configuration
ohs_conf.h
Other components
- Operator
- MQTT broker
Connections 18
- Operator → HTTP page dispatch: requests pages
- HTTP page dispatch → Group controls: dispatches pages
- HTTP page dispatch → Settings pages: dispatches pages
- HTTP page dispatch → Trigger editor: dispatches pages
- HTTP page dispatch → Timer editor: dispatches pages
- HTTP page dispatch → Script editor: dispatches pages
- Group controls → Persistent configuration: reads settings
- Group controls → Alarm groups: disarms group
- Settings pages → Persistent configuration: reads settings
- Trigger editor → Persistent configuration: reads trigger config
- Timer editor → Persistent configuration: reads timer config
- Script editor → Tcl scripts: manages scripts
- MQTT broker → MQTT integration: exchanges messages
- MQTT integration → MQTT commands: dispatches commands
- MQTT commands → Alarm groups: arms or disarms
- MQTT commands → Zones: requests refresh
- Firmware entry → HTTP page dispatch: includes handler
- Firmware entry → MQTT integration: includes integration