Repository navigation
fix(profiles): alias H/L4684 & HC4684 to H4684Profile and enable WHO 22 on FW >= 6.0.0 - #147
Conversation
…22 on FW >= 6.0.0
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
fedem95
left a comment
There was a problem hiding this comment.
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.
|
@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 |
What is the problem
A physical BTicino H/L4684 Colour Touch Screen (
FW 6.0.11, kernel2.6.2, distro6.0.0,WHO=13device type23) diagnostics capture contributed inOpenWebNet-HA/MyHOME#466(comment6398442412) uncovered two gaps inOWNd/profiles.py:modelName"H/L4684"fell back toGenericGatewayProfile: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, causingOWNGatewayto fall back toGenericGatewayProfileinstead ofH4684Profile(max_command_sessions = 1,WHO 5/WHO 17/WHO 25excluded).H4684Profilelacked firmware-gatedWHO 22(bt_multi6-channel sound diffusion) onFW >= 6.0.0:H4684firmware2.0.54(020054) ships onlybt_difson(WHO 16).H/L4684firmware6.0.11(distribution6.0.0) ships bothbt_difson(WHO 16) andbt_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
MyHOMEPR: OpenWebNet-HA/MyHOME#818Important
Merge Order (
MyHOME#818first):.github/workflows/myhome-conformance.ymlrunsOpenWebNet-HA/MyHOME@v2-phase1-architectureagainst this branch. Companion PROpenWebNet-HA/MyHOME#818updates the 4MyHOMEtests that previously asserted"HL4684"/"HC4684"had noOWNdalias (GenericGatewayProfile). MergeMyHOME#818first, then re-runMyHOME test suiteon this PR.What is the solution
"hl4684"and"hc4684"to"h4684"in_ALIASES(OWNd/profiles.py):get_gateway_profile("H/L4684"),get_gateway_profile("HL4684"), andget_gateway_profile("HC4684")now resolve directly toH4684Profile.WHO 22(WHO_SOUND_DIFFUSION) toH4684ProfileforFW >= 6.0.0:_H4684_WHO22_FIRMWARE = (6, 0, 0)andH4684Profile.__init__(firmware_version=None)usingparse_firmware_version(firmware_version)(matchingF453AVProfile).2.0.54(noWHO 22) and6.0.0/6.0.11(WHO 22present) has not been captured, so(6, 0, 0)is used as a conservative lower-bound cutoff:firmware_version=Noneor< (6, 0, 0)preserves{1, 2, 3, 4, 15, 16, 18}, while>= (6, 0, 0)enablesWHO 22({1, 2, 3, 4, 15, 16, 18, 22}) and continues to excludeWHO 5,WHO 17, andWHO 25.get_gateway_profile()to passfirmware_versionintoH4684Profile(firmware_version=firmware_version)soOWNGateway.firmwareassignment dynamically refreshesgateway.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)"]Hardware Verification
FW 6.0.11, kernel2.6.2, distro6.0.0, UPnPurn:schemas-bticino-it:device:touchscreen:1,modelName = "H/L4684") by@andrea-maginOpenWebNet-HA/MyHOME#466.WHO 16(*16*3*101##,*16*13*11##..61##) andWHO 22(*#22*2#1*12*1*4##,*#22*3#1#1*12*0*10##..3#6#1##) frames on the live6.0.11event 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 toH4684Profilewith conservativeWHO 22 == Falsewhenfirmware_versionis omitted.test_h4684_profile_firmware_gated_who22: verifiesWHO 22isFalsefor"2.0.54"andTruefor"6.0.11"/(6, 0, 0)whileWHO 17andWHO 25remainFalse.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 verifiesOWNGateway({"modelName": "H/L4684"})dynamically upgradesgw.profile.supports_who(WHO_SOUND_DIFFUSION)fromFalsetoTrueupon receiving firmware6.0.11.pytest tests -q: 2,045 passedruff check OWNd tests scripts: All checks passedscripts/update_readme_profiles.py --check: In syncscripts/verify_library_standards.py: All OWNd library standards passedscripts/sync_documentation.py --check: Fully synchronizedWhere are the traces
H/L4684(FW 6.0.11) capture:OpenWebNet-HA/MyHOME#466(comment6398442412), ingested inOpenWebNet-HA/MyHOME#818undertests/fixtures/traces/issue_466/config_entry-myhome_HL4684_fw6_0_11.json(257frames:212 rx,45 tx).What does the Firmware Oracle / Encyclopedia say
WHO = 16/WHO = 22/OWN-DEV-0135):OWN-DEV-0135(Colour Touch Screen) documentsH4684(Axolute) andL4684(LivingLight).WHO = 16(legacy 2-wire sound system) andWHO = 22(6-channel multimedia sound diffusion) coexist on modern Linux touchscreens/gateways bridging stereo sources101..104(2#1..2#4) and amplifier zones11..69(3#A#Z).H4684020054):H4684020054image shipsbt_difson(WHO 16) withoutbt_multi(WHO 22), whereas physicalH/L46846.0.11(distribution6.0.0) ships both;(6, 0, 0)conservatively gatesWHO 22to the evidenced firmware generation while3.x–5.xremain uncaptured.Checklist
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).H/L4684(FW 6.0.11) OpenWebNet bus trace and020054firmware oracle fixtures.pytest,ruff,verify_library_standards.py, andsync_documentation.py --checkpass.