Config yaml Fehlermeldung

rieders

New member
Hallo

Ich bin relativ neu bei Homeassistant.

Leider habe ich gestern irgendwie mein Config.yamel so verändert das ich eine Fehlermeldung bekomme.
Dabei habe ich versuch über Hacs Victon einzubinden.
Nun bekomme ich diese Meldung.
Konfigurationswarnungen
Invalid config for 'modbus' at configuration.yaml, line 14: required key 'baudrate' not provided
Invalid config for 'modbus' at configuration.yaml, line 14: required key 'bytesize' not provided
Invalid config for 'modbus' at configuration.yaml, line 14: required key 'method' not provided
Invalid config for 'modbus' at configuration.yaml, line 14: required key 'parity' not provided
Invalid config for 'modbus' at configuration.yaml, line 14: required key 'stopbits' not provided
Invalid config for 'modbus' at configuration.yaml, line 15: not a valid value for dictionary value 'modbus->0->type', got 'tcp'
Invalid config for 'modbus' at configuration.yaml, line 16: 'host' is an invalid option for 'modbus', check: modbus->0->host
Invalid config for 'modbus' at configuration.yaml, line 221: 'template' is an invalid option for 'modbus', check: modbus->0->template

Die Config.yaml sieht so aus.
Code:
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

modbus:
  - name: victron
    type: tcp
    host: 192.168.1.52  # use the IP address of your CCGX
    port: 502
    sensors:
    - name: 'ESS Grid Target' #This is the value your Inverter will attempt to import/export to and from the grid AFTER it takes into account your load and solar.  This is the only writeable value.
      unit_of_measurement: "W"
      slave: 100 #HUB - Slave is your device ID you found when looking in the Device List on the Victron GX.
      address: 2700 #ESS Control Loop Set Point
      data_type: uint16
      scan_interval: 5
      device_class: power
    
    - name: 'Victron AC L1' #I am single phase, if your 3 phase, you will need to add this 3 times and update the addresses using the link above for the full address list
      unit_of_measurement: "W"
      slave: 42 #HUB
      address: 817 #AC Consumption L1
      data_type: uint16
      scan_interval: 5
      device_class: power
      
    - name: 'Victron Grid Load'
      unit_of_measurement: "W"
      slave: 42 #HUB
      address: 820 #GridL1 Net
      data_type: int16
      scan_interval: 5
      device_class: power
      
    - name: 'Victron Energy from Grid'
      unit_of_measurement: "kWh"
      slave: 42 #GRID METER NOTE THE DIFFERENT SLAVE ID
      address: 2603 #Energy From Netowrk L1
      data_type: uint16
      scale: 0.01
      precision: 1
      scan_interval: 5
      device_class: energy
      state_class: total_increasing
      
    - name: 'Victron Energy to Grid'
      unit_of_measurement: "kWh"
      slave: 42 #GRID METER
      address: 2606 #L1 Energy to Network
      data_type: uint16
      scale: 0.01
      precision: 1
      scan_interval: 5
      device_class: energy
      state_class: total_increasing
      
    - name: 'Victron Energy Meter Voltage'
      unit_of_measurement: "V"
      slave: 42 #GRID METER
      address: 2616 #Grid Meter Voltage
      data_type: uint16
      scale: 0.1
      precision: 1
      scan_interval: 5
      device_class: voltage
      state_class: total_increasing
      
    - name: 'Victron Energy Meter Amperage'
      unit_of_measurement: "A"
      slave: 42 #GRID METER
      address: 2617 #Grid Meter Amps
      data_type: int16
      scale: 0.1
      precision: 1
      scan_interval: 5
      device_class: current
      state_class: total_increasing
      
    - name: 'Victron Solar power'
      unit_of_measurement: "W"
      slave: 34 #HUB
      address: 850
      data_type: uint16
      device_class: power
      
    - name: 'Victron ESS Minimum SoC setpoint'
      unit_of_measurement: "%"
      data_type: uint16
      slave: 34 #HUB
      address: 2901
      scan_interval: 5
      scale: 0.1
      
    - name: 'Victron Maximum System Grid Feed In'
      unit_of_measurement: "W"
      data_type: uint16
      slave: 34 #HUB
      address: 2706
      scale: 0.01
      device_class: power
      # command_on: 4000
      # command_off: 40
      # verify_state: false
