Skip to content

0.8.6

Choose a tag to compare

@Jarauvi Jarauvi released this 13 Mar 10:03

Changes Made by @pvandenh

New Entity — DLB Master Switch

  • switch.dlb_enabled — Enables/disables PV Dynamic Load Balance entirely; mirrors the top-level "PV Dynamic Load Balance" toggle in the Z-Box app. Only created when the user has confirmed their charger has the physical DLB module installed.

Protocol Discovery

  • Reverse-engineered byte10 of the 0x6b message — The byte previously hardcoded as 01 in the hex template is the PV Dynamic Load Balance master toggle: 0x01 = enabled, 0x00 = disabled. Confirmed via packet capture:
Action | dlb_enabled byte -- | -- Toggle OFF | 0x00 = 0 Toggle ON | 0x01 = 1
  • Updated SET_DLB_CONFIG and SEND_DLB_CONFIG message structuresdlb_enabled slice added at [20:22] in both the client send and server ACK definitions in const.py. All subsequent field slices are unchanged — the byte sits between the sub-command constant (6b) and the existing extreme byte, which is exactly where 01 was previously hardcoded.

Service Changes

  • beny_wifi.set_dlb_config extended with one new optional field:
    • dlb_enabled (boolean) — master toggle for the entire DLB feature

Translations

  • Updated en.json and fi.json with translations for:
    • dlb_enabled switch entity
    • dlb_enabled field in the set_dlb_config service
  • Updated strings.json with entity translation key for the new switch

Implementation Notes

  • dlb_enabled defaults to 0x01 (enabled) in the _dlb_config cache, so existing installations are unaffected — the charger continues to receive the same byte value as before until the user explicitly toggles it
  • The ACK parser now captures dlb_enabled from the charger's response after every SET_DLB_CONFIG call, keeping the cache authoritative
  • The value is persisted to config_entry.options alongside all other DLB config fields, so state survives HA restarts
  • The new switch is registered first in the DLB entity list, matching the Z-Box app's visual hierarchy where the master toggle sits above the sub-controls