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
Summary:
When utilizing multiple channels in a scene trigger and updates from these channels occur simultaneously, both queries will commence processing. In such cases, the same scene record is retrieved from the database, containing an identical logical trigger state in the 'lastTriggerState' field. If a change in the value of any of these channels would result in a modification of the scene trigger state, the order of service at this point becomes inconsequential. The first processed query will store the new state in the database with the updated logical state of the scene trigger. However, at this moment the other channels still retain the previous state in memory, leading them to also trigger reactions assigned to the scene. This in turn may result in multiple notifications, for example.
Suggested action:
Use a critical section or another revalidation mechanism before accessing scene data.
Summary:
When utilizing multiple channels in a scene trigger and updates from these channels occur simultaneously, both queries will commence processing. In such cases, the same scene record is retrieved from the database, containing an identical logical trigger state in the 'lastTriggerState' field. If a change in the value of any of these channels would result in a modification of the scene trigger state, the order of service at this point becomes inconsequential. The first processed query will store the new state in the database with the updated logical state of the scene trigger. However, at this moment the other channels still retain the previous state in memory, leading them to also trigger reactions assigned to the scene. This in turn may result in multiple notifications, for example.
Suggested action:
Use a critical section or another revalidation mechanism before accessing scene data.
Code reference:
https://github.com/fracz/supla-scripts/blob/master/backend/controllers/StateWebhookController.php#L64
The text was updated successfully, but these errors were encountered: