Support for Control4 keypads, tested with 6 button C4-KP6-Z#1792
Support for Control4 keypads, tested with 6 button C4-KP6-Z#1792ArcadeMachinist wants to merge 3 commits into
Conversation
Port of original Control4 support (C4-KP6i keypads, Zigbee profile 0xC25C) to the refactored zspec architecture: - src/zspec/consts.ts: add CONTROL4_PROFILE_ID = 0xc25c constant - src/adapter/ezsp/adapter/ezspAdapter.ts: accept frames with Control4 profile in processMessage() so button-press events reach the controller - src/adapter/z-stack/adapter/endpoints.ts: register endpoint 197 with CONTROL4_PROFILE_ID so ZNP can select the correct source endpoint when sending LED commands - src/controller/model/endpoint.ts: add Endpoint.writeControl4() method that builds a proprietary GLOBAL ZCL frame (cmd 0x31, reservedBits=1, seq=0x73) and sends it on the Control4 APS profile Receiving button presses works with both ZNP and EZSP adapters. Sending LED commands requires EZSP (SiliconLabs-based coordinator) or ZNP with a registered source endpoint. See Koenkk/zigbee2mqtt#15361 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- controller.ts: capture C4 modelID from genPowerCfg attr 0x0007 broadcast
on join ("c4:<type>:<model>" format), since C4 devices return
UNSUPPORTED_ATTRIBUTE for genBasic.modelId
- device.ts: skip genBasic interview when modelID already starts with "C4-"
(avoids double-failure on every re-interview)
- device.ts: preserve endpoints with CONTROL4_PROFILE_ID in
updateActiveEndpoints() so endpoint 197 (and converter-managed logical
endpoints) are not pruned when the device re-joins and re-interviews
|
This is far too much customs for ZH. Lots of this should be in ZHC. |
I do not think there is way to do ZCL handling from an external converter. If there is anyway in ZH to parse and construct APS from an external converter - I would be happy to move that. |
|
That would seem to be beyond the scope of Z2M entirely. If the manuf doesn't want support in the Open Source community, it's their choice I guess. Piling on every custom protocol into Z2M is a non-starter. |
|
This requires indeed to much an invasive changes in the core (zigbee-herdsman), the quirks lookup changes would be fine by me but the others are not. |
|
Ok, I'll try to keep my fork updated for the C4 stuff. If in the future there would be a way to extend profile handling or even to construct APS on supported sticks from the external converter - that would be cool, but until, I'm ok upkeeping the C4 fork. I do not plan to add any more weird devices, but all C4-KPx-Z series keypads should work, any number of buttons. |
c4-kp6-z.js
Attempt #2 to add my Control4 keypad thing to upstream.
Requires Silabs dongle with EZSP firmware.
I'm unaware if it can be made to work with any other dongles, the basic requirement is to be able to use non-compliant ZCL frames to/from custom endpoint.
Yes, buttons and LEDs work.
PoC: https://youtu.be/eDS3Qqf_STI
Let me know if any improvements required.
Converter: attached.
c4-kp6-z.js