#Battery
    - name: 'Victron Battery current'
      unit_of_measurement: "A"
      slave: 239 #HUB
      address: 841
      data_type: int16
      scale: 0.1
      precision: 0
      device_class: current
      
    - name: 'Victron Battery Power System'
      unit_of_measurement: "W"
      slave: 239  #HUB
      address: 842
      data_type: int16
      scale: 1.0
      precision: 0
      device_class: power
 
    - name: 'Victron Charge Power System'
      unit_of_measurement: "W"
      slave: 239 #HUB
      address: 860
      data_type: int16
      scale: 10.0
      precision: 0
      device_class: power
      
    - name: 'Victron Battery State of Charge System'
      unit_of_measurement: "%"
      slave: 239 #HUB
      address: 843
      data_type: uint16
      scale: 1
      precision: 0
      
    - name: 'Victron Inverter AC IN L1 V'
      unit_of_measurement: "V"
      slave: 34
      address: 3
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: voltage

    - name: 'Victron Inverter AC IN L1 A'
      unit_of_measurement: "A"
      slave: 34
      address: 6
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: current

    - name: 'Victron Inverter Max Over V Feed In L1'
      unit_of_measurement: "V"
      slave: 34
      address: 66
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: voltage

    - name: 'Victron Battery Voltage'
      unit_of_measurement: "V"
      slave: 239
      address: 259
      data_type: uint16
      scale: 0.01
      precision: 1
      device_class: voltage

    - name: 'Victron Battery Amperage'
      unit_of_measurement: "A"
      slave: 239
      address: 261
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: current

    - name: 'Victron Battery Consumed Amphours'
      unit_of_measurement: "A"
      slave: 239
      address: 265
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: current

    - name: 'Victron Battery State Of Charge'
      unit_of_measurement: "%"
      slave: 239
      address: 266
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: power

    - name: 'Victron Battery Capacity'
      unit_of_measurement: "A"
      slave: 239
      address: 309
      data_type: uint16
      scale: 0.1
      precision: 1
      device_class: current


    template:
  - sensor:
      - name: "Device Location"
        state: >
          {{ states('sensor.latitude') }},{{ states('sensor.longitude') }}
        attributes:
          latitude: "{{ states('sensor.latitude') }}"
          longitude: "{{ states('sensor.longitude') }}"

Falls mir jemand weiterhelfen kann würde mich das sehr freuen.

Grüße André
 
Hi,

ich hab zwar so gar keine Ahnung von Modus (und nur sehr wenig von HomeAssistant), aber... Schau Dir evtl. mal die Beispiele in der Modbus-Doku an, so ab https://www.home-assistant.io/integrations/modbus/#example-entities-grouping oder so. Was bei Dir so garnicht zu passen scheint (so wie ich das sehe), sind die Einrückungen - da ist YAML "extremst" empfindlich. Nach meiner Auffassung nach, müsste das oben z.B. schon so aussehen:

YAML:
modbus:
  - name: victron
    type: tcp
    host: 192.168.1.52  # use the IP address of your CCGX
    port: 502
    sensors:
      - name: 'ESS Grid Target'
(man beachte die 2 weiteren Leerzeichen in der letzten Zeile)

Das würde ich grundsätzlich erstmal komplett überarbeiten. Wenn das "Format" dann stimmt, dann kann man sich noch um ggf. weitere Fehler kümmern, wobei bei falscher Formatierung auch nicht auszuschliessen ist, dass es nach der Korrektur ggf. auch einfach funktioniert. Ich weiss es nicht, aber ohne korrekte Formatierung wird das wohl eher nicht funktionieren - zumindestens habe ich YAML so kennengelernt 😅

Kannst hier im Forum auch einfach mal nach "modbus" suchen, da finden sich etliche Beispiele bzgl. der Einrückungen und auch die HomeAssistant-Modbus-Doku gibt da ein paar gute Beispiele her :)
 

Zurzeit aktive Besucher

Letzte Anleitungen

Statistik des Forums

Themen
4.630
Beiträge
47.400
Mitglieder
4.282
Neuestes Mitglied
MrNico_
Zurück
Oben