zha-device-handlers
zha-device-handlers copied to clipboard
Add Lixee ZLinky_TIC manufacturer specific cluster
This PR adds support for the manufacturer specific cluster 0xFF66 of the Lixee ZLinky_TIC device.
Reference available at:
- https://github.com/fairecasoimeme/Zlinky_TIC
- https://github.com/fairecasoimeme/Zlinky_TIC/blob/master/ZLinky/Source/LixeeCluster.h#L74-L125
Submitted as draft as there's only one of many attribute for now.
Resolves #1146
Codecov Report
Base: 80.00% // Head: 80.02% // Increases project coverage by +0.02% :tada:
Coverage data is based on head (
d718950) compared to base (2292c4e). Patch coverage: 100.00% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## dev #1165 +/- ##
==========================================
+ Coverage 80.00% 80.02% +0.02%
==========================================
Files 239 239
Lines 7430 7438 +8
==========================================
+ Hits 5944 5952 +8
Misses 1486 1486
| Impacted Files | Coverage Δ | |
|---|---|---|
| zhaquirks/lixee/__init__.py | 100.00% <100.00%> (ø) |
|
| zhaquirks/lixee/zlinky.py | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Pull Request Test Coverage Report for Build 3219067147
- 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.02%) to 80.022%
| Totals | |
|---|---|
| Change from base Build 3212112661: | 0.02% |
| Covered Lines: | 5952 |
| Relevant Lines: | 7438 |
💛 - Coveralls
any news about that Merge Request ? Still in DRAFT ?
Hi, it is not working yet, querying the manufacturer specific clusters is failing. I believe there are firmware related issues to be resolved before, ~and my Lixee ZLinky_TIC is loosing connectivity after a few hours/days which is not helping making progress~.
Edit: my ZLinky_TIC issues were resolved by manufacturer, it was an hardware issue.
Hi, maybe reading error is related to this : https://github.com/Koenkk/zigbee2mqtt/issues/11431
As i understand, reading is not working on this cluster when manufacturer code is specified.
As i understand, reading is not working on this cluster when manufacturer code is specified.
Indeed, that is the firmware related issue I'm referring to.
See also https://github.com/fairecasoimeme/Zlinky_TIC/issues/46#issuecomment-1041236184
Any news on this?
FYI : OTA 6.0 released
How can I help on this ?
The issue when reading manufacturer specific cluster attributes with the manufacturer id specified seems to be still present with firmware v6.0.
Invoking the following with ZHA Toolkit with the manufacturer id:
service: zha_toolkit.attr_read
data:
ieee: 00:15:8d:00:04:ff:96:92
cluster: 65382
attribute: 0
manf: 4151
Does not work:
2022-09-02 14:41:11.750 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=True, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), manufacturer=4151, tsn=187, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
2022-09-02 14:41:11.750 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Sending request: Read_Attributes(attribute_ids=[0])
2022-09-02 14:41:11.859 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Received ZCL frame: b'\x1C\x37\x10\xBB\x01\x00\x00\x86'
2022-09-02 14:41:11.860 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=True, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), manufacturer=4151, tsn=187, command_id=1, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-09-02 14:41:11.861 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Decoded ZCL frame: ManufacturerSpecificCluster:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=<Status.UNSUPPORTED_ATTRIBUTE: 134>)])
Without the manufacturer id:
service: zha_toolkit.attr_read
data:
ieee: 00:15:8d:00:04:ff:xx:xx
cluster: 65382
attribute: 0
It works:
2022-09-02 14:35:31.523 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=124, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
2022-09-02 14:35:31.523 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Sending request: Read_Attributes(attribute_ids=[0])
2022-09-02 14:35:32.334 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Received ZCL frame: b'\x18\x7C\x01\x00\x00\x00\x42\x10\x20\x20\x20\x20\x20\x20\x42\x41\x53\x45\x00\x20\x20\x20\x20\x20'
2022-09-02 14:35:32.335 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=124, command_id=1, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-09-02 14:35:32.335 DEBUG (MainThread) [zigpy.zcl] [0xCB89:1:0xff66] Decoded ZCL frame: ManufacturerSpecificCluster:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=<Status.SUCCESS: 0>, value=TypeValue(type=CharacterString, value=' BASE'))])
Anyway, I'm downgrading the firmware to v5.0 because v6.0 is causing issues.
Apparently v7.0 has been released, does it help with this in any way?
This pre-release fix the manufacturer issue : https://github.com/fairecasoimeme/Zlinky_TIC/releases/tag/v9.0
Awesome, thanks! OTA in progress...
I can confirm it is now working fine:
service: zha_toolkit.attr_read
data:
ieee: 00:15:8d:00:04:ff:96:92
cluster: 65382
attribute: 0
manf: 4151
2022-09-30 22:02:52.899 DEBUG (MainThread) [zigpy.zcl] [0x77AF:1:0xff66] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=True, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), manufacturer=4151, tsn=47, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
2022-09-30 22:02:52.899 DEBUG (MainThread) [zigpy.zcl] [0x77AF:1:0xff66] Sending request: Read_Attributes(attribute_ids=[0])
2022-09-30 22:02:52.979 DEBUG (MainThread) [zigpy.zcl] [0x77AF:1:0xff66] Received ZCL frame: b'\x1C\x37\x10\x2F\x01\x00\x00\x00\x42\x10\x20\x20\x20\x20\x20\x20\x42\x41\x53\x45\x00\x20\x20\x20\x20\x20'
2022-09-30 22:02:52.980 DEBUG (MainThread) [zigpy.zcl] [0x77AF:1:0xff66] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=True, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), manufacturer=4151, tsn=47, command_id=1, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
2022-09-30 22:02:52.980 DEBUG (MainThread) [zigpy.zcl] [0x77AF:1:0xff66] Decoded ZCL frame: ManufacturerSpecificCluster:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=<Status.SUCCESS: 0>, value=TypeValue(type=CharacterString, value=' BASE'))])
I'll update this PR ASAP.
I've got good news to share:




Next on my TODO list is to translate all the attributes from French to English...
I believe this PR is now ready for another round of reviews. :pray:
Nice! By the way, would be great if someone wrote ZLinky TIC OTA Provider download code for zigpy, see -> https://github.com/zigpy/zigpy/issues/1060
Thanks @dmulcahey! 🎉
I have Home Assistant (version: 2022.10.5) with Zlinky (firmware 9 out-of-the-box) and I checked the ZLinkyTICManufacturerCluster. All is ok Many thanks