Skip to content

fix: make shared breaker phase mapping configurable - #8

Closed
analienx wants to merge 1 commit into
supervisor/upstream-master-26.108.1from
supervisor/zxb3-phase-mapping-rc2
Closed

analienx wants to merge 1 commit into
supervisor/upstream-master-26.108.1from
supervisor/zxb3-phase-mapping-rc2

Conversation

@analienx

@analienx analienx commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Regression fix for zigbee2mqtt/hassio-zigbee2mqtt#871

The static TS0601 / _TZE204_wbhaespm identity is shared by physically different breaker variants, so the dedicated priority SMTONOFF matcher introduced by Koenkk#12972 cannot safely infer the physical product or phase order.

This RC2 is forward-ported directly onto current upstream 26.108.1 (22a4c98f66b60fcc9886334cae47751acf47ec79) and keeps the collision family on the shared definition while making DP6/DP7/DP8 phase order an explicit per-device option.

Behavior

  • default phase_mapping: abc: DP6=A, DP7=B, DP8=C; preserves historical shared-family behavior and fixes the Add support for Drayton Wiser Smart TRV Koenkk/zigbee-herdsman-converters#871 regression
  • explicit phase_mapping: cba: DP6=C, DP7=B, DP8=A; preserves the mapping physically verified on the tested SMTONOFF ZXB3-125 three-phase units
  • static A/B/C exposes in either mode
  • no runtime phase-count inference
  • no dynamic exposes or new static fingerprint assumptions

Evidence

The earlier RC1 implementation was physically canary-tested on both installed SMTONOFF ZXB3-125 3P breakers with phase_mapping: cba: the setting persisted across Zigbee2MQTT restart, live phase telemetry remained correct, Home Assistant entities/statistics remained intact, and no unrelated device was captured by the shared definition.

This RC2 carries the same logical fix onto current upstream after tuya.ts changed.

RC2 freeze

Exact SHA: b278d857df8b8d12888e93f5ed9cb8ea4213ed65

Base: upstream 26.108.1 / 22a4c98f66b60fcc9886334cae47751acf47ec79

Scope: exactly one commit and three files:

  • src/devices/tuya.ts
  • src/lib/exposes.ts
  • test/smtonoff-zxb3.test.ts

Fresh PR CI on the exact RC2 SHA is fully green:

  • Build ✅
  • Check ✅
  • full Tests ✅ (28 files / 849 tests, including four focused SMTONOFF regression tests)
  • Bench ✅
  • autofix ✅

The dedicated ZXB3-125 priority matcher is removed. The shared _TZE204_wbhaespm definition gets the selectable phase mapping with abc as the compatibility-first default.

User configuration

Zigbee2MQTT: Device → Settings (specific) → Phase mapping.

  • abc = DP6=A, DP7=B, DP8=C
  • cba = DP6=C, DP7=B, DP8=A

Equivalent persisted device configuration:

devices:
  '<ieee_address>':
    phase_mapping: cba

This is the current upstream-ready candidate. RC1 in #6 is retained only as the physically tested predecessor artifact.

Copy link
Copy Markdown
Owner Author

Closing the fork-local mirror because the exact RC2 head b278d857df8b8d12888e93f5ed9cb8ea4213ed65 is already the head of the real upstream PR Koenkk#13156. Keeping both PRs open adds no execution or review value; the fork branch remains the source branch for the upstream PR.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant