Hallo, ich habe bei meiner Insel PV-Anlage 2 MPPT Laderegler und einen SmartShunt von Victron. Diese 3 Geräte möchte ich in HA einbinden.
Mit dem GitHub Projekt von “GitHub - KinDR007/VictronMPPT-ESPHOME: Victron Mppt charger ve.direct to esphome node”
hab ich es soweit auch geschafft. Mein Problem ist, das ich für die beiden MPPT Laderegler und den SmartShunt jeweils einen eigenen ESP32 brauche, da ich die Projekte nicht miteinander in ESPHome verbinden kann. Von der Leistung und den Anschlüssen müsste aber ein ESP32 ja locker reichen. Mein Problem ist die yaml Programmierung in ESPHome.
Wie kann ich die 2 Projekte die verschiedene “external_components_source:” haben in eine Programmierung einbinden?
Vielen Dank für die Hilfe
Hier die YAML der beiden MPPT Laderegler:
esphome:
name: victron
friendly_name: Victron
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "XXXXXXXXXXXXXXX"
ota:
password: "XXXXXXXXXX"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: high
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Victron Fallback Hotspot"
password: "XXXXXXXXX"
captive_portal:
substitutions:
name: victron
device0: victron0
device1: victron1
external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main
external_components:
- source: ${external_components_source}
refresh: 0s
uart:
- id: uart0
tx_pin: GPIO19 # Not connected! The communication is read-only
rx_pin: GPIO16 # Connect this this GPIO and GND to the first MPPT charger
baud_rate: 19200
rx_buffer_size: 256
- id: uart1
tx_pin: GPIO20 # Not connected! The communication is read-only
rx_pin: GPIO17 # Connect this this GPIO and GND to the second MPPT charger
baud_rate: 19200
rx_buffer_size: 256
victron:
- id: victron0
uart_id: uart0
throttle: 10s
- id: victron1
uart_id: uart1
throttle: 10s
sensor:
- platform: victron
victron_id: victron0
max_power_yesterday:
name: "${device0} max power yesterday"
max_power_today:
name: "${device0} max power today"
panel_voltage:
name: "${device0} panel voltage"
panel_power:
name: "${device0} panel power"
battery_current:
name: "${device0} panel current"
load_current:
name: "${device0} load current"
yield_today:
name: "${device0} Ertrag Heute"
device_class: energy
yield_total:
name: "${device0} Ertrag Gesamt"
yield_yesterday:
name: "${device0} Ertrag Gestern"
day_number:
name: "${device0} Anzahl Tage"
- platform: victron
victron_id: victron1
max_power_yesterday:
name: "${device1} max power yesterday"
max_power_today:
name: "${device1} max power today"
panel_voltage:
name: "${device1} panel voltage"
panel_power:
name: "${device1} panel power"
battery_current:
name: "${device1} panel current"
load_current:
name: "${device1} load current"
yield_today:
name: "${device1} Ertrag Heute"
device_class: energy
yield_total:
name: "${device1} Ertrag Gesamt"
yield_yesterday:
name: "${device1} Ertrag Gestern"
day_number:
name: "${device1} Anzahl Tage"
text_sensor:
- platform: victron
victron_id: victron0
charging_mode:
name: "${device0} charging mode"
error:
name: "${device0} error"
tracking_mode:
name: "${device0} tracking mode"
- platform: victron
victron_id: victron1
charging_mode:
name: "${device1} charging mode"
error:
name: "${device1} error"
tracking_mode:
name: "${device1} tracking mode"
Hier der YAML Code für den SmartShunt
esphome:
name: shunt
friendly_name: Shunt
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "XXXXXXXXXXXXXXX"
ota:
password: "XXXXXXXXXX"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: high
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Shunt Fallback Hotspot"
password: "XXXXXXXX"
captive_portal:
external_components:
- source: github://KinDR007/VictronSmartShunt-ESPHOME@main
uart:
id: the_uart
rx_pin: GPIO18
baud_rate: 19200
stop_bits: 1
data_bits: 8
parity: NONE
rx_buffer_size: 256
victron_smart_shunt:
uart_id: the_uart
sensor:
- platform: victron_smart_shunt
battery_voltage:
name: "Battery Voltage"
id: bv
battery_current:
name: "Battery Current"
id: bc
fw_version:
name: "fw"
id: fw
pid:
name: "pid"
id: pid
instantaneous_power:
name: "instantaneous power"
id: instantaneous_power
time_to_go:
name: "time to go"
id: time_to_go
consumed_amp_hours:
name: "consumed amp hours"
id: consumed_amp_hours
unit_of_measurement: Ah
min_battery_voltage:
name: "Min battery voltage"
id: min_battery_voltage
max_battery_voltage:
name: "Max battery voltage"
id: max_battery_voltage
amount_of_charged:
name: "Amount of charged"
id: amount_of_charged
filters:
- multiply: 0.001
state_class: total
device_class: energy
unit_of_measurement: kWh
last_full_charge:
name: "Time since last full charge"
id: last_full_charge
deepest_discharge:
name: "Depth of the deepest discharge"
id: deepest_discharge
unit_of_measurement: Ah
last_discharge:
name: "Depth of the last discharge"
id: last_discharge
unit_of_measurement: Ah
discharged_energy:
name: "Amount of discharged energy"
id: discharged_energy
filters:
- multiply: 0.001
state_class: total
device_class: energy
unit_of_measurement: kWh
state_of_charge:
id: state_of_charge
name: "SoC"