PV Victron Laderegler werden in HA über ESP8266 nicht mehr angezeigt

Beda.B.

New member
Hallo zusammen,
ich habe vier Victron PV-Laderegler die ich über die RS485 Schnittstelle über je einen ESP8266 (PV-Modulleistung etc.) auslese und in Home Assistant einlese. Vor geraumer Zeit hat einer der vier ESP8266 in HA keine Werte mehr übertragen. Jetzt werden nur noch vereinzelt von vielleicht einem ESP Daten an HA geliefert. Ich habe keine Ahnung warum das nicht mehr funktioniert. Lokal kann ich alle Laderegler auslesen nur nicht mehr in HA. Leider muss ich gestehen, bin ich kein Profi in HA. Ich schaue viele Videos an und bastle mir da wsas zusammen.
Leider komme ich hier nicht mehr weiter. Hat jemand eine Idee, was das sein könnte? Gabe es einmal bei HA ein Update, wo ich was machen hätte müssen?
Über eure Hilfe wäre ich euch sehr dankbar.

Grüße Beda
 
Es gab in letzter Zeit einige Änderungen, auch in ESPHome. Es ist generell zu empfehlen, die Release Notes zu lesen, insbesondere die nicht abwärtskompatiblen Änderungen.
 
Danke HA-DAU für deine Antwort.
Die Umstellung habe ich soweit geändert, aber es geht leider nicht. Es können doch nicht auf einmal alle 4 ESP8266 zum spinnen anfangen. Manschmal wird einer der ESPs im HA erkannt, dann wieder nicht. Es ging aber gefült 3 Monate ohne Probleme.
Leider weiß ich nicht, wie ich den Victron Laderegler mit dem HA verbinden kann. Sollte mal alles aus HA löschen?
WIe ich ESPs lösche, mmhhhh das wird auch noch eine Herausforderung für mich :unsure:
Vielleicht hat noch jemand eine Idee?🧐
 
Hallo @Beda.B.,

stelle doch mal einen ESP Code hier nach Anleitung *.yaml hier ein. Nach dem Beispiel hier: https://forum.heimnetz.de/threads/hinweis-zum-thema-einfuegen-von-yaml-code-in-beitraegen.1019/
Dann schauen wir mal darüber, ob wir den Fehler sehen.
Passwörter aber unkenntlich machen..., die wollen wir nicht sehen....
Welche Fehlermeldung bekommst Du beim ESP wenn Du rechts auf die 3 Punkte gehst und "Validate" (Vallidierung) drückst?
Wenn da der Code sauber geschrieben ist, steht ganz unten "Info Configuration is valide".
Dann kannst normalerweise den per WLAN abschicken.
Da Du aber vermutlich nicht mehr auf die ESP drauf kommst, müssen diese erneut beim ersten mal über Kabel geflasht werden.
 
Zuletzt bearbeitet:
Hallo HA-DAU,

Sorry für meine späte Antwort. Leider bin ich beruflich sehr eingespannt. Dennoch freue ich mich über die Unterstützung. Ich hoffe es ist keine absolute Katastrophe, die Yaml hat jedenfalls einmal funktioniert.

Grüße Beda

substitutions:
external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main
lower_devicename: "victron-dach-sud-hh"
devicename: "victron-dach-sud-hh"
config_version: "v2021.05.30"
wifi_fast_connect: "false"
accuracy: "2"

esphome:
name: "${lower_devicename}"
platform: ESP8266
board: d1_mini
# board: nodemcuv2

external_components:
- source: ${external_components_source}
refresh: 0s

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
fast_connect: $wifi_fast_connect

# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Victron-Dach-Sud-Hh"
password: "mwxxxxxxxR"

captive_portal:
logger:
baud_rate: 0
# level: VERY_VERBOSE
esp8266_store_log_strings_in_flash: false

# Enable Home Assistant API
api:
encryption:
key: "DAG9CunMH0fb2EOqflZrT9gIbxxxxxxmqZ9I0hYE="
reboot_timeout: 0s
ota:
platform: esphome
password: "68bece19ee4916xxxxxxxafea87efc"

web_server:
port: 80

time:
- platform: homeassistant

uart:
id: uart_bus
tx_pin: D8 # Not connected! The communication is read-only
rx_pin: D7 # Connect this this GPIO and GND to the MPPT charger
baud_rate: 19200
stop_bits: 1
data_bits: 8
parity: NONE
rx_buffer_size: 256

victron:
id: victron0
uart_id: uart_bus
throttle: 10s

sensor:
- platform: victron
victron_id: victron0
panel_voltage:
name: "Panel voltage"
id: pv
battery_voltage:
name: "Battery voltage"
id: bv
battery_current:
name: "Battery current"
id: bc
load_current:
name: "Load current"
id: load_current
max_power_yesterday:
name: "Max power yesterday"
id: max_power_yesterday
max_power_today:
name: "Max power today"
id: max_power_today
accuracy_decimals: ${accuracy}
yield_total:
name: "Yield total"
id: yield_total
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
unit_of_measurement: kWh
accuracy_decimals: ${accuracy}
yield_yesterday:
name: "Yield yesterday"
id: yield_yesterday
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
unit_of_measurement: kWh
accuracy_decimals: ${accuracy}
yield_today:
name: "Yield today"
id: yt
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
unit_of_measurement: kWh
accuracy_decimals: ${accuracy}
panel_power:
name: "Panel power"
id: panel_power
day_number:
name: "Day sequence number"
id: day_number
icon: "mdi:calendar-today"
charging_mode_id:
name: "Charger mode id"
error_code:
name: "Error code"
tracking_mode_id:
name: "Tracker mode id"

- platform: wifi_signal
name: "${devicename} WiFi Signal Sensor"
id: rssi_sensor
update_interval: 15s

- platform: template
name: "Wifi Quality"
unit_of_measurement: "%"
accuracy_decimals: 0
icon: "mdi:wifi"
update_interval: 15s
lambda: |-
int quality;
const int rssi = id(rssi_sensor).state;
if (rssi <= -100) {
quality = 0;
} else if (rssi >= -50) {
quality = 100;
} else {
quality = 2 * (rssi + 100);
}
return quality;

- platform: uptime
name: "${devicename} Uptime"
id: uptime_s
update_interval: 5s

- platform: template # for 1 cell of battery
name: "Bat S1 " # 7S pack
lambda: |-
if ((((id(bv).state) / 7) > 4.22) && (((id(bv).state) / 7) < 3.0)) {
return NAN;
}
return ((id(bv).state) / 7);

update_interval: 10s
icon: "mdi:battery"
unit_of_measurement: V
device_class: "voltage"
accuracy_decimals: ${accuracy}
- platform: template # Battery working percent
name: "Bat working percent" # cycle batt between 3,0v - 4.01v
lambda: |-
if (((((((((id(bv).state) / 7 )) - 3.142) / (4.01142 - 3.142)) * 100)) >= 115) && ((((((((id(bv).state) / 7 )) - 3.142) / (4.01142 - 3.142)) * 100)) <= -25)) {
return NAN;
}
return ((((((id(bv).state) / 7 )) - 3.142) / (4.01142 - 3.142) ) * 100);

update_interval: 15s
icon: "mdi:battery"
unit_of_measurement: "%"
device_class: "voltage"
accuracy_decimals: ${accuracy}

- platform: template # FVE percent
name: "FVE percent" # 500Wp max power of my FVE grid
lambda: |-
if (((((id(panel_power).state) / 500) * 100) >= 120) && ((((id(panel_power).state) / 500) * 100) < 0)) {
return NAN;
}
return (((id(panel_power).state) / 500) * 100);
icon: "mdi:gauge"
unit_of_measurement: "%"
device_class: "power"
accuracy_decimals: ${accuracy}
update_interval: 15s

- platform: template # median generated day energy
name: "Day median generated " # 500Wp max power of my FVE grid
lambda: |-
return (id(yield_total).state) / (id(day_number).state);
update_interval: 15s
icon: "mdi:gauge"
unit_of_measurement: "kWh"
device_class: "power"
accuracy_decimals: 3

text_sensor:
- platform: victron
victron_id: victron0
charging_mode:
name: "Charging Mode"
error:
name: "Error"
tracking_mode:
name: "Tracking Mode"
firmware_version:
name: "Firmware Version"
device_type:
name: "Device Type"

- platform: template
name: "${devicename} Config Version"
icon: mdi:information-outline
lambda: |-
return {"${config_version}"};
- platform: version
name: "${devicename} Esphome Version"
icon: mdi:information-outline
- platform: wifi_info
ip_address:
name: "${devicename} IP Address"
icon: mdi:ip
ssid:
name: "${devicename} Connected SSID"
icon: mdi:wifi
bssid:
name: "${devicename} Connected BSSID"
mac_address:
name: "${devicename} Mac Wifi Address"
- platform: template
name: "${devicename} Uptime (formatted)"
lambda: |-
uint32_t dur = id(uptime_s).state;
int dys = 0;
int hrs = 0;
int mnts = 0;
if (dur > 86399) {
dys = trunc(dur / 86400);
dur = dur - (dys * 86400);
}
if (dur > 3599) {
hrs = trunc(dur / 3600);
dur = dur - (hrs * 3600);
}
if (dur > 59) {
mnts = trunc(dur / 60);
dur = dur - (mnts * 60);
}
char buffer[17];
sprintf(buffer, "%ud %02uh %02um %02us", dys, hrs, mnts, dur);
return {buffer};
icon: mdi:clock-start
update_interval: 5s

