Update hue scene in dzvents script?
Posted: Thursday 23 December 2021 17:12
Hi all,
Use case:
When a room (Huiskamer) becomes empty, all lights turn off
When a room is reentered, lights turn on
All room lights are controlled by the hue bridge hardware, connected to domoticz
Problem:
Simply Switch off the Group Huiskamer when empty and Switch On when occupied does not work when one of the lights is off. In that case it will turn on the last state when all lights were on.
Approach to solution.
My approach is to update a hue scene (“WoonkamerPrevious”) with a dzvents script, that is triggered whenever a light of that room changes and will save the current state of the lights to that hue scene. And switch On that scene when the room becomes occupied.
I am guessing a json or http call could do such an update.
Can anyone help me out and set my on the right track?
Use case:
When a room (Huiskamer) becomes empty, all lights turn off
When a room is reentered, lights turn on
All room lights are controlled by the hue bridge hardware, connected to domoticz
Problem:
Simply Switch off the Group Huiskamer when empty and Switch On when occupied does not work when one of the lights is off. In that case it will turn on the last state when all lights were on.
Approach to solution.
My approach is to update a hue scene (“WoonkamerPrevious”) with a dzvents script, that is triggered whenever a light of that room changes and will save the current state of the lights to that hue scene. And switch On that scene when the room becomes occupied.
I am guessing a json or http call could do such an update.
Can anyone help me out and set my on the right track?