# fboundy/ha_solis_modbus architecture

> Architecture diagram of the GitHub repository fboundy/ha_solis_modbus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fboundy/ha_solis_modbus
- Repository: https://github.com/fboundy/ha_solis_modbus

## Overview

##### Main Components

a) Core Components:
- Home Assistant Instance
- Solis Hybrid Inverter
- Data Logging Stick (Two variants: DLS-LAN or S2-WL-ST)
- Battery Storage System
- Grid Connection
- Solar Panels

b) Integration Components:
- MODBUS TCP Interface
- Template Sensors
- Scripts & Automations
- Input Helpers
- External Services (forecast.solar)

##### Component Details

Home Assistant:
- MODBUS Integration
- Input Registers (33xxx)
- Holding Registers (43xxx)
- Template Sensors
- Scripts
- Charge Control
- Time Settings
- Storage Mode Control
- Automations
- SOC Management
- Eco7 Control
- Octopus Integration

Inverter Communication:
- TCP Ports (502/8899)
- MODBUS Registers
- Read/Write Operations

##### Special Features

Separate sections for:
- FB00 Firmware Support
- Economy 7 Features
- Forecast Solar Integration
- Battery Management System

##### Notes Section

A small notes section indicating:
- Supported firmware versions
- Compatible hardware models
- Key configuration requirements

Remember to include version information and any firmware-specific variations (FB00 vs. standard) as alternate views or clearly marked sections.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Physical Layer
    subgraph Physical
        Solar["Solar Panels"]
        Battery["Battery Storage"]
        Grid["Power Grid"]
        Inverter["Solis Hybrid Inverter"]
        DLS["Data Logging Stick<br/>(DLS-LAN/S2-WL-ST)"]
    end

    %% Communication Layer
    subgraph Communication
        MODBUS["MODBUS TCP Interface<br/>Ports: 502/8899"]:::comm
        TestTools["MODBUS Testing Tools"]:::testing
    end

    %% Home Assistant Layer
    subgraph HomeAssistant
        Core["Core Integration"]:::core
        FB00["FB00 Firmware Support"]:::firmware
        Templates["Template Sensors"]:::sensors
        Scripts["Scripts & Automations"]:::automation
        Inputs["Input Helpers"]:::config
        Dashboard["Dashboards & UI"]:::ui
        Eco7["Economy 7 Features"]:::feature
        Octopus["Octopus Integration"]:::feature
    end

    %% External Services
    ForecastSolar["forecast.solar API"]:::external

    %% Relationships
    Solar --> Inverter
    Battery --> Inverter
    Grid <--> Inverter
    Inverter --> DLS
    DLS --> MODBUS
    MODBUS --> Core
    Core --> Templates
    Core --> Scripts
    Core --> FB00
    Scripts --> Inputs
    Templates --> Dashboard
    Eco7 --> Scripts
    Octopus --> Scripts
    ForecastSolar --> Templates

    %% Click Events
    click Core "https://github.com/fboundy/ha_solis_modbus/blob/main/solis.yaml"
    click FB00 "https://github.com/fboundy/ha_solis_modbus/blob/main/solis_fb00.yaml"
    click TestTools "https://github.com/fboundy/ha_solis_modbus/blob/main/pymodbus_test.py"
    click Eco7 "https://github.com/fboundy/ha_solis_modbus/blob/main/eco7-automations.yaml"
    click Octopus "https://github.com/fboundy/ha_solis_modbus/blob/main/octopus_intelligent.yaml"
    click Dashboard "https://github.com/fboundy/ha_solis_modbus/blob/main/solis-dashboard.yaml"
    click Inputs "https://github.com/fboundy/ha_solis_modbus/blob/main/inputs.yaml"
    click Scripts "https://github.com/fboundy/ha_solis_modbus/blob/main/scripts.yaml"
    click Templates "https://github.com/fboundy/ha_solis_modbus/blob/main/solis-template.yaml"

    %% Styles
    classDef physical fill:#gray
    classDef comm fill:#blue,color:#fff
    classDef core fill:#2ecc71,color:#fff
    classDef firmware fill:#e74c3c,color:#fff
    classDef sensors fill:#3498db,color:#fff
    classDef automation fill:#9b59b6,color:#fff
    classDef config fill:#f1c40f
    classDef ui fill:#1abc9c,color:#fff
    classDef feature fill:#e67e22,color:#fff
    classDef external fill:#95a5a6
    classDef testing fill:#34495e,color:#fff

    %% Legend
    subgraph Legend
        L1[Physical Components]:::physical
        L2[Communication]:::comm
        L3[Core Integration]:::core
        L4[Firmware Support]:::firmware
        L5[Sensors]:::sensors
        L6[Automation]:::automation
        L7[Configuration]:::config
        L8[User Interface]:::ui
        L9[Features]:::feature
        L10[External Services]:::external
        L11[Testing Tools]:::testing
    end
```