switch:
- platform: restart
icon: mdi:reload-alert
name: "${devicename} Restart"
 
Zuletzt bearbeitet:
Oh sorry und Danke für die Hinweise:giggle:
Anbei der Yaml Code
Leider weiss ich nicht genau, was Du meinst mit testen?
Ich habe in den Entwickleroptionen alle Yaml Dateien überprüft und da kam ein grüner Haken.
GRÜßE

Code:
substitutions:
  external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main
  lower_devicename: "victron-dach-sud-hh"
  devicename: "victron-dach-sud-hh"
  config_version: "v2021.05.30"
  wifi_fast_connect: "false"
  accuracy: "2"

esphome:
  name: "${lower_devicename}"
  platform: ESP8266
  board: d1_mini
  # board: nodemcuv2

external_components:
  - source: ${external_components_source}
    refresh: 0s

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: none
  fast_connect: $wifi_fast_connect

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Victron-Dach-Sud-Hh"
    password: "mw'xR"

captive_portal:
logger:
  baud_rate: 0
  # level: VERY_VERBOSE
  esp8266_store_log_strings_in_flash: false

# Enable Home Assistant API
api:
  encryption:
    key: " xxxxx"
  reboot_timeout: 0s
ota:
  platform: esphome
  password: "xxxxxxxxxxxxxxx"

web_server:
  port: 80

time:
  - platform: homeassistant

uart:
  id: uart_bus
  tx_pin: D8  # Not connected! The communication is read-only
  rx_pin: D7  # Connect this this GPIO and GND to the MPPT charger
  baud_rate: 19200
  stop_bits: 1
  data_bits: 8
  parity: NONE
  rx_buffer_size: 256

victron:
  id: victron0
  uart_id: uart_bus
  throttle: 10s

sensor:
  - platform: victron
    victron_id: victron0
    panel_voltage:
      name: "Panel voltage"
      id: pv
    battery_voltage:
      name: "Battery voltage"
      id: bv
    battery_current:
      name: "Battery current"
      id: bc
    load_current:
      name: "Load current"
      id: load_current
    max_power_yesterday:
      name: "Max power yesterday"
      id: max_power_yesterday
    max_power_today:
      name: "Max power today"
      id: max_power_today
      accuracy_decimals: ${accuracy}
    yield_total:
      name: "Yield total"
      id: yield_total
      filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
      unit_of_measurement: kWh
      accuracy_decimals: ${accuracy}
    yield_yesterday:
      name: "Yield yesterday"
      id: yield_yesterday
      filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
      unit_of_measurement: kWh
      accuracy_decimals: ${accuracy}
    yield_today:
      name: "Yield today"
      id: yt
      filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
      unit_of_measurement: kWh
      accuracy_decimals: ${accuracy}
    panel_power:
      name: "Panel power"
      id: panel_power
    day_number:
      name: "Day sequence number"
      id: day_number
      icon: "mdi:calendar-today"
    charging_mode_id:
      name: "Charger mode id"
    error_code:
      name: "Error code"
    tracking_mode_id:
      name: "Tracker mode id"

  - platform: wifi_signal
    name: "${devicename} WiFi Signal Sensor"
    id: rssi_sensor
    update_interval: 15s

  - platform: template
    name: "Wifi Quality"
    unit_of_measurement: "%"
    accuracy_decimals: 0
    icon: "mdi:wifi"
    update_interval: 15s
    lambda: |-
        int quality;
        const int rssi = id(rssi_sensor).state;
        if (rssi <= -100) {
          quality = 0;
        } else if (rssi >= -50) {
          quality = 100;
        } else {
          quality = 2 * (rssi + 100);
        }
        return quality;

  - platform: uptime
    name: "${devicename} Uptime"
    id: uptime_s
    update_interval: 5s

  - platform: template  # for 1 cell of battery
    name: "Bat S1 "     # 7S pack
    lambda: |-
      if ((((id(bv).state) / 7) > 4.22) && (((id(bv).state) / 7) < 3.0)) {
        return NAN;
      }
      return ((id(bv).state) / 7);

    update_interval: 10s
    icon: "mdi:battery"
    unit_of_measurement: V
    device_class: "voltage"
    accuracy_decimals: ${accuracy}
  - platform: template           # Battery working percent
    name: "Bat working percent"  # cycle batt between 3,0v - 4.01v
    lambda: |-
      if (((((((((id(bv).state) / 7 )) - 3.142) / (4.01142 - 3.142)) * 100)) >= 115) && ((((((((id(bv).state) / 7 )) - 3.142) / (4.01142 - 3.142)) * 100)) <= -25)) {
        return NAN;
      }
      return ((((((id(bv).state) / 7 )) - 3.142) / (4.01142 - 3.142)  ) * 100);

    update_interval: 15s
    icon: "mdi:battery"
    unit_of_measurement: "%"
    device_class: "voltage"
    accuracy_decimals: ${accuracy}

  - platform: template   # FVE percent
    name: "FVE percent"  # 500Wp max power of my FVE grid
    lambda: |-
        if (((((id(panel_power).state) / 500) * 100) >= 120) && ((((id(panel_power).state) / 500) * 100) < 0)) {
          return NAN;
        }
        return (((id(panel_power).state) / 500) * 100);
    icon: "mdi:gauge"
    unit_of_measurement: "%"
    device_class: "power"
    accuracy_decimals: ${accuracy}
    update_interval: 15s

  - platform: template   # median generated day energy
    name: "Day median generated "  # 500Wp max power of my FVE grid
    lambda: |-
        return (id(yield_total).state) / (id(day_number).state);
    update_interval: 15s
    icon: "mdi:gauge"
    unit_of_measurement: "kWh"
    device_class: "power"
    accuracy_decimals: 3

