Installation¶
The component is installed with the ESPHome external components feature. Nothing has to be copied into your ESPHome installation.
Requirements¶
- ESPHome 2024.6.0 or higher
- Generic ESP32, ESP8266, BK72xx or RP2040 board
- A wired VE.Direct connection
Minimal configuration¶
Add the external component, a UART bus, the victron hub and the entities you want:
external_components:
- source: github://KinDR007/VictronMPPT-ESPHOME@main
uart:
id: uart_0
tx_pin: D8 # Not used / Not connected! The communication is read-only
rx_pin: D7
baud_rate: 19200
rx_buffer_size: 256
victron:
id: victron0
uart_id: uart_0
sensor:
- platform: victron
victron_id: victron0
panel_voltage:
name: "Panel voltage"
battery_voltage:
name: "Battery voltage"
battery_current:
name: "Battery current"
The uart_id and victron_id are optional if you use a single UART / victron device. All entities are optional, see Entities for the full list and Configuration for the hub options.
Pin a version
@main always follows the latest development state. To keep a build reproducible, reference a tag or a commit instead, e.g. github://KinDR007/VictronMPPT-ESPHOME@<commit>.
Home Assistant or MQTT¶
The examples publish via MQTT. If you use Home Assistant, replace the mqtt section with the native API, which has many advantages over MQTT:
Secrets¶
The examples read credentials from a secrets.yaml next to the configuration:
wifi_ssid: MY_WIFI_SSID
wifi_password: MY_WIFI_PASSWORD
mqtt_host: MY_MQTT_HOST
mqtt_username: MY_MQTT_USERNAME
mqtt_password: MY_MQTT_PASSWORD
Warning
Never commit secrets.yaml to a public repository.
Next step¶
Continue with Build & flash.