Skip to content

Support for Control4 keypads, tested with 6 button C4-KP6-Z#1792

Open
ArcadeMachinist wants to merge 3 commits into
Koenkk:masterfrom
ArcadeMachinist:c4-on-upstream
Open

Support for Control4 keypads, tested with 6 button C4-KP6-Z#1792
ArcadeMachinist wants to merge 3 commits into
Koenkk:masterfrom
ArcadeMachinist:c4-on-upstream

Conversation

@ArcadeMachinist

@ArcadeMachinist ArcadeMachinist commented Jun 21, 2026

Copy link
Copy Markdown

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

ArcadeMachinist and others added 2 commits June 13, 2026 21:27
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
@Nerivec

Nerivec commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

This is far too much customs for ZH. Lots of this should be in ZHC.

@ArcadeMachinist

ArcadeMachinist commented Jun 21, 2026

Copy link
Copy Markdown
Author

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.
At least I do not see how.
The whole ordeal with C4 is that they decided to use propietary ZCL frames that are not actual ZCL.
APS frames are not ZCL, but ASCII with Control4 custom protocol.

If there is anyway in ZH to parse and construct APS from an external converter - I would be happy to move that.

@Nerivec

Nerivec commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

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.

@Koenkk

Koenkk commented Jun 22, 2026

Copy link
Copy Markdown
Owner

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.

@ArcadeMachinist

Copy link
Copy Markdown
Author

Ok, I'll try to keep my fork updated for the C4 stuff.
I just like the design and LED feedback in these particular keypads.

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.

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