text_sensor:
  - platform: victron
    victron_id: victron0
    charging_mode:
      name: "Charging Mode"
    error:
      name: "Error"
    tracking_mode:
      name: "Tracking Mode"
    firmware_version:
      name: "Firmware Version"
    device_type:
      name: "Device Type"

  - platform: template
    name: "${devicename} Config Version"
    icon: mdi:information-outline
    lambda: |-
      return {"${config_version}"};
  - platform: version
    name: "${devicename} Esphome Version"
    icon: mdi:information-outline
  - platform: wifi_info
    ip_address:
      name: "${devicename} IP Address"
      icon: mdi:ip
    ssid:
      name: "${devicename} Connected SSID"
      icon: mdi:wifi
    bssid:
      name: "${devicename} Connected BSSID"
    mac_address:
      name: "${devicename} Mac Wifi Address"
  - platform: template
    name: "${devicename} Uptime (formatted)"
    lambda: |-
      uint32_t dur = id(uptime_s).state;
      int dys = 0;
      int hrs = 0;
      int mnts = 0;
      if (dur > 86399) {
        dys = trunc(dur / 86400);
        dur = dur - (dys * 86400);
      }
      if (dur > 3599) {
        hrs = trunc(dur / 3600);
        dur = dur - (hrs * 3600);
      }
      if (dur > 59) {
        mnts = trunc(dur / 60);
        dur = dur - (mnts * 60);
      }
      char buffer[17];
      sprintf(buffer, "%ud %02uh %02um %02us", dys, hrs, mnts, dur);
      return {buffer};
    icon: mdi:clock-start
    update_interval: 5s

switch:
  - platform: restart
    icon: mdi:reload-alert
    name: "${devicename} Restart"
 
Hallo @Beda.B. ,

steht der ganze Code in ein einzigen ESP.yaml?
Oder ist der unterteilt in mehrere Unterschiedliche *.yaml?

Wenn Du im ESP home bist, dann gibt es die z.B. die xyz.yaml.
Da stehen rechts unten die drei Punkte., da klicksts drauf.
Da ist die Abfrage mit mehreren Punkte.

ESPHome_dreiPunkte.png






Validate, install, usw.
 

Anhänge

  • 1724565551060.png
    1724565551060.png
    17,4 KB · Aufrufe: 4
Zuletzt bearbeitet:
Hallo @Beda.B. ,

ich habe mal Deinen Code in eine Test05.yaml eingefügt und Validate gedrückt-
Siehe hier, die Fehlermeldung.
In Linie 36 und linie 12.
So arbeitest Du Fehler für Fehler ab, bis dann da ok für die Validate kommt.
Validate_Fehlermeldung.png

is_Valide.png
 
Hallo @Beda.B.,

wie weit ist das Projekt gediehen?
Gab es schon Lösungsansätze?
Würdest Du uns hier auf dem laufenden halten?
Oder wurde das Projekt an Agda gelegt.....
 

Zurzeit aktive Besucher

Letzte Anleitungen

Statistik des Forums

Themen
5.283
Beiträge
52.555
Mitglieder
5.037
Neuestes Mitglied
galaxyaner
Zurück
Oben