Zigbee brightness cluster attribute and cluster

Hello,

Using v1.9.1 nrfConnect and the Coordinator example on a nrf52840 -DK.

From Nordic docs:


I think I may be miss interpreting Zigbee Cluster spec...

Below is example of an RGB light bulb I'm trying to change brightness on but can't get it to change.
(I tried many different ways too long to list)

#1  Based on below cluster info etc. can you give example of ZCL commend format to set brightness to 50%?
We can use "move to level" to 50%. I believe range is 0x000 - 0xfe if I read it right?

I can turn same bulb on/off by sending on/off command. 
zcl cmd 0xcf3e 01 0x0006 0x01 --- ON, as example.

But I can't read the attribute showing on/off status? Am i missing some setting in Kconfig?
I tried including profile id 0x0104 also since my default is HA.

#2  Can you me show ZCL command example of how to read this?


From Nordic doc: 
zcl attr read h:dst_addr d:ep h:cluster [-c] h:profile h:attr_id


PS: I looked at other tickets but looks like my issue is much simpler.

Thank you, Jorgen

Parents
  • Hi Jorgen,

    Is the light bulb application based on a sample application or is the firmware written from scratch? And is the RGB bulb a specific device, or just a bulb that is ZigBee-compatible?

    #1  Based on below cluster info etc. can you give example of ZCL commend format to set brightness to 50%?

    If you have not seen the zigbee samples already I believe the light bulb sample is a dimmable ZigBee device which might contain the functionality you are looking for. And I will take a look and see if I have a sample available tomorrow morning

    #2  Can you me show ZCL command example of how to read this?

    I believe I also have a sample for this, but I will need to find it first

    Kind regards,
    Andreas

  • Hi Andreas, It's just a generic Zigbee HA1.2 RGB light bulb with dimming and color control. 
    The Nordic zigbee light bulb controller example is a eval board "light switch" so it doesn't show actual codes that are sent. 
    At least I could not find it...?
    I think I'm not sending the correct attr_id 
    In fact I'm not sure where I can find the att_id , for "level" (dimming) as example.

    I assume it's not the same as "level" cluster which is 0x0800 as per below.


    An example of the just the command would be great.

    Thanks!
    Jorgen

  • Thanks Andreas!
    Yes looks like I missed the payload format. I will have to decipher this a bit.

    • zcl cmd 0x8041 10 0x0008 0x02 -l 00A01400

    I will try this.

    Thanks, Jorgen

  • Continued..
    Yes I meant the "light switch" example you are referring to above.
    You assume correct. I can retrieve node ID's, clusters number of endpoints etc. as per screenshot I sent.
    Thanks for your help!

    Jorgen

  • Hi Jorgen,

    How is the progress going? Did the commands I posted work, and can we close this ticket? If not, please let me know if you have any additional questions regarding this specific ticket! 

    Kind regards,
    Andreas

  • Hi Andreas,
    Yes your command worked but haven't been able to get others to work like "step up" or "move to level".
    Is it possible for you to elaborate on the payload in your example 

    • zcl cmd 0x8041 10 0x0008 0x02 -l 00A01400

    "currentLevel" being "160" ? What is the range of current level attribute?
    How is 160 level represented in the payload?
    What table is this defined in in the Cluster doc?

    If I use "move to Level" command 0x00 what is the range? An example on this would be great.

    I think I'm entering the wrong payload parameters.

    Thanks, Jorgen

  • Hi Jorgen,

    I will see if I can test this myself either tomorrow or on Monday. The commands were fetched from an internal course a way back and they might have changed in newer SDKs

    JorgenM said:
    How is 160 level represented in the payload?

    160 should be represented by A0 in the payload, but I see now that it is not as clear as it might have been. However, there are a part of that payload that has data that are not 160. I will have to look into what the other bytes in the long payload is.

    JorgenM said:
    What table is this defined in in the Cluster doc?

    I will also find this again and supply it to you

    Kind regards,
    Andreas

Reply
  • Hi Jorgen,

    I will see if I can test this myself either tomorrow or on Monday. The commands were fetched from an internal course a way back and they might have changed in newer SDKs

    JorgenM said:
    How is 160 level represented in the payload?

    160 should be represented by A0 in the payload, but I see now that it is not as clear as it might have been. However, there are a part of that payload that has data that are not 160. I will have to look into what the other bytes in the long payload is.

    JorgenM said:
    What table is this defined in in the Cluster doc?

    I will also find this again and supply it to you

    Kind regards,
    Andreas

Children
  • Thanks Andreas!

    Examples would be great on the payload format for lighting in general with short explanation of range parameters.
    It would save a lot of dev time....:)

    Since lighting control is such a common requirement an appnote with examples on this topic would be extremely useful or even a "real" lighting controller design example. 
    There are many ways to dim a light and change color etc.
    Some implementations (step vs. move to level as example) has impact on real-time response as well as flooding network with messages and instead using broadcast group etc. depending on how many lightbulbs are on the network.
    Just some food for thought...

    Cheers, Jorgen

  • Hi again Jorgen,

    I took another look into the ZigBee Cluster Library (version 7) and found something that I hope will clarify how to use the command

    For the step command: zcl cmd 0x8041 10 0x0008 0x02 -l 00A01400

    we have that the long payload 00A01400 is formated as 0x00 0xA0 0x14 0x00.

    • Here 0x00 = "step mode" which says to step up

    • 0xA0 = "step size", which is to be changed by 160 (0xA0 = 160)
    • 0x14 = "transition time", which is stated as "The Transition time field specifies the time that SHALL be taken to perform the step, in tenths of a seconds
    • 0x00 = "option", which is just 0 since its not used

    These can be seen in chapter 5.2.2.3.6 in the specification

    I hope this clarifies this command for you! 

    Kind regards,
    Andreas

  • Thanks Andreas, 

    I was able to step up and down now!

    If I step too many times down or up and device is all the way to it's upper or lower limit already I get error msg saying="request pool is full, wait a little".

    Can you tell me what causes this error?

    I should not have to keep track of where I am on the step scale for a device, right?
    It should just reject or do nothing if I keep stepping beyond full/lowest brightness, please confirm.

    The "request pool..." error does not clear unless I push reset on eval brd and then I have to restart stack.
    So it's probably related to Nordic FW.
    Is there a way to clear this message with command?

    Thanks again!
    Jorgen

  • Hi Jorgen,


    I will see if I can dig up an explaination to this, however it might take some time (again due to vacation).

    My immediate thought is that the request pool only either has room for a given amount of orders (fixed bit number of orders can be held at a given time), or that the limit has been overstepped. Does the error clear if you step down after reaching the upper limit?

    Kind regards,
    Andreas

  • Andreas,
    No problem we have other things to work on .
    I believe once first error is generated it does not matter if I step down when at high limit or if I'm at low limit and step up. I will confirm this.
    ( "waiting" does not help) 
    Thx, Jorgen

Related