My target is to change brightness of Hue lights in several groups simultanuously back and forth when motion is detected.
At first I tried using the alert functionality, but the problem was that light state changes were often indicated even when the alert was already stopped due to which I losted the original states of the lights and was not able to return lights back to the states they were before the alert started.
Then I decided to do the alert functionality manually. I soon noticed that the system fails to receive every commands sent if they were sent too close to each other. I solved this by defining 2s transition time for the change of brightness and adding 2200ms delay before the next command. I also defined a new light group that contains all the lights (in multiple rooms) I want to control so that only one command is needed at a time.
The remaining problem is that when the motion is over I need to recover the light states to the time before the motion started and I cannot do that with just one command because the states of different lights were not originally the same. So several commands are needed and the problem is again the same: the system seems to lost some of the commands sent simultanuously. This is seen so that some of the lights do not return to the original state.
Does anyone know any workaround for this?
I’m running Hassio in RaspberryPi connected to Philips Hue bridge. Hue Magic is used for controlling the lights from Node-Red.