Page 1 of 1
Hue blink lights (and back to former state)
Posted: Friday 28 February 2020 0:58
by markkrammark
Hi all,
I'm really new to Domoticz, I installed it on a Pi and i'm pretty exited with is. I've got a lot of Hue bulbs inside my house which i like to let them 'blink' (on button press or anything else... ) a few times. I also want them to go back to their previous state afterwards. So, lamps which were off, back to off, lamps on, back to latest setting. Late on an alarm one, with red blinks would be great too

.
I searched, read and tried allot these days but i just dont know how to get this one done. I really hope anyone can help on this one.
Thank you and kind regards,
Mark
Re: Hue blink lights (and back to former state)
Posted: Friday 28 February 2020 6:11
by tozzke
with Blockly you could try and use something like this (you'll have to create a uservariable for this to work to prevent retriggering. Note that this is text but you'll have to "translate" it to Blockly):
Code: Select all
If [trigger_switch] = [On] and [target_light] = [On] and [uservariable_target_light_blink] = [0]
Do [Set [uservariable_target_light_blink] = [1] ]
[Set [target_light] = [Off] ]
[Set [target_light] = [On] After [1] sec]
[Set [target_light] = [Off] Atrer [2] sec]
[Set [target_light] = [On] After [3] sec]
[Set [target_light] = [Off] Atrer [4] sec]
[Set [target_light] = [On] After [5] sec]
[Set [target_light] = [Off] Atrer [6] sec]
[Set [target_light] = [On] After [7] sec]
[Set [uservariable_target_light_blink] = [0] After 8 sec]
Else if [trigger_switch] = [On] and [target_light] = [Off] and [uservariable_target_light_blink] = [0]
Do [Set [uservariable_target_light_blink] = [1] ]
[Set [target_light] = [On] ]
[Set [target_light] = [Off] After [1] sec]
[Set [target_light] = [On] Atrer [2] sec]
[Set [target_light] = [Off] After [3] sec]
[Set [target_light] = [On] Atrer [4] sec]
[Set [target_light] = [Off] After [5] sec]
[Set [target_light] = [On] Atrer [6] sec]
[Set [target_light] = [Off] After [7] sec]
[Set [uservariable_target_light_blink] = [0] After 8 sec]
If you want to change color I think you'll have to use (bash) scripts using the Hue API (that's the way I use it anyway)
Re: Hue blink lights (and back to former state)
Posted: Friday 28 February 2020 10:44
by markkrammark
Hi tozzke,
Thank you for your quick reply and help. The blocky way does work, however, I indeed want to use colors and groups, because of the high number of lights i want to blink...
Actually i would like something that does something like this:
1. Set: set of lamps state as variable (like, rgd, on/off, bright etc. )
2. Set: same set of lamps to color and on/off/on/off etc. (blink!)
3. Recal te previous setting of set of lamps as stored in 1.
Thanks allot!