# manuellr/momahome architecture

> Architecture diagram of the GitHub repository manuellr/momahome, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manuellr/momahome
- Repository: https://github.com/manuellr/momahome

## Overview

##### Main Components

A. Core Infrastructure Layer:
- Reverse Proxy (Traefik) - Entry point for all external traffic
- WireGuard VPN - Secure remote access
- AdGuard Home - DNS and network protection
- Mosquitto MQTT Broker - IoT communication hub

B. Home Automation Layer:
- Home Assistant (central control system)
- ESPHome (IoT device management)
- Various IoT Devices:
- Smart Lights (IKEA)
- Power Sockets (Tasmota, Espurna)
- Environmental Sensors (Xiaomi BLE)
- Vacuum Robot
- Washing Machine
- Climate Control (Dyson)
- Plant Monitoring (Flora)

C. Supporting Services:
- Syncthing (File synchronization)
- Monitoring System
- Docker Container Environment

**[External Access Layer]**
- Internet
- DuckDNS
- Reverse Proxy (Traefik)

- [Security Layer]
- WireGuard VPN
- AdGuard Home

- [Core Services Layer]
- Home Assistant (Core)
- MQTT Broker
- Monitoring

- [IoT Integration Layer]
- ESPHome Devices
- Bluetooth Devices
- WiFi Devices
- Cloud Services

- [Device Categories]
- Climate Control
- Lighting
- Power Management
- Sensors
- Appliances

##### Connection Types

- Network Traffic (HTTP/HTTPS)
- MQTT Communications
- Device Control Signals
- Monitoring Data Flow
- VPN Tunnels

##### Additional Details

- Configuration management flow
- Backup systems
- Update mechanisms
- Monitoring points

## Diagram (Mermaid)

```mermaid
graph TB
    %% External Access Layer
    Internet(("Internet"))
    DuckDNS["DuckDNS"]
    TraefikProxy["Reverse Proxy (Traefik)"]:::proxy
    click TraefikProxy "https://github.com/ManuelLR/MomaHome/tree/master/reverse-proxy/"

    %% Security Layer
    WireGuard["WireGuard VPN"]:::security
    click WireGuard "https://github.com/ManuelLR/MomaHome/tree/master/wireguard/"
    AdGuard["AdGuard Home"]:::security
    click AdGuard "https://github.com/ManuelLR/MomaHome/tree/master/adguardhome/"

    %% Core Services Layer
    MQTT["MQTT Broker"]:::core
    click MQTT "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/mosquitto-config/"
    HomeAssistant["Home Assistant"]:::core
    click HomeAssistant "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/"
    Monitoring["Monitoring System"]:::core
    click Monitoring "https://github.com/ManuelLR/MomaHome/tree/master/monitoring/"
    Syncthing["Syncthing"]:::core
    click Syncthing "https://github.com/ManuelLR/MomaHome/tree/master/syncthing/"

    %% IoT Integration Layer
    ESPHome["ESPHome"]:::iot
    click ESPHome "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/esphome/"

    %% Device Categories
    subgraph Devices
        direction TB
        subgraph Climate
            Dyson["Dyson Climate Control"]:::device
            click Dyson "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/dyson/"
        end
        
        subgraph Lighting
            IKEA["IKEA Smart Lights"]:::device
            click IKEA "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/ikea/"
        end
        
        subgraph PowerMgmt
            Tasmota["Tasmota Sockets"]:::device
            click Tasmota "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/tasmota/"
            Espurna["Espurna Devices"]:::device
            click Espurna "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/espurna/"
        end
        
        subgraph Sensors
            XiaomiBLE["Xiaomi BLE Sensors"]:::device
            click XiaomiBLE "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/ble_xiaomi/"
            Flora["Flora Plant Sensors"]:::device
            click Flora "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/ble_xiaomi/flora-001/"
        end
        
        subgraph Appliances
            Vacuum["Vacuum Robot"]:::device
            click Vacuum "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/vacuum/"
            WashingMachine["Washing Machine"]:::device
            click WashingMachine "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/washing-machine/"
        end
    end

    %% Integrations
    GoogleAssist["Google Assistant"]:::integration
    click GoogleAssist "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/google_assistant/"
    Telegram["Telegram"]:::integration
    click Telegram "https://github.com/ManuelLR/MomaHome/tree/master/home_automation/home_assistant/config/packages/telegram/"

    %% Connections
    Internet --> DuckDNS
    DuckDNS --> TraefikProxy
    TraefikProxy --> WireGuard
    WireGuard --> AdGuard
    AdGuard --> HomeAssistant
    AdGuard --> MQTT
    HomeAssistant --> MQTT
    HomeAssistant --> ESPHome
    MQTT --> ESPHome
    HomeAssistant --> GoogleAssist
    HomeAssistant --> Telegram
    Monitoring --> HomeAssistant
    Monitoring --> MQTT
    ESPHome --> Dyson
    ESPHome --> IKEA
    ESPHome --> Tasmota
    ESPHome --> Espurna
    ESPHome --> XiaomiBLE
    ESPHome --> Flora
    ESPHome --> Vacuum
    ESPHome --> WashingMachine

    %% Styles
    classDef proxy fill:#1E88E5,stroke:#0D47A1,color:white
    classDef security fill:#43A047,stroke:#1B5E20,color:white
    classDef core fill:#7E57C2,stroke:#4527A0,color:white
    classDef iot fill:#FB8C00,stroke:#EF6C00,color:white
    classDef device fill:#78909C,stroke:#37474F,color:white
    classDef integration fill:#EC407A,stroke:#C2185B,color:white
```
