Skip to content
Edit this page

Debug

Logs the raw VE.Direct traffic. Use it when a device does not work out of the box.

What it shows

  • Every received line is logged via the UART debug option
  • Native API, so logs are available over Wi-Fi
  • Basic text sensors to identify the device

Tip

Attach the complete log when you report an issue.

Configuration

Source: debug-esp32-example.yaml · debug-esp8266-example.yaml

debug-esp32-example.yaml
substitutions:
  name: victron-debug
  external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main
  tx_pin: GPIO16
  rx_pin: GPIO17

esphome:
  name: ${name}
  friendly_name: ${name}
  project:
    name: "KinDR007.VictronMPPT-ESPHOME"
    version: 2.0.0

esp32:
  board: wemos_d1_mini32
  framework:
    type: esp-idf

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

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  min_auth_mode: WPA2

ota:
  platform: esphome

logger:

api:
  reboot_timeout: 0s

uart:
  id: uart_0
  baud_rate: 19200
  tx_pin: ${tx_pin}
  rx_pin: ${rx_pin}
  debug:
    direction: BOTH
    dummy_receiver: false
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

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

text_sensor:
  - platform: victron
    victron_id: victron0
    model_description:
      name: "model description"
    firmware_version:
      name: "firmware version"
    device_type:
      name: "device type"
    serial_number:
      name: "serial number"
debug-esp8266-example.yaml
substitutions:
  name: victron-debug
  external_components_source: github://KinDR007/VictronMPPT-ESPHOME@main
  tx_pin: D8
  rx_pin: D7

esphome:
  name: ${name}
  friendly_name: ${name}
  project:
    name: "KinDR007.VictronMPPT-ESPHOME"
    version: 2.0.0

esp8266:
  board: d1_mini

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

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  min_auth_mode: WPA2

ota:
  platform: esphome

logger:
  baud_rate: 0
  esp8266_store_log_strings_in_flash: false

api:
  reboot_timeout: 0s

uart:
  id: uart_0
  baud_rate: 19200
  tx_pin: ${tx_pin}
  rx_pin: ${rx_pin}
  debug:
    direction: BOTH
    dummy_receiver: false
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

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

text_sensor:
  - platform: victron
    victron_id: victron0
    model_description:
      name: "model description"
    firmware_version:
      name: "firmware version"
    device_type:
      name: "device type"
    serial_number:
      name: "serial number"

Run it

esphome run debug-esp32-example.yaml

See Build & flash for details and the secrets the example needs.