Hue blink lights (and back to former state)

Moderator: leecollings

Post Reply
markkrammark
Posts: 5
Joined: Friday 28 February 2020 0:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Hue blink lights (and back to former state)

Post 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
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Hue blink lights (and back to former state)

Post 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)
markkrammark
Posts: 5
Joined: Friday 28 February 2020 0:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Hue blink lights (and back to former state)

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest