-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid Value Checking for custom attribute(TZ-515) #193
Comments
@Kris151 , Could you provide some examples of the values for the custom cluster that you expect to check? As far as I am concerned, the value of the custom cluster is defined by the users and can be verified by the users. |
@xieqinan As I know is the value is set in the attribute when the message is received. So I check the value in attribute handler and set the attribute back to its original value if it is not valid. But the client server will still receive 0x00, which is success. How can I check the value before the function set the value in attribute and return 0x87 if it is out of range? |
Hello, @Kris151 , I believe that the developer will receive a 0x86 (unsupported attribute) response when attempting to write an attribute that is not set. The stack will handle the above process accordingly. |
Hi @xieqinan , When I try with thermostat cluster, and I write the system mode attribute(attribute type: enum with value 0-9) with value 0x10, the client side receive 0x87. I want the same thing to do with my custom attribute (type: enum). Although I created the enum for my custom attribute, I have no ideas how to use it to check if the new value is valid or not. |
@Kris151 , Understood, I misunderstood your previous message. Currently, the custom cluster does not support checking the written value. However, support for the |
Hello, The custom cluster |
Question
I am writing a zigbee server with some custom clusters, and I don't know how to check if the value in command is valid or not. I can see there are some enum in device library to check the value, but I don't know how to implement similar function.
Additional context.
No response
The text was updated successfully, but these errors were encountered: