OccupiedHeatingSetpoint return ZB_ZCL_STATUS_INVALID_VALUE

Good morning,
I'm developing a thermostat.
I'm using the nRF5 SDK for thread and zigbee 4.2.0 - ZBOSS version 3.11
I have an issue with the cluster 0x201 attribute OccupiedHeatingSetpoint
The first time that I try to set a new value, zb_zcl_check_attr_value returns me ZB_ZCL_STATUS_INVALID_VALUE
After that, I send the attribute OccupiedCoolingSetpoint, it works, and immediately I retry to set OccupiedHeatingSetpoint. The second time it works.
I don't understand where is the problem.
Could you help me?

  • Hello,

    Did you check the Zigbee specification, and are you sure that it doesn't expect these settings in some particular order?

    Is there some way for me to reproduce the issue that you are seeing using only nRF52840 DKs? Best regards,

    Edvin

  • Hello Edvin, and thank you for your answer. 
    I've also thought that the issue is that it expects the settings in some particular order, but I haven't found information about this on the Zigbee specification.
    I've tried to invert the order. If I send OccupiedCoolingSetpoint before OccupiedHeatingSetpoint, I've the same behavior, but now is OccupiedCoolingSetpoint at receive the error ZB_ZCL_STATUS_INVALID_VALUE
    It seems that the first send of one of these two parameters is a problem. I sent many others parameters and all works well.
    I send the setting from my STM32 to the nRF52840. I don't know how you could do to replie my issue.

  • Hi,

    How are you sending it from the STM32 to the nRF52840? Is it over Zigbee?

    If you have another DK you can test with the Zigbee CLI Agent example and change the attribute with zcl attr write to see if you get the same error. 

    Best regards,

    Marte

  • Hi Marte,
    I send through serial the message from STM to nRF.
    nRF receive the message and send it over Zigbee.
    When nRF receive the message to send,

    I call --> zb_zcl_set_attr_val
    This function calls --> zb_zcl_check_attribute_writable
    That calls --> zb_zcl_check_attr_value
    Here, the first time, I have the error ZB_ZCL_STATUS_INVALID_VALUE

  • Hi,

    Are you setting OccupiedCoolingSetpoint and OccupiedHeatingSetpoint to a default value during initialization? What are you trying to set the attribute(s) to when it fails? According to the specification, OccupiedHeatingSetpoint must always be below the value of OccupiedCoolingSetpoint by at least MinSetpointDeadband, and OccupiedCoolingSetpoint must always be above OccupiedCoolingSetpoint by at least MinSetpointDeadband. If this is not the case, then INVALID_VALUE will be returned. So the issue might be that the value you are trying to set either of them to the first time does not satisfy this condition.

    Are you able to test it with another Nordic DK with the CLI agent? It would be helpful to know if the issue is with setting OccupiedCoolingSetpoint/OccupiedHeatingSetpoint attribute, or if the issue is with the sending.

    Best regards,

    Marte

Related