"Random Lights On-Off ": Turn On-Off yours selected lights at random intervals using edge drivers

If someone is interested in turning lights on-off , off-on randomly with manual activation/deactivation or through automations or smart lighting app.
Here the original links

1 Like

You rock Mariano, thanks !!

Hi @CarlosJ

Thinking that groovy will disappear at some point:
The edge drivers zigbee light Multifunction Mc, zigbee switch Mc and zigbee switch Power Mc have this feature built into each device individually.

You may do:

  • Program the minimum and maximum random time in each device, switch, light bulb, plug.

-start or stop random fuction on all devices at the same time with routines at a certain time and in a certain location mode.

  • Or you delay the stop random function in some devices in order to no Turn Off all bulbs that can are On.



If you have bulbs or switches that are not in my drivers, for example if it is zwave, you can create mirror automations, so that they change state when a light changes with random fuction:

I have it working on several lights and switches around the house and it has worked great this summer.

1 Like

Do you speak Spanish my friend?

Thats really great my friend, when the time comes to leave Groovy sure I will use your Edge Drivers. I have a doubt my friend. What happens with Hue Lights, connected by Hue Hub to ST ? Now they are as “Placeholder” in IDE interface (maybe use virtual/simulated lights devices?). Thanks in advance !

yes it’s my language

I can’t help you on that, I don’t use it and I don’t know how the Hue smartthings integration works

Entiendo Mariano. Una pregunta, se puede asignar uno de tus Edge Drivers a un Switch Virtual o Simulado que pueda ser después utilizado para controlar las luces Hue ?. Muchas gracias por tu amable atención. !

Un switch virtual ya tiene su propio controlador, tipo DTH o Edge driver.

Existen switch virtuales Edge driver, en mi canal hay uno y hay dispositivos virtuales de todo tipo hechos por otros usuarios @TAustin o @ygerlovin

2 Likes

Excelente Mariano, muchas gracias !..y en tu Switch Virtual tiene esta funcionalidad opcional de apagarse y prenderse aleatoriamente ?

Hola Carlos,

No tiene esa funcionalidad, pero la pondré.
Te aviso cuando esté hecho

1 Like

Genial mi amigo !! De esta forma con el switch virtual se puede usar la función random ON/OFF para cualquier tipo de dispositivo, inclusive aquellos “afuera” de ST como Hue Lights por ejemplo…en cuanto migre a los Edge Drivers usaré los tuyos…GRACIAS !

@Mariano_Colmenarejo
Will you please explain further how to use the random on-off with z-wave switches? I’m sorry I’m not understanding how to set that up.

This function is not in the Z-Wave drivers.

The edge drivers zigbee light Multifunction Mc , zigbee switch Mc and zigbee switch Power Mc have this feature built into each device individually.

If you have any zigbee bulb or switch with my Mc drivers you can program the function on zigbee devices.
For Z-wave lights you can create a mimic routine with one of the zigbee devices.

For example:
IF:

  • precondición: Location Mode: Away
  • zigbee device changes state (on or off)

THEN:

  • Z-wave device changes state (on or off)

you can put more than one Zwave bulb with each zigbee device.

I am going to implement the function in my virtual switch driver and with it, as @CarlosJ says, routines can be made for a random on of un other light bulbs.

In this way when you activate the Rutine for Random function in the zigbee or virtual device it will also be activated in the Zwave device that imitates the zigbee or virtual

When the routine to deactivate the random function is executed you have to also turn off the Zwave bulb


2 Likes

@CarlosJ, @Terri_Baker

Virtual driver modified for on-off random function

1 Like

@Mariano_Colmenarejo Can i use this random function in a rutine how turns of a group of lights at a set time every day. For example at 22:00 so that the lights turns of at a random time between for example 22:00-22:15 ? May you also explain how i can use the random function from your drivers

Hi @Halvproffset,

It can be done

For each bulb you have to set the minimum and maximum time between which each random on or off is calculated.

You can make a routine that at a certain time and others conditions, activates the Random On-Off function in several bulbs.

Each bulb calculates the random time of the next power on and will display the time at which the next state change will occur.

When turned on it calculates the random time to turn off and so on until the Random On-Off function is deactivated manually or with a routine.

When Random On-Off is desctivated then the bulb is also turns off.

6 Likes

I am confused by this. Does anyone have screenshots in English setting this up? I have a light I’d like to turn on at sunset but then turn it off randomly around 4 hours later. I’ve tried setting this up but it’s not working quite right. I probably haven’t created the correct switches or all the routines. Thanks.

@rcbjr2 The first step is to go into the light setting and define your Random on-off min and max durations in minutes.
You said you want it to turn off around 4 hours after sunset so you could set minimum to 240 (3.5 hours) and maximum to 340 (4.5 hours) or whatever you want and it will pick a random time between the defined min and max to turn off.

Next create a routine to start the Random action.
If at sunset everyday
Then turn light on and set random to active (this starts the count to the off action).

Last create another routine to turn off the Random action.
If light random is active and light is off
Then set light random to inactive (make sure to uncheck the top section because you’re not trying to turn the light on or off)

If you just want it to turn after it’s been on for 4 hours you can skip all this and just create 1 routine to turn the light on at sunset and use the auto off after 4 hours.

2 Likes

Thanks for all the details and screenshots. Very helpful. However, my lights are not Zigbee, so I’m not using the driver for Zigbee. Mine are Z-Wave. I thought that there’s a way to create a virtual switch that can be linked to a Z-Wave switch or light and have it work? It’s the linking to the Z-Wave switch that is throwing me off. Thanks.

Yes you can use special virtual switch with timer function.

I have used this Timer of Seconds to implement random turning off light(s).

Example settings:

Timer Type Random Value

Random Maximum Timer Value 1800 sec

The light turns Off between 21.00 -21.30.

First routine starts Timer of Seconds (Random Maximum Timer Value 1800 sec)

When Timer of Seconds turns Off (after random time) then second routine turns Off the Light.

The precondition is optional. I use it as a reminder of when this routine is in use.

2 Likes

Ok, thanks. I might have it now. :smiley: