Skip to content

fix(profiles): alias H/L4684 & HC4684 to H4684Profile and enable WHO 22 on FW >= 6.0.0 - #147

Merged
GreenGrassBlueOcean merged 2 commits into
masterfrom
fix/hl4684-profile-and-fw6
Oct 26, 2026
Merged

GreenGrassBlueOcean merged 2 commits into
masterfrom
fix/hl4684-profile-and-fw6

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What is the problem

A physical BTicino H/L4684 Colour Touch Screen (FW 6.0.11, kernel 2.6.2, distro 6.0.0, WHO=13 device type 23) diagnostics capture contributed in OpenWebNet-HA/MyHOME#466 (comment 6398442412) uncovered two gaps in OWNd/profiles.py:

  1. SSDP modelName "H/L4684" fell back to GenericGatewayProfile:
    • Physical H/L4684 (urn:schemas-bticino-it:device:touchscreen:1) advertises "H/L4684" over UPnP/SSDP (and LivingLight/Axolute variants use "HL4684" / "HC4684").
    • get_gateway_profile("H/L4684") strips non-alphanumeric characters to "hl4684", which was missing from _ALIASES, causing OWNGateway to fall back to GenericGatewayProfile instead of H4684Profile (max_command_sessions = 1, WHO 5 / WHO 17 / WHO 25 excluded).
  2. H4684Profile lacked firmware-gated WHO 22 (bt_multi 6-channel sound diffusion) on FW >= 6.0.0:
    • Legacy H4684 firmware 2.0.54 (020054) ships only bt_difson (WHO 16).
    • Physical H/L4684 firmware 6.0.11 (distribution 6.0.0) ships both bt_difson (WHO 16) and bt_multi (WHO 22), emitting paired frames across all 12 amplifier zones and active stereo sources (*16*13*11## + *#22*3#1#1*12*0*10##, *16*3*101## + *#22*2#1*12*1*4##).

Related: OpenWebNet-HA/MyHOME#466 (comment)
Companion MyHOME PR: OpenWebNet-HA/MyHOME#818

Important

Merge Order (MyHOME#818 first): .github/workflows/myhome-conformance.yml runs OpenWebNet-HA/MyHOME@v2-phase1-architecture against this branch. Companion PR OpenWebNet-HA/MyHOME#818 updates the 4 MyHOME tests that previously asserted "HL4684" / "HC4684" had no OWNd alias (GenericGatewayProfile). Merge MyHOME#818 first, then re-run MyHOME test suite on this PR.


What is the solution

  1. Alias "hl4684" and "hc4684" to "h4684" in _ALIASES (OWNd/profiles.py):
    • get_gateway_profile("H/L4684"), get_gateway_profile("HL4684"), and get_gateway_profile("HC4684") now resolve directly to H4684Profile.
  2. Add firmware-gated WHO 22 (WHO_SOUND_DIFFUSION) to H4684Profile for FW >= 6.0.0:
    • Added _H4684_WHO22_FIRMWARE = (6, 0, 0) and H4684Profile.__init__(firmware_version=None) using parse_firmware_version(firmware_version) (matching F453AVProfile).
    • Behaviour between 2.0.54 (no WHO 22) and 6.0.0 / 6.0.11 (WHO 22 present) has not been captured, so (6, 0, 0) is used as a conservative lower-bound cutoff: firmware_version=None or < (6, 0, 0) preserves {1, 2, 3, 4, 15, 16, 18}, while >= (6, 0, 0) enables WHO 22 ({1, 2, 3, 4, 15, 16, 18, 22}) and continues to exclude WHO 5, WHO 17, and WHO 25.
    • Updated get_gateway_profile() to pass firmware_version into H4684Profile(firmware_version=firmware_version) so OWNGateway.firmware assignment dynamically refreshes gateway.profile.

State Diagram

flowchart TD
    A["get_gateway_profile(model_name, firmware_version)"] --> B["Normalize alphanumeric key\n'H/L4684' -> 'hl4684'\n'HC4684' -> 'hc4684'"]
    B --> C["_ALIASES['hl4684' | 'hc4684'] -> 'h4684'"]
    C --> D["H4684Profile(firmware_version)"]
    D --> E{"parse_firmware_version(fw) >= (6, 0, 0)?"}
    E -- "No (None or < 6.0.0, e.g. 2.0.54)" --> F["supported_who = {1, 2, 3, 4, 15, 16, 18}\n(bt_difson WHO 16 only)"]
    E -- "Yes (e.g. 6.0.11)" --> G["supported_who = {1, 2, 3, 4, 15, 16, 18, 22}\n(bt_difson WHO 16 + bt_multi WHO 22)"]
Loading

Hardware Verification

  • Verified against live diagnostics trace captured on physical BTicino H/L4684 (FW 6.0.11, kernel 2.6.2, distro 6.0.0, UPnP urn:schemas-bticino-it:device:touchscreen:1, modelName = "H/L4684") by @andrea-mag in OpenWebNet-HA/MyHOME#466.
  • Confirmed simultaneous WHO 16 (*16*3*101##, *16*13*11##..61##) and WHO 22 (*#22*2#1*12*1*4##, *#22*3#1#1*12*0*10##..3#6#1##) frames on the live 6.0.11 event session.

How is it tested

  • tests/test_profiles.py:
    • test_h4684_profile: verifies "H/L4684", "HL4684", "HC4684", "H4684", "L4684", "N4684", "NT4684", "LGRH4684", and "LGR4684" resolve to H4684Profile with conservative WHO 22 == False when firmware_version is omitted.
    • test_h4684_profile_firmware_gated_who22: verifies WHO 22 is False for "2.0.54" and True for "6.0.11" / (6, 0, 0) while WHO 17 and WHO 25 remain False.
  • tests/test_h4684_gateway_trace.py:
    • test_hl4684_physical_fw6_0_11_trace_sequence: replays *#13**15*23##, *#13**16*6*0*11##, *#13**23*2*6*2##, *#13**24*6*0*0## and verifies OWNGateway({"modelName": "H/L4684"}) dynamically upgrades gw.profile.supports_who(WHO_SOUND_DIFFUSION) from False to True upon receiving firmware 6.0.11.
  • Verification suite:
    • pytest tests -q: 2,045 passed
    • ruff check OWNd tests scripts: All checks passed
    • scripts/update_readme_profiles.py --check: In sync
    • scripts/verify_library_standards.py: All OWNd library standards passed
    • scripts/sync_documentation.py --check: Fully synchronized

Where are the traces


What does the Firmware Oracle / Encyclopedia say

  1. OpenWebNet Encyclopedia (WHO = 16 / WHO = 22 / OWN-DEV-0135):
    • OWN-DEV-0135 (Colour Touch Screen) documents H4684 (Axolute) and L4684 (LivingLight).
    • WHO = 16 (legacy 2-wire sound system) and WHO = 22 (6-channel multimedia sound diffusion) coexist on modern Linux touchscreens/gateways bridging stereo sources 101..104 (2#1..2#4) and amplifier zones 11..69 (3#A#Z).
  2. Firmware Oracle (H4684 020054):
    • Emulated H4684 020054 image ships bt_difson (WHO 16) without bt_multi (WHO 22), whereas physical H/L4684 6.0.11 (distribution 6.0.0) ships both; (6, 0, 0) conservatively gates WHO 22 to the evidenced firmware generation while 3.x–5.x remain uncaptured.

Checklist

  • PR Description: Follows the structured sections (What is the problem, What is the solution, State Diagram, Hardware Verification, How is it tested, Where are the traces, What does the Firmware Oracle / Encyclopedia say).
  • Trace-Backed: Behavior is verified against physical H/L4684 (FW 6.0.11) OpenWebNet bus trace and 020054 firmware oracle fixtures.
  • Tests & Linters: pytest, ruff, verify_library_standards.py, and sync_documentation.py --check pass.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fedem95 fedem95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The profile aliases and firmware-gated WHO 22 support look good. The conservative cutoff is clearly documented, and all checks are passing. Approved.
@GreenGrassBlueOcean I’ll be unavailable for about two weeks, so I may be slow to respond until around November 9.

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit 6c3930d into master Oct 26, 2026
18 of 20 checks passed
@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor Author

@fedem95 thanks a lot for all your efforts so far. I hope you have a nice or productive time until November 9. Would you find it ok that I work with @gdluck through all remaining issues and I'll give final approval on the remaining prs from @gdluck ?

Off course if you see something in the meanwhile or afterwards please feel free to jump in at any time and I gladly roll back any changes

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.

3 participants