Skip to content

2.0.0

Latest

Choose a tag to compare

@syssi syssi released this 21 Nov 10:59
f5e9b98

⚠️ Important changes in this release

Checksum validation is now enabled by default

Every received VE.Direct block is now checked against its checksum, and corrupted blocks are dropped (#261, #263, #264). This prevents garbage values caused by noisy or broken serial connections.

If your device stops publishing values after the update, it may send frames that fail the check. You can turn the check off:

victron:
  - id: victron0
    uart_id: uart0
    validate_checksum: false

Throttle has been reworked

throttle now works per block type, so it behaves the same on every device (#265):

  • Each block type (identified by its first field) is published at most once per interval. All values of the device are updated once per interval.
  • The first block of each type after boot is published immediately.
  • The interval is rounded to the nearest second, and halves are rounded up. throttle: 2s and throttle: 1500ms publish every second block of a type. throttle: 1s (default) publishes every block.
  • Blocks dropped because of a checksum error do not count. The next valid block of that type is published.

Devices that split their data into several blocks (e.g. BMV-70x/712, SmartShunt) now publish all blocks. Before, some blocks were discarded. This can double the number of state updates sent to Home Assistant. If that is too much, raise throttle or use the ESPHome sensor filters (throttle, throttle_average) on single entities.

Breaking changes

  • The minimum ESPHome version (2024.6.0) is now enforced by the config validator (#235, #262).
  • Invalid UART settings (baud rate, parity, stop bits …) are now reported through uart.final_validate_device_schema (#249, #252, #253).
  • Python 3.12 or newer is required (#200, #207, #247).
  • The example configurations now use the ESP-IDF framework (#213).
  • The redundant ${name} prefix was removed from entity names in the examples. Check your entity IDs if you copied the examples (#240).
  • The example WiFi configurations now set min_auth_mode: WPA2 (#237).
  • TIME_TO_GO uses the duration device class (#192), and the device class of the energy sensors was fixed (#141). Home Assistant may ask you to fix long-term statistics.
  • All configurations now carry project name and version (KinDR007.VictronMPPT-ESPHOME 2.0.0) (#266).

New devices and features

  • Orion XS: model mapping for 12V/12V-70A (0xA3F2), DC input voltage/current/power, example configs and faker (#222, #226, #248)
  • New product IDs: SmartSolar MPPT 75/15 and 75/10 rev2, BlueSolar MPPT 75/15, Smart Victron Inverter 0xA2F9, Blue Smart IP22 Charger 24|8 and 24|16, plus more from the VE.Direct HEX protocol documentation (#161, #168, #174, #181, #184, #185, #190, #209)
  • Blue Smart Charger added to the supported devices (#158)
  • BK72xx, RP2040 and ESP32-C6 listed or tested as supported MCUs (#225, #238)
  • ESPHome 2024.6.0 compatibility (#170)

Bug fixes

  • Prevent std::out_of_range crashes while parsing the OR, FW and FWE fields (#258)
  • Limit the UART bytes read per loop iteration to avoid loop starvation (#260)
  • Fix the second "max power yesterday" sensor (#173)
  • Fix the firmware version sensor of the BlueSmart example (#163)
  • Explicitly initialize pointer members (#236)

Maintenance

  • Compatibility with newer ESPHome releases: replaced deprecated APIs and *_SCHEMA constants, imports of CONF_SERIAL_NUMBER, CONF_ERROR_CODE, CONF_DEVICE_TYPE and UNIT_AMPERE_HOUR with fallbacks, ESPHOME_LOG_TAG, DOMAIN constants (#202, #241, #246, #250, #251, #254, #256, #257)
  • Code cleanup: C++17 nested namespaces, constexpr, clang-tidy fixes, centralized schemas (#204, #228, #233, #239)
  • Tests: C++ unit tests, component schema tests with pytest, new fakers (#162, #186, #242, #243)
  • CI and tooling: ruff instead of flake8, clang-tidy 22, pinned actions, caching improvements, pre-commit updates (#137, #159, #191, #193, #198, #203, #227, #229, #230, #231, #232, #234, #244, #255, #262)
  • Documentation: list of all sensors with protocol labels, notes on native api, ADUM1201 and the JST socket power limit, ESP32 pinout (#165, #166, #171, #177, #195, #214)

Pull requests

  • stop blocking ESPHome by @wozz in #133
  • Fix CI pipeline by @syssi in #137
  • Revert "update (#133)" by @syssi in #138
  • Fix device class of energy sensors (Closes: #131) by @syssi in #141
  • Add Blue Smart Charger to supported devices by @icefest in #158
  • Fix CI by @syssi in #159
  • Add support for 0xA332 - Blue Smart IP22 charger 24|8 by @icefest in #161
  • Add some more fake devices by @syssi in #162
  • Fix firmware version sensor of the BlueSmart example configuration by @syssi in #163
  • Mention all supported sensors by @syssi in #165
  • Improve the docs by mention the victron protocol label per sensor by @syssi in #166
  • Add new Smart Victron Inverter PID (0xA2F9) by @syssi in #168
  • Add ESPHome 2024.6.0 compatibility by @Roving-Ronin in #170
  • Add native api note for Home Assistant users by @syssi in #171
  • Remove vscode config from version control by @syssi in #172
  • Fix second max power yesterday sensor by @syssi in #173
  • Add Blue smart IP22 Charger 24|16 (A336) by @aiolos in #174
  • Add commented api component by @syssi in #177
  • add new/additional pid for smartsolar mppt 75/15 by @carslen in #181
  • Add new PID 0xA07D as BlueSolar MPPT 75/15 (Closes: #182) by @syssi in #184
  • Add revision to new PID 0xA07D by @syssi in #185
  • Add new PID 0xA074 as SmartSolar MPPT 75/10 rev2 by @miceno in #190
  • Use ruff format at the CI by @syssi in #191
  • Use device class duration for TIME_TO_GO by @Tommixoft in #192
  • Migrate to actions/cache@v4 by @syssi in #193
  • Add Smart Solar MPPT 150/70 rev3 faker by @syssi in #186
  • Update README.md by @icefest in #195
  • Adopt structure of the ESPHome CI by @syssi in #198
  • Update minimum python version to 3.10 by @syssi in #200
  • Fix *.*_SCHEMA deprecations by @syssi in #202
  • Make CI build verbose by @syssi in #203
  • Centralize component schema declarations by @syssi in #204
  • Drop Python 3.10 support by @syssi in #207
  • Add more product IDs found in the VE.direct HEX protocol documentation by @gandy92 in #209
  • Use ESP-IDF by @syssi in #213
  • Add note on ADUM1201 connection by @gandy92 in #214
  • Add BK72xx and RP2040 as supported MCUs by @syssi in #225
  • Add dc_input_{voltage,current,power} of the Orion XS by @dnev in #222
  • Bump clang-tidy from 18 to 22 by @syssi in #227
  • Use C++17 concatenated namespace syntax by @syssi in #228
  • CI: Add workflow_dispatch trigger by @syssi in #230
  • Clean up pre-commit hooks by @syssi in #231
  • Optimize clang-tidy by removing splits, adding incremental scans and fixing platformio cache by @syssi in #229
  • Fix venv cache miss, pin all actions to commit hashes by @syssi in #232
  • Improve ruff configuration by @syssi in #234
  • Fix clang-tidy warnings by @syssi in #233
  • Explicitly initialize pointer members to nullptr by @syssi in #236
  • Add min_auth_mode: WPA2 to all wifi configurations by @syssi in #237
  • Move minimum ESPHome version into validator by @syssi in #235
  • Replace static const char with constexpr by @syssi in #239
  • Add Orion XS example configs and faker based on real device captures by @syssi in #226
  • Remove redundant name substitution prefix from entity names by @syssi in #240
  • Replace deprecated ESPHome APIs by @syssi in #241
  • Add ESP32C6 compatibility test by @syssi in #238
  • Add component schema tests and pytest CI job by @syssi in #242
  • Add C++ unit tests by @syssi in #243
  • CI: Remove pio warmup step for esp32-idf-tidy by @syssi in #244
  • Drop Python 3.11 support, require Python 3.12+ by @syssi in #247
  • Import UNIT_AMPERE_HOUR from esphome.components.const with fallback by @syssi in #246
  • Add model mapping for Orion XS 12V/12V-70A (0xA3F2) by @gongloo in #248
  • Migrate deprecated check_uart_settings to final_validate_device_schema by @gongloo in #249
  • Declare log tags with ESPHOME_LOG_TAG by @syssi in #250
  • Add DOMAIN constant to components by @syssi in #251
  • Use DOMAIN in uart final validate schema by @syssi in #252
  • Remove obsolete final_validate_device_schema availability check by @syssi in #253
  • Import CONF_SERIAL_NUMBER from esphome.components.const if available by @syssi in #254
  • Replace flake8 with ruff docstring rules by @syssi in #255
  • Import CONF_ERROR_CODE from esphome.components.const if available by @syssi in #256
  • Import CONF_DEVICE_TYPE from esphome.components.const if available by @syssi in #257
  • fix: prevent std::out_of_range panics during string parsing of OR, FW, and FWE by @gongloo in #258
  • perf: limit UART bytes read per loop iteration to avoid loop starvation by @gongloo in #260
  • Update pre-commit hooks and pin the minimum ESPHome version by @syssi in #262
  • feat: implement zero-allocation single-pass checksum validation by @gongloo in #261
  • Fix checksums of the fake devices by @syssi in #264
  • Test checksum validation through the UART byte stream by @syssi in #263
  • Throttle per block type by @syssi in #265
  • Add project name and version to the esphome configurations by @syssi in #266

New Contributors

Full Changelog: 1.0.0...2.0.0