You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facing a problem with Adaptive Lighting transiting to another color option
Some information about DUT:
DUT is using FreeRTOS and LwIP.
Thread priority: CHIP is 2 and LwIP is 9.
Messages received at through LwIP and has higher priority, so Postevent will take place.
After investigating the SDK, I observed the following:
The DUT is set to Adaptive Lighting by selecting it on the Homekit GUI.
Homekit sends a CommandRequest for moveToColorTemp and DUT handles callback updateTempCommand to set color temp.
Once the transition stabilizes, the DUT continuously triggers updateTempCommand.
A HueSaturation color option is selected on the Homekit GUI.
Homekit sends a CommandRequest moveToHueAndSaturation and DUT receives it + register timer with scheduleTimerCallbackMs for updateHueSatCommand.
Some Messages (for ReadRequest or other request) are received, which triggers PostEvent and added to the task queue (duplicate message packets are also observed).
The DUT enters RunEventLoop and continuously processes the task queue.
Homekit sends a CommandRequest to stopAllColorTransitions (sent by Apple on time, regardless of whether the DUT has completed the transition, I assumed).
The DUT handles stopAllColorTransitions and cancels/stops all ongoing timers for color control.
The DUT fails to complete the color transition.
Basically, before the DUT is able to handle the active timer, Homekit has sent another CommandRequest to stop all color transition and cancel all the timers.
Expected outcome:
The DUT is set to Adaptive Lighting by selecting it on the Homekit GUI.
Homekit sends a CommandRequest for moveToColorTemp and DUT handles callback updateTempCommand to set color temp.
A HueSaturation color option is selected on the Homekit GUI.
Homekit sends a CommandRequest moveToHueAndSaturation and DUT receives it + register timer with scheduleTimerCallbackMs for updateHueSatCommand.
DUT triggers callback updateHueSatCommand and change Hue + Saturation.
@xshuqun So are you claiming this is a problem with the server (and if so, what exactly is the problem), or with the client (HomeKit) sending the wrong commands?
@xshuqun So are you claiming this is a problem with the server (and if so, what exactly is the problem), or with the client (HomeKit) sending the wrong commands?
@bzbarsky-apple Apparently, I think the server hit a corner case where there is insufficient time to execute the necessary command.
However, whether the client is sending these command correctly, I am uncertain.
I had provided details in the description, where server (using FreeRTOS) has to clear its queue before handling active timer, but before the server could handle the timer, it was cancelled by the next command sent by the client.
I would like some advise if this can be handled in another way or other solutions? (e.g., Like handling the active timer first and clearing the queue?)
@xshuqun Honestly, to me it sounds like the client is doing something wrong (stopping transitions before they have finished) and that you should report this issue to Apple....
Reproduction steps
Facing a problem with Adaptive Lighting transiting to another color option
Some information about DUT:
After investigating the SDK, I observed the following:
moveToColorTemp
and DUT handles callbackupdateTempCommand
to set color temp.updateTempCommand
.moveToHueAndSaturation
and DUT receives it + register timer with scheduleTimerCallbackMs forupdateHueSatCommand
.stopAllColorTransitions
(sent by Apple on time, regardless of whether the DUT has completed the transition, I assumed).stopAllColorTransitions
and cancels/stops all ongoing timers for color control.Basically, before the DUT is able to handle the active timer, Homekit has sent another CommandRequest to stop all color transition and cancel all the timers.
Expected outcome:
moveToColorTemp
and DUT handles callbackupdateTempCommand
to set color temp.moveToHueAndSaturation
and DUT receives it + register timer with scheduleTimerCallbackMs forupdateHueSatCommand
.updateHueSatCommand
and change Hue + Saturation.I have attached the DUT with analysis of how FreeRTOS queue is being handled.
[1] DUT_adaptive_lighting_success_logs.txt
[2] DUT_adaptive_lighting_failed_logs.txt
This is a slight video on the operation using Homekit:
[1] https://github.com/user-attachments/assets/9edbafef-4ed0-4b2d-9e3c-dfbea94c19ca
Bug prevalence
always
GitHub hash of the SDK that was being used
master
Platform
ameba
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: