Read DaheimLaden Wallbox via Modbus-(proxy) and EVCC

Keine Eile…, das hat alles Zeit. So intensiv kann ich mich nicht täglich um HA kümmern.

Entitäten hinzufügen ist mir grundsätzlich klar.

Mir ging es eher um die Konfiguration der genannten Karten:

  • Wallbox Ladestrom skaliert (links unten)
  • Wallbox Status usw. (rechts oben)
  • START/STOP charging (rechts Mitte)
  • Wallbox umgerechnete Werte (rechts unten)

Und folgende Frage:
Was bedeuten die Daten in “Wallbox umgerechnete Werte”?
Was wird da umgerechnet?

Schreiben in die Wallbox habe ich im Moment nicht auf dem Schirm.
Sollte das irgendwann notwendig sein, melde ich mich noch mal.

P.S.
Hängt Dein DaheimLader per WLAN oder LAN im Netzwerk?
Meine hängt im WLAN.
Ich habe aber gelesen, dass WLAN bei Modbus Probleme machen soll.

Umgerechnet wird alles was in der Daheimlader.yaml findest
Überwiegend Einheiten

Bsp 6.0 Ampere sind als gemessener/gelesener Wert 60
Oder Daheimlader Status 1 bedeutet rechts bei dem umgerechneten Werten. Daheimlader Status scaled Bereit
Due ganzen kryptischen Fehlercodes, nur Zahl(en) werden da rechts in echten Text konvertiert. Schau in die daheimlader.yaml als Text und dann siehst das etwas was da „umgerechnet“ wird

Usw, nichts dramatisches, empfehle mal alle Entitäten wallbox und daheimlader diese Anzeigen zu lassen auf einer Karte und dann entscheidest was brauchst oder auch nicht oder wie sortierst

Modbus:
Meine per repeater, wlan auf Kabel, ja ich hatte Modbus-Probleme, aber bin mir nicht sicher bis und mit welcher Firmware, behoben wurde es eben, wlan auf nen Repeater letzter Meter kam zur wallbox und nie wieder Probleme, bei wlan-Modbus hatte ich timing-Probleme

Wallbox Ladestrom skaliert ist nur einzelwert damit ich den besser sehe, findest rechts auch nochmal bei dem umgerechneten Werten
Start/stop wäre schreiben, aber eigentlich App - ich mache halt alles mit und über HA

Rechts oben mit Bild wallbox ist dies, per HACS installieren bitte

Kann den Code nicht schicken wird grad so komisch formatiert leider, nur 2 Bilder damit mal den Code siehst dazu
Und das Bild der wallbox noch ablegen; 1.png

1 Like

Hier mal mein Beispiel.

modbus:
  - name: "DaheimLader"
    type: tcp
    host: 192.168.1.37
    port: 502
    timeout: 60

    sensors:
      # --- Status-Register (kein Scale) ---

      - name: "DaheimLader Status"
        address: 0
        scan_interval: 30
        data_type: uint16
        unique_id: daheimLader_charging_station_state

      - name: "DaheimLader Status Ladekabel"
        address: 2
        scan_interval: 30
        data_type: uint16
        unique_id: daheimLader_cable_state

      - name: "DaheimLader Fehlercode"
        address: 4
        scan_interval: 30
        data_type: uint16
        unique_id: daheimlader_fault_code

      # --- Ladestroeme pro Phase (Factor 0.1) ---

      - name: "DaheimLader Ladestrom L1"
        address: 6
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        state_class: measurement
        unique_id: daheimlader_l1_charging_current

      - name: "DaheimLader Ladestrom L2"
        address: 8
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        state_class: measurement
        unique_id: daheimlader_l2_charging_current

      - name: "DaheimLader Ladestrom L3"
        address: 10
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        state_class: measurement
        unique_id: daheimlader_l3_charging_current

      # --- Leistung (kein Scale, uint32) ---

      - name: "DaheimLader Ladeleistung"
        address: 12
        scan_interval: 30
        data_type: uint32
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        unique_id: daheimlader_active_power

      - name: "DaheimLader Ladeleistung L1"
        address: 16
        scan_interval: 30
        data_type: uint32
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        unique_id: daheimLader_l1_charging_power

      - name: "DaheimLader Ladeleistung L2"
        address: 20
        scan_interval: 30
        data_type: uint32
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        unique_id: daheimLader_l2_active_power

      - name: "DaheimLader Ladeleistung L3"
        address: 24
        scan_interval: 30
        data_type: uint32
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        unique_id: daheimlader_l3_active_power

      # --- Energiezaehler (Factor 0.1!) ---

      - name: "DaheimLader Zaehlerstand"
        address: 28
        scan_interval: 30
        data_type: uint32
        scale: 0.1
        precision: 1
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        unique_id: daheimLader_energy_meter

      # --- EVSE Limits (Factor 0.1) ---

      - name: "DaheimLader EVSE Max Strom"
        address: 32
        scan_interval: 60
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        unique_id: daheimlader_evse_max_current

      - name: "DaheimLader EVSE Min Strom"
        address: 34
        scan_interval: 60
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        unique_id: daheimlader_evse_min_current

      - name: "DaheimLader Kabel Max Strom"
        address: 36
        scan_interval: 60
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        unique_id: daheimlader_cable_max_current

      # --- Geladene Energie Session (Factor 0.1) ---

      - name: "DaheimLader Geladene Energie"
        address: 72
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: kWh
        device_class: energy
        state_class: total
        unique_id: daheimLader_charged_energy

      # --- Ladedauer ---

      - name: "DaheimLader Ladedauer"
        address: 78
        scan_interval: 30
        data_type: uint32
        unit_of_measurement: s
        device_class: duration
        state_class: measurement
        unique_id: daheimlader_charging_time

      # --- Safe Current (Factor 0.1) ---

      - name: "DaheimLader Safe Current"
        address: 87
        scan_interval: 60
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        unique_id: daheimlader_safe_current

      # --- Ladestrom Limit (Factor 0.1) ---

      - name: "DaheimLader Ladestrom Limit"
        address: 91
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: A
        device_class: current
        unique_id: daheimlader_limit_charging_current

      # --- Steuerung ---

      - name: "DaheimLader Modus"
        address: 93
        scan_interval: 30
        data_type: uint16
        unique_id: daheimlader_charge_control

      - name: "DaheimLader Charge Command"
        address: 95
        scan_interval: 30
        data_type: uint16
        unique_id: daheimlader_charge_command

      # --- Echtzeit-Spannungen (Factor 0.1) ---

      - name: "DaheimLader Spannung L1"
        address: 109
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        unique_id: daheimlader_l1_voltage

      - name: "DaheimLader Spannung L2"
        address: 111
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        unique_id: daheimlader_l2_voltage

      - name: "DaheimLader Spannung L3"
        address: 113
        scan_interval: 30
        data_type: uint16
        scale: 0.1
        precision: 1
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        unique_id: daheimlader_l3_voltage

    # --- Switches ---

    switches:
      - name: "DaheimLader Charging Enable"
        unique_id: daheimlader_charging_enable
        address: 100
        write_type: holding
        command_on: 1
        command_off: 0
        verify:
          address: 100
          input_type: holding

und mein Dashboard

title: DaheimLader Wallbox
icon: mdi:ev-station
views:
  - title: Wallbox
    path: wallbox
    icon: mdi:ev-station
    type: sections
    max_columns: 2
    sections:
      - title: ''
        cards:
          - type: markdown
            title: Station Status
            content: >
              {% set status_map = {
                0: 'Standby',
                1: 'Bereit',
                2: 'Verbunden',
                3: 'Laden startet',
                4: 'Laedt',
                5: 'Start fehlgeschlagen',
                6: 'Laden beendet',
                7: 'Systemfehler',
                8: 'Ladetimer',
                9: 'Firmware Upgrade',
                10: 'Eingeschaltet',
                31: 'Blockiert'
              } %}

              {% set cable_map = {
                0: 'Nicht verbunden',
                1: 'Verbunden'
              } %}

              {% set fault_map = {
                0: 'Kein Fehler',
                11: 'CP-Kontroll Wert',
                13: 'Unterspannung',
                14: 'Ueberspannung',
                15: 'Temperatur zu hoch',
                16: 'Zaehlerwert',
                17: 'Leckage',
                18: 'Output Short',
                19: 'Ueberstrom',
                21: 'Fahrzeug',
                22: 'Fahrzeug nicht erkannt',
                23: 'Relais',
                24: 'Leckage, Geraet pruefen',
                25: 'PE-Fehler',
                26: 'Start/Stopp Ladefehler'
              } %}

              {% set s = states('sensor.daheimlader_status') | int(0) %}

              {% set c = states('sensor.daheimlader_status_ladekabel') | int(0)
              %}

              {% set f = states('sensor.daheimlader_fehlercode') | int(0) %}

              {% if s == 4 %}**Status:** ⚡ {{ status_map.get(s, 'Unbekannt') }}

              {% elif s in [1, 10] %}**Status:** 🟢 {{ status_map.get(s,
              'Unbekannt') }}

              {% elif s in [5, 7, 31] %}**Status:** 🔴 {{ status_map.get(s,
              'Unbekannt') }}

              {% elif s in [3, 8] %}**Status:** 🟡 {{ status_map.get(s,
              'Unbekannt') }}

              {% elif s == 0 %}**Status:** ⚪ {{ status_map.get(s, 'Unbekannt')
              }}

              {% else %}**Status:** 🔵 {{ status_map.get(s, 'Unbekannt (' ~ s ~
              ')') }}

              {% endif %}


              {% if c == 1 %}**Ladekabel:** 🟢 {{ cable_map.get(c) }}

              {% else %}**Ladekabel:** ⚪ {{ cable_map.get(c, 'Unbekannt') }}

              {% endif %}


              {% if f == 0 %}**Fehlercode:** ✅ {{ fault_map.get(f) }}

              {% else %}**Fehlercode:** ⚠️ {{ fault_map.get(f, 'Code ' ~ f) }}

              {% endif %}
          - type: entities
            show_header_toggle: false
            entities:
              - entity: switch.daheimlader_charging_enable
                name: Ladefreigabe
                icon: mdi:ev-station
          - type: gauge
            entity: sensor.daheimlader_ladeleistung
            name: Ladeleistung
            unit: W
            min: 0
            max: 11000
            needle: true
            segments:
              - from: 0
                color: '#0d9488'
              - from: 3000
                color: '#22d3ee'
              - from: 7000
                color: '#a78bfa'
              - from: 10000
                color: '#f59e0b'
          - type: markdown
            title: Aktuelle Session
            content: >
              {% set t = states('sensor.daheimlader_ladedauer') | int(0) %}

              {% set h = (t // 3600) %}

              {% set m = ((t % 3600) // 60) %}

              {% set sec = (t % 60) %}

              {% set dauer = '' %}

              {% if h > 0 %}{% set dauer = h ~ 'h ' %}{% endif %}

              {% if m > 0 %}{% set dauer = dauer ~ m ~ 'min ' %}{% endif %}

              {% set dauer = dauer ~ sec ~ 's' %}

              🔋 **Geladen:** {{ states('sensor.daheimlader_geladene_energie')
              }} kWh


              ⏱️ **Ladedauer:** {{ dauer }}


              📊 **Zaehlerstand:** {{ states('sensor.daheimlader_zaehlerstand')
              }} kWh
          - type: glance
            title: Netzspannung
            show_state: true
            columns: 3
            entities:
              - entity: sensor.daheimlader_spannung_l1
                name: L1
              - entity: sensor.daheimlader_spannung_l2
                name: L2
              - entity: sensor.daheimlader_spannung_l3
                name: L3
      - title: ''
        cards:
          - type: horizontal-stack
            cards:
              - type: gauge
                entity: sensor.daheimlader_ladeleistung_l1
                name: L1
                unit: W
                min: 0
                max: 3700
                needle: true
                segments:
                  - from: 0
                    color: '#22d3ee'
                  - from: 2500
                    color: '#0891b2'
                  - from: 3200
                    color: '#f59e0b'
              - type: gauge
                entity: sensor.daheimlader_ladeleistung_l2
                name: L2
                unit: W
                min: 0
                max: 3700
                needle: true
                segments:
                  - from: 0
                    color: '#a78bfa'
                  - from: 2500
                    color: '#7c3aed'
                  - from: 3200
                    color: '#f59e0b'
              - type: gauge
                entity: sensor.daheimlader_ladeleistung_l3
                name: L3
                unit: W
                min: 0
                max: 3700
                needle: true
                segments:
                  - from: 0
                    color: '#34d399'
                  - from: 2500
                    color: '#059669'
                  - from: 3200
                    color: '#f59e0b'
          - type: glance
            title: Ladestroeme
            show_state: true
            columns: 3
            entities:
              - entity: sensor.daheimlader_ladestrom_l1
                name: L1
              - entity: sensor.daheimlader_ladestrom_l2
                name: L2
              - entity: sensor.daheimlader_ladestrom_l3
                name: L3
          - type: markdown
            title: Wallbox Limits
            content: >
              **EVSE Max:** {{ states('sensor.daheimlader_evse_max_strom') }} A
              · **EVSE Min:** {{ states('sensor.daheimlader_evse_min_strom') }}
              A


              **Kabel Max:** {{ states('sensor.daheimlader_kabel_max_strom') }}
              A · **Strom Limit:** {{
              states('sensor.daheimlader_ladestrom_limit') }} A


              **Safe Current:** {{ states('sensor.daheimlader_safe_current') }}
              A · **Modus:** {{ states('sensor.daheimlader_modus') }}
          - type: history-graph
            title: Leistungsverlauf
            hours_to_show: 24
            entities:
              - entity: sensor.daheimlader_ladeleistung
                name: Gesamt
              - entity: sensor.daheimlader_ladeleistung_l1
                name: L1
              - entity: sensor.daheimlader_ladeleistung_l2
                name: L2
              - entity: sensor.daheimlader_ladeleistung_l3
                name: L3
          - type: statistics-graph
            title: Energieverbrauch
            entities:
              - entity: sensor.daheimlader_zaehlerstand
            days_to_show: 30
            stat_types:
              - change
            chart_type: bar
            period: day
          - type: conditional
            conditions:
              - condition: numeric_state
                entity: sensor.daheimlader_fehlercode
                above: 0.5
            card:
              type: markdown
              title: Fehler aktiv
              content: |
                {% set fault_map = {
                  11: 'CP-Kontroll Wert',
                  13: 'Unterspannung',
                  14: 'Ueberspannung',
                  15: 'Temperatur zu hoch',
                  16: 'Zaehlerwert',
                  17: 'Leckage',
                  18: 'Output Short',
                  19: 'Ueberstrom',
                  21: 'Fahrzeug',
                  22: 'Fahrzeug nicht erkannt',
                  23: 'Relais',
                  24: 'Leckage, Geraet pruefen',
                  25: 'PE-Fehler',
                  26: 'Start/Stopp Ladefehler'
                } %}
                {% set f = states('sensor.daheimlader_fehlercode') | int(0) %}
                **Code:** {{ f }}

                **Beschreibung:** {{ fault_map.get(f, 'Unbekannter Fehler') }}

                Bitte Wallbox pruefen und ggf. Fehlerspeicher zuruecksetzen.

1 Like