# andreas-glaser/ha-dessmonitor architecture

> Architecture diagram of the GitHub repository andreas-glaser/ha-dessmonitor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andreas-glaser/ha-dessmonitor
- Repository: https://github.com/andreas-glaser/ha-dessmonitor

## Overview

DessMonitor is a Home Assistant integration for Eybond solar inverters, offering cloud monitoring and controls, read-only local telemetry, and a hybrid mode that prefers local readings while retaining cloud fallback and settings. The graph follows setup and data collection into Home Assistant entities, and preserves device-specific mapping, support diagnostics, and local-protocol stages. Some local modules and platform files were not excerpted; their placement or relationships are omitted where the available references do not establish them.

Main entry points: [`custom_components/dessmonitor/__init__.py`](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/__init__.py) (Integration coordinator), [`custom_components/dessmonitor/local/coordinator.py`](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/coordinator.py) (Local coordinator), [`custom_components/dessmonitor/local/drivers.py`](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/drivers.py) (Local protocol drivers), [`custom_components/dessmonitor/local/hybrid.py`](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/hybrid.py) (Hybrid telemetry merge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and orchestration"]
  node_setup_flow["Integration setup<br/>[config_flow.py]"]
  node_integration["Integration coordinator<br/>[__init__.py]"]
end

subgraph group_cloud["Cloud monitoring"]
  node_cloud_api["Cloud API client<br/>[api.py]"]
  node_hybrid["Hybrid telemetry merge<br/>[hybrid.py]"]
  node_data_sources["Data source labels<br/>[data_sources.py]"]
end

subgraph group_local["Local monitoring"]
  node_local_coordinator["Local coordinator<br/>[coordinator.py]"]
  node_local_server["Collector server<br/>[server.py]"]
  node_local_discovery["Inverter discovery<br/>[discovery.py]"]
  node_local_drivers["Local protocol drivers<br/>[drivers.py]"]
  node_local_protocol["Frame and protocol parsing<br/>[protocol.py]"]
  node_local_profile["Device profiles<br/>[profile.py]"]
  node_local_modbus["Modbus framing<br/>[modbus.py]"]
  node_smg_protocol["SMG protocol 4<br/>[smg_protocol4.py]"]
end

subgraph group_entities["Entities and device support"]
  node_registry[("Device registry<br/>[device_registry.py]")]
  node_devcode_profiles["Devcode profiles"]
  node_sensor_mapping["Sensor title mapping<br/>[sensor_titles.py]"]
  node_sensors["Telemetry sensors<br/>[sensor.py]"]
  node_controls["Inverter controls<br/>[number.py]"]
  node_other_controls["Select and text controls<br/>[select.py]"]
end

subgraph group_support["Support diagnostics"]
  node_support_report["Support report<br/>[support_report.py]"]
  node_diagnostics["Integration diagnostics<br/>[diagnostics.py]"]
  node_local_diagnostics["Local diagnostics<br/>[diagnostics.py]"]
end

node_user(("Home Assistant user"))
node_cloud_service{{"DessMonitor / ShineMonitor"}}
node_collector{{"Eybond Wi-Fi collector"}}

node_user -->|"configures integration"| node_setup_flow
node_setup_flow -.->|"sets up entry"| node_integration
node_integration -->|"requests cloud data"| node_cloud_api
node_cloud_api -->|"reads account data"| node_cloud_service
node_integration -->|"starts local telemetry"| node_local_coordinator
node_integration -->|"selects hybrid mode"| node_hybrid
node_hybrid -->|"falls back to cloud"| node_cloud_api
node_hybrid -->|"prefers local readings"| node_local_coordinator
node_hybrid -->|"labels reading sources"| node_data_sources
node_local_coordinator -->|"manages connection"| node_local_server
node_local_server -->|"receives collector frames"| node_collector
node_local_coordinator -->|"discovers inverters"| node_local_discovery
node_local_coordinator -->|"selects and polls"| node_local_drivers
node_local_drivers -->|"uses discovery"| node_local_discovery
node_local_drivers -->|"parses protocol frames"| node_local_protocol
node_local_drivers -->|"uses device profiles"| node_local_profile
node_local_drivers -->|"uses SMG framing"| node_smg_protocol
node_smg_protocol -->|"uses Modbus framing"| node_local_modbus
node_registry -->|"registers profiles"| node_devcode_profiles
node_integration -->|"maps device readings"| node_registry
node_sensors -->|"resolves reading titles"| node_sensor_mapping
node_sensors -->|"publishes telemetry"| node_integration
node_controls -->|"updates settings"| node_integration
node_other_controls -.->|"exposes settings"| node_integration
node_controls -->|"loads device mappings"| node_registry
node_integration -->|"builds support report"| node_support_report
node_diagnostics -.->|"includes support evidence"| node_support_report
node_local_coordinator -.->|"records local evidence"| node_local_diagnostics
node_local_diagnostics -->|"uses profile details"| node_local_profile
node_local_diagnostics -->|"uses protocol details"| node_local_protocol

click node_setup_flow "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/config_flow.py"
click node_integration "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/__init__.py"
click node_cloud_api "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/api.py"
click node_hybrid "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/hybrid.py"
click node_data_sources "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/data_sources.py"
click node_local_coordinator "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/coordinator.py"
click node_local_server "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/server.py"
click node_local_discovery "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/discovery.py"
click node_local_drivers "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/drivers.py"
click node_local_protocol "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/protocol.py"
click node_local_profile "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/profile.py"
click node_local_modbus "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/modbus.py"
click node_smg_protocol "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/smg_protocol4.py"
click node_registry "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/device_support/device_registry.py"
click node_devcode_profiles "https://github.com/andreas-glaser/ha-dessmonitor/tree/main/custom_components/dessmonitor/device_support"
click node_sensor_mapping "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/sensor_titles.py"
click node_sensors "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/sensor.py"
click node_controls "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/number.py"
click node_other_controls "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/select.py"
click node_support_report "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/support_report.py"
click node_diagnostics "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/diagnostics.py"
click node_local_diagnostics "https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/diagnostics.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_setup_flow,node_integration,node_user toneBlue
class node_cloud_api,node_hybrid,node_data_sources toneAmber
class node_local_coordinator,node_local_server,node_local_discovery,node_local_drivers,node_local_protocol,node_local_profile,node_local_modbus,node_smg_protocol toneMint
class node_registry,node_devcode_profiles,node_sensor_mapping,node_sensors,node_controls,node_other_controls toneRose
class node_support_report,node_diagnostics,node_local_diagnostics,node_cloud_service,node_collector toneIndigo
```

## Components

### Setup and orchestration

- [Integration setup](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/config_flow.py): `custom_components/dessmonitor/config_flow.py`
- [Integration coordinator](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/__init__.py): `custom_components/dessmonitor/__init__.py`

### Cloud monitoring

- [Cloud API client](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/api.py): `custom_components/dessmonitor/api.py`
- [Hybrid telemetry merge](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/hybrid.py): `custom_components/dessmonitor/local/hybrid.py`
- [Data source labels](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/data_sources.py): `custom_components/dessmonitor/data_sources.py`

### Local monitoring

- [Local coordinator](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/coordinator.py): `custom_components/dessmonitor/local/coordinator.py`
- [Collector server](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/server.py): `custom_components/dessmonitor/local/server.py`
- [Inverter discovery](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/discovery.py): `custom_components/dessmonitor/local/discovery.py`
- [Local protocol drivers](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/drivers.py): `custom_components/dessmonitor/local/drivers.py`
- [Frame and protocol parsing](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/protocol.py): `custom_components/dessmonitor/local/protocol.py`
- [Device profiles](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/profile.py): `custom_components/dessmonitor/local/profile.py`
- [Modbus framing](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/modbus.py): `custom_components/dessmonitor/local/modbus.py`
- [SMG protocol 4](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/smg_protocol4.py): `custom_components/dessmonitor/local/smg_protocol4.py`

### Entities and device support

- [Device registry](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/device_support/device_registry.py): `custom_components/dessmonitor/device_support/device_registry.py`
- [Devcode profiles](https://github.com/andreas-glaser/ha-dessmonitor/tree/main/custom_components/dessmonitor/device_support): `custom_components/dessmonitor/device_support`
- [Sensor title mapping](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/sensor_titles.py): `custom_components/dessmonitor/sensor_titles.py`
- [Telemetry sensors](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/sensor.py): `custom_components/dessmonitor/sensor.py`
- [Inverter controls](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/number.py): `custom_components/dessmonitor/number.py`
- [Select and text controls](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/select.py): `custom_components/dessmonitor/select.py`

### Support diagnostics

- [Support report](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/support_report.py): `custom_components/dessmonitor/support_report.py`
- [Integration diagnostics](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/diagnostics.py): `custom_components/dessmonitor/diagnostics.py`
- [Local diagnostics](https://github.com/andreas-glaser/ha-dessmonitor/blob/main/custom_components/dessmonitor/local/diagnostics.py): `custom_components/dessmonitor/local/diagnostics.py`

### Other components

- **Home Assistant user**
- **DessMonitor / ShineMonitor**
- **Eybond Wi-Fi collector**

## Connections

- Home Assistant user → Integration setup: configures integration (evidence: `README.md`)
- Integration setup → Integration coordinator: sets up entry
- Integration coordinator → Cloud API client: requests cloud data (evidence: `custom_components/dessmonitor/__init__.py`)
- Cloud API client → DessMonitor / ShineMonitor: reads account data (evidence: `README.md`)
- Integration coordinator → Local coordinator: starts local telemetry (evidence: `custom_components/dessmonitor/__init__.py`)
- Integration coordinator → Hybrid telemetry merge: selects hybrid mode (evidence: `custom_components/dessmonitor/__init__.py`)
- Hybrid telemetry merge → Cloud API client: falls back to cloud (evidence: `custom_components/dessmonitor/local/hybrid.py`)
- Hybrid telemetry merge → Local coordinator: prefers local readings (evidence: `custom_components/dessmonitor/local/hybrid.py`)
- Hybrid telemetry merge → Data source labels: labels reading sources (evidence: `custom_components/dessmonitor/local/hybrid.py`)
- Local coordinator → Collector server: manages connection (evidence: `custom_components/dessmonitor/local/coordinator.py`)
- Collector server → Eybond Wi-Fi collector: receives collector frames (evidence: `README.md`)
- Local coordinator → Inverter discovery: discovers inverters (evidence: `custom_components/dessmonitor/local/coordinator.py`)
- Local coordinator → Local protocol drivers: selects and polls (evidence: `custom_components/dessmonitor/local/coordinator.py`)
- Local protocol drivers → Inverter discovery: uses discovery (evidence: `custom_components/dessmonitor/local/drivers.py`)
- Local protocol drivers → Frame and protocol parsing: parses protocol frames (evidence: `custom_components/dessmonitor/local/drivers.py`)
- Local protocol drivers → Device profiles: uses device profiles (evidence: `custom_components/dessmonitor/local/drivers.py`)
- Local protocol drivers → SMG protocol 4: uses SMG framing (evidence: `custom_components/dessmonitor/local/drivers.py`)
- SMG protocol 4 → Modbus framing: uses Modbus framing (evidence: `custom_components/dessmonitor/local/smg_protocol4.py`)
- Device registry → Devcode profiles: registers profiles (evidence: `custom_components/dessmonitor/device_support/device_registry.py`)
- Integration coordinator → Device registry: maps device readings (evidence: `custom_components/dessmonitor/__init__.py`)
- Telemetry sensors → Sensor title mapping: resolves reading titles (evidence: `custom_components/dessmonitor/sensor.py`)
- Telemetry sensors → Integration coordinator: publishes telemetry (evidence: `custom_components/dessmonitor/sensor.py`)
- Inverter controls → Integration coordinator: updates settings (evidence: `custom_components/dessmonitor/number.py`)
- Select and text controls → Integration coordinator: exposes settings
- Inverter controls → Device registry: loads device mappings (evidence: `custom_components/dessmonitor/number.py`)
- Integration coordinator → Support report: builds support report (evidence: `custom_components/dessmonitor/__init__.py`)
- Integration diagnostics → Support report: includes support evidence
- Local coordinator → Local diagnostics: records local evidence
- Local diagnostics → Device profiles: uses profile details (evidence: `custom_components/dessmonitor/local/diagnostics.py`)
- Local diagnostics → Frame and protocol parsing: uses protocol details (evidence: `custom_components/dessmonitor/local/diagnostics.py`)
