Replies: 2 comments 2 replies
-
|
This is done by actually throwing a StatusResponseError with the right code. This is then automatically converted into a matching status response. So i fact in this case you do it like here: 2.) In the handler you do the needed checks and can access current cluster state and such and throw an error when needed With this the "Changing" process errors which will rollback the state values and respond to the write call with the defined statuscode |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your reply. I have just learned to use the TypeScirpt language and currently trying to simulate a Thermostat "cluster with matter.js. If I can complete the V1.3 test case requirements, I also look forward to sharing it in the matter.js project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I was simulating the matter Thermostat device just now, the test case required the read-write attribute to exceed the limit and return a General error of 0x87 (TRUSTINT-ERROR). I searched for examples in the code but couldn't find a solution。
#1. Test Harness Client attempts to write OccupiedHeatingSetpoint below the MinHeatSetpointLimit and confirms that the device does not accept the value
./chip-tool thermostat write occupied-heating-setpoint 500 1 1
On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87)
[1676029113.651245][19392:19394] CHIP:DMG: WriteClient moving to [AwaitingDe]
[1676029113.651285][19392:19394] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR)
[1676029113.651397][19392:19394] CHIP:EM: <<< [E:43315i M:59735604 (Ack:107613834)] (S) Msg TX to 1:0000000000000001 [E8D5] --- Type 0000:10
Beta Was this translation helpful? Give feedback.
All reactions