ptvoinfo / zigbee-configurable-firmware

PTVO firmware for CC2530, CC2531, and CC2652 Zigbee chips
https://ptvo.info/zigbee-configurable-firmware-features/
MIT License
205 stars 22 forks source link

Inconsistency firmware vs Z2M converter - basic switch #219

Closed arc12 closed 1 year ago

arc12 commented 1 year ago

Created using firmware tool dated 2023-08-08. Using Z2M v1.32.1. Device is CC2530.

A simple switch was created and converter set up in Z2M (see attached files).

The Zigbee device declares it is using cluster 0x0012

ZigBee Device Profile, Simple Descriptor Response, Nwk Addr: 0x91cc, Status: Success
    Sequence Number: 33
    Status: Success (0)
    Nwk Addr of Interest: 0x91cc
    Simple Descriptor Length: 16
    Simple Descriptor
        Endpoint: 1
        Profile: Home Automation (0x0104)
        Application Device: Unknown (0xfffe)
        Application Version: 0x0000
        Input Cluster Count: 2
        Input Cluster List
            Input Cluster: Basic (0x0000)
            Input Cluster: On/Off Switch Configuration (0x0007)
        Output Cluster Count: 2
        Output Cluster List
            Output Cluster: Basic (0x0000)
            Output Cluster: Multistate Input (Basic) (0x0012)

And sends ZCL Report Attributes against the same cluster, but Z2M debug messages show "unsupported" when the messages arrive and interaction with device/{MAC}/exposes show there is no converter (no state visible, error messages when interacting with switch configuration). device/{MAC}/info claims the device is supprted. Checking the .js file suggests it expects the cluster to be genOnOff, not genMultistateInput.

Z2M debug msg:

debug 2023-08-08 22:33:17Received Zigbee message from '{MAC}', type 'attributeReport', cluster 'genMultistateInput', data '{"presentValue":0}' from endpoint 1 with groupID 0
debug 2023-08-08 22:33:17No converter available for 'SimpleSwitch' with cluster 'genMultistateInput' and type 'attributeReport' and data '{"presentValue":0}'

Is this a bug or user error?

SimpleSwitch.zip

ptvoinfo commented 1 year ago

You've configured a clickable button. It sends all info to the "action" value. In your case, you should configure a GPIO output #1 with a virtual pin and link your Input 1 to Output 1. After this, re-generate a converter.

arc12 commented 1 year ago

Thankyou for your guidance. The central issue remains confusing for users: that the converter JS generated is not compatible with the firmware generated.