How astroctrl-dev/ha-mbus-energy-public works
This is a Home Assistant app for reading Landis+Gyr T230 meters over wired M-Bus and publishing validated measurements and diagnostics through MQTT Discovery. The primary workflow is meter selection in the Web UI, scheduled serial polling, frame validation and decoding, then Home Assistant publication. Separate user-triggered workflows retrieve monthly archives, synchronize the meter clock, and export stored analysis. The index and excerpts show the main orchestration and several internal dependencies; some unsampled feature wiring is documented only in the README, so those links cite it.
Main entry points: mbus_service.py App service · history_controller.py History controller · mqtt_bridge.py MQTT bridge · meter_ui.py Web UI
Components 26
App and UI
- App service
mbus_probe/mbus_service.py - Web UI
mbus_probe/meter_ui.py - Meter discovery
mbus_probe/meter_discovery.py - Meter registry
mbus_probe/meter_registry.py - Poll schedule
mbus_probe/poll_schedule.py
Meter communication
- M-Bus probe
mbus_probe/mbus_probe.py - Transmission gate
mbus_probe/bus_timing.py - Record decoder
mbus_probe/mbus_records.py - Telegram log
mbus_probe/raw_telegram_log.py
History and maintenance
- History controller
mbus_probe/history_controller.py - Archive acquisition
mbus_probe/archive_acquisition.py - Monthly diagnostics
mbus_probe/monthly_diagnostic.py - Monthly retry
mbus_probe/monthly_retry.py - History model
mbus_probe/history_model.py - Clock maintenance
mbus_probe/clock_maintenance.py - DST evidence
mbus_probe/dst_transition.py - Diagnostic runtime
mbus_probe/diagnostic_runtime.py - Frame-5 capture
mbus_probe/frame5_capture.py
Publishing and analysis
- Measurement projection
mbus_probe/ha_measurements.py - MQTT bridge
mbus_probe/mqtt_bridge.py - Analysis export
mbus_probe/analysis_export.py - Archive view
mbus_probe/archive_view.py
Other components
- Home Assistant user
- M-Bus meter
- MQTT broker
- Local analysis data
Connections 29
- Home Assistant user → Web UI: uses
README.md - Web UI → App service: requests actions
mbus_probe/meter_ui.py - App service → Meter registry: manages selection
mbus_probe/mbus_service.py - App service → Poll schedule: schedules polling
mbus_probe/mbus_service.py - App service → M-Bus probe: reads meter
mbus_probe/mbus_service.py - M-Bus probe → Transmission gate: writes through
mbus_probe/mbus_probe.py - M-Bus probe → M-Bus meter: exchanges frames
README.md - Transmission gate → Telegram log: captures transmission
mbus_probe/bus_timing.py - M-Bus probe → Record decoder: validates frames
mbus_probe/mbus_probe.py - App service → Measurement projection: projects readings
mbus_probe/mbus_service.py - Measurement projection → MQTT bridge: provides measurements
mbus_probe/mqtt_bridge.py - MQTT bridge → MQTT broker: publishes discovery
README.md - App service → MQTT bridge: publishes readings
mbus_probe/mbus_service.py - Home Assistant user → History controller: requests history
README.md - Web UI → History controller: starts retrieval
mbus_probe/meter_ui.py - History controller → Archive acquisition: collects archive
mbus_probe/history_controller.py - Archive acquisition → Monthly diagnostics: reads monthly records
mbus_probe/archive_acquisition.py - History controller → History model: stores validated history
mbus_probe/history_controller.py - History controller → Monthly retry: tracks failures
mbus_probe/history_controller.py - History controller → MQTT bridge: publishes history
mbus_probe/history_controller.py - Home Assistant user → Clock maintenance: requests synchronization
README.md - Clock maintenance → Transmission gate: gates clock writes
mbus_probe/clock_maintenance.py - Clock maintenance → DST evidence: records transitions
mbus_probe/clock_maintenance.py - App service → Diagnostic runtime: runs diagnostics
mbus_probe/mbus_service.py - Home Assistant user → Frame-5 capture: requests capture
README.md - Web UI → Analysis export: downloads analysis
mbus_probe/meter_ui.py - Analysis export → Local analysis data: reads stored data
README.md - History controller → Archive view: projects archive
mbus_probe/history_controller.py - MQTT bridge → Archive view: publishes archive attributes
mbus_probe/mqtt_bridge.py