VictronMPPT-ESPHOME/smartshunt-esp8266-example.yaml
2024-09-10 17:00:57 +02:00

133 lines
3.9 KiB
YAML

substitutions:
name: victron-smartshunt
external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main
esphome:
name: ${name}
platform: ESP8266
board: d1_mini
min_version: 2024.6.0
external_components:
- source: ${external_components_source}
refresh: 0s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
logger:
baud_rate: 0
esp8266_store_log_strings_in_flash: false
# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
# The native API has many advantages over MQTT: https://esphome.io/components/api.html#advantages-over-mqtt
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client
# api:
uart:
id: uart_0
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
rx_buffer_size: 256
victron:
uart_id: uart_0
id: victron0
throttle: 10s
sensor:
- platform: victron
victron_id: victron0
battery_voltage:
name: "${name} battery voltage"
auxiliary_battery_voltage:
name: "${name} auxiliary battery voltage"
midpoint_voltage_of_the_battery_bank:
name: "${name} midpoint voltage of the battery bank"
midpoint_deviation_of_the_battery_bank:
name: "${name} midpoint deviation of the battery bank"
battery_current:
name: "${name} battery current"
battery_temperature:
name: "${name} battery temperature"
instantaneous_power:
name: "${name} instantaneous power"
consumed_amp_hours:
name: "${name} consumed amp hours"
state_of_charge:
name: "${name} state of charge"
time_to_go:
name: "${name} time to go"
depth_of_the_deepest_discharge:
name: "${name} depth of the deepest discharge"
depth_of_the_last_discharge:
name: "${name} depth of the last discharge"
depth_of_the_average_discharge:
name: "${name} depth of the average discharge"
number_of_charge_cycles:
name: "${name} number of charge cycles"
number_of_full_discharges:
name: "${name} number of full discharges"
cumulative_amp_hours_drawn:
name: "${name} cumulative amp hours drawn"
min_battery_voltage:
name: "${name} min battery voltage"
max_battery_voltage:
name: "${name} max battery voltage"
last_full_charge:
name: "${name} last full charge"
number_of_automatic_synchronizations:
name: "${name} number of automatic synchronizations"
number_of_low_main_voltage_alarms:
name: "${name} number of low main voltage alarms"
number_of_high_main_voltage_alarms:
name: "${name} number of high main voltage alarms"
number_of_low_auxiliary_voltage_alarms:
name: "${name} number of low auxiliary voltage alarms"
number_of_high_auxiliary_voltage_alarms:
name: "${name} number of high auxiliary voltage alarms"
min_auxiliary_battery_voltage:
name: "${name} min auxiliary battery voltage"
max_auxiliary_battery_voltage:
name: "${name} max auxiliary battery voltage"
amount_of_discharged_energy:
name: "${name} amount of discharged energy"
amount_of_charged_energy:
name: "${name} amount of charged energy"
dc_monitor_mode_id:
name: "${name} dc monitor mode id"
text_sensor:
- platform: victron
victron_id: victron0
alarm_condition_active:
name: "${name} alarm condition active"
alarm_reason:
name: "${name} alarm reason"
model_description:
name: "${name} model description"
firmware_version:
name: "${name} firmware version"
device_type:
name: "${name} device type"
serial_number:
name: "${name} serial number"
dc_monitor_mode:
name: "${name} dc monitor mode"
binary_sensor:
- platform: victron
victron_id: victron0
relay_state:
name: "${name} relay state"