random timer for lights?

i hate posting this but i’m getting absolutely nowhere with reading the documentation, i still don’t get how to do what i want to do here (or if it’s even possible).

i have all PLEG, timer switch, and core installed along with day or night. i want something that randomly turns on the lights after sunset, leaves them on for a random amount of time (preferrably that i can customize, something like a random time between 2-3 hours or similar), and then turns them off. is this possible? i’ve spent the past two hours or so sifting through the docs/forums and gotten absolutely nowhere…it’s entirely possible i’m stupid and missing something obvious, but i’m frustrated so i’m asking here to save my sanity.

i think maybe i’m getting this…but i’m not picking it up as quickly as i’d like.

i set up the following PLEG…

schedule (lightsOn) - all days of week, start time at sunset, random on delay 02:00:00, stop time after sunset 5 hrs, random off delay 02:00:00

condition (turnOnLight) - lightsOn
condition (turnOffLight) - NOT lightsOn

actions to turn on lights and turn off lights for the given conditions

is that right? the way i would think that should work is to turn the lights on at a random time between zero and 2 hours after sunset, and turn them off at a random time between 5 and 7 hours after sunset…do i have that right?

edit: this seems to work. i tested it with a smaller delay and it works as i expected…so my next question is, what is PLTS for? if i can do this all with PLEG itself, why do i need PLTS?

Guys,

just install the “vacation” plugin from the MIOS appstore.

PLEG schedule with random on / off delays is the right idea.

I use PLEG more than PLTS, but there are a few cases where I have found it useful as in creating a state model with Logic to extend a state. I’m sure there are other uses. Best is to be familiar with both so you can use them for each situation. I link a PLEG to a PLTS too for more flexibility.

PLTS is fun to play with… And gives a good visual representation on the dashboard of what it is doing, but so far I found that most of what it does can be replicated just in PLEG.

PD

[quote=“Pseudomizer, post:3, topic:179095”]Guys,

just install the “vacation” plugin from the MIOS appstore.[/quote]

i had even less luck getting that thing to work…it never generated any ghosts.

[quote=“crackers8199, post:2, topic:179095”]i think maybe i’m getting this…but i’m not picking it up as quickly as i’d like.

i set up the following PLEG…

schedule (lightsOn) - all days of week, start time at sunset, random on delay 02:00:00, stop time after sunset 5 hrs, random off delay 02:00:00

condition (turnOnLight) - lightsOn
condition (turnOffLight) - NOT lightsOn

actions to turn on lights and turn off lights for the given conditions

is that right? the way i would think that should work is to turn the lights on at a random time between zero and 2 hours after sunset, and turn them off at a random time between 5 and 7 hours after sunset…do i have that right?

edit: this seems to work. i tested it with a smaller delay and it works as i expected…so my next question is, what is PLTS for? if i can do this all with PLEG itself, why do i need PLTS?[/quote]

Could you post how you set actions? I tried to set up like you, but nothing happens. (Yes my PLEG is armed)

sure…i have two timers, one for each set of lights i want to turn on (i wanted them to come on independently). let’s call them randomLight1 and randomLight2. i set them to come on at sunset (w/ random on delay of an hour), and off 4 hours after sunset (random off delay 2 hours). this to me indicates (if i’m interpreting it right) that they will come on between sunset and one hour after sunset, and turn off between 4 hours after sunset and 6 hours after sunset.

from there, i have four conditions…two for each timer. one to turn the lights on, one to turn them off. i labeled these as something that would indicate an action, to make it easier for me to remember…something like light1On, light1Off, light2On, light2Off. my conditions are set up very easily…light1On = randomLight1, light1Off = NOT randomLight1. same premise for the second set.

each condition has an action, to turn the specific lights on or off (depending on the condition)…and i’m guessing each one can do more than one thing (like for example if i wanted to have one condition control both sets of lights, i could do that). if i’m wrong on that, i’m sure someone will correct me.

i’m hopeful one of the powers that be will see this and tell me i’ve done it correctly…it seems to work well so far. it worked exactly as i expected it to tonight.

i’m starting to pick this up i think. it took a bit, but it’s coming to me…

Your on your way to becoming a PLEG master!

To progress in the order of PLEG … you need to learn to wield the sequence expression.

[quote=“crackers8199, post:7, topic:179095”]sure…i have two timers, one for each set of lights i want to turn on (i wanted them to come on independently). let’s call them randomLight1 and randomLight2. i set them to come on at sunset (w/ random on delay of an hour), and off 4 hours after sunset (random off delay 2 hours). this to me indicates (if i’m interpreting it right) that they will come on between sunset and one hour after sunset, and turn off between 4 hours after sunset and 6 hours after sunset.

from there, i have four conditions…two for each timer. one to turn the lights on, one to turn them off. i labeled these as something that would indicate an action, to make it easier for me to remember…something like light1On, light1Off, light2On, light2Off. my conditions are set up very easily…light1On = randomLight1, light1Off = NOT randomLight1. same premise for the second set.

each condition has an action, to turn the specific lights on or off (depending on the condition)…and i’m guessing each one can do more than one thing (like for example if i wanted to have one condition control both sets of lights, i could do that). if i’m wrong on that, i’m sure someone will correct me.[/quote]
Now I understand what you are doing. You want lights to turn on randomly, then remain on for several hours before turning off randomly.

I am trying to have several lights turn on AND off randomly several times during a time period. This would simulate a “lived in” look to my house actually being vacant. I want to make lights function like the vacation ghost plugin SHOULD work, but unfortunately does not work.

So in the end I wanted to create a PLEG that accomplishes what vacation ghost attempts to do. I have not been able to get PLEG to do this correctly either. I posted way back in OCT how to do this. Since then I tried unsuccessfully to get this working.

I use another PLEG to control my lights auto on/off with motions. So I first had to set up a condition so that when my security is armed away, then bypass the lighting PLEG and arm the Vacation PLEG (random lights on/off). Easy enough. The trouble arises with my inability to set up a light to randomly turn on/off if it is night while security is armed away.

[quote=“bucko”][quote=“crackers8199, post:7, topic:179095”]sure…i have two timers, one for each set of lights i want to turn on (i wanted them to come on independently). let’s call them randomLight1 and randomLight2. i set them to come on at sunset (w/ random on delay of an hour), and off 4 hours after sunset (random off delay 2 hours). this to me indicates (if i’m interpreting it right) that they will come on between sunset and one hour after sunset, and turn off between 4 hours after sunset and 6 hours after sunset.

from there, i have four conditions…two for each timer. one to turn the lights on, one to turn them off. i labeled these as something that would indicate an action, to make it easier for me to remember…something like light1On, light1Off, light2On, light2Off. my conditions are set up very easily…light1On = randomLight1, light1Off = NOT randomLight1. same premise for the second set.

each condition has an action, to turn the specific lights on or off (depending on the condition)…and i’m guessing each one can do more than one thing (like for example if i wanted to have one condition control both sets of lights, i could do that). if i’m wrong on that, i’m sure someone will correct me.[/quote]
Now I understand what you are doing. You want lights to turn on randomly, then remain on for several hours before turning off randomly.

I am trying to have several lights turn on AND off randomly several times during a time period. This would simulate a “lived in” look to my house actually being vacant. I want to make lights function like the vacation ghost plugin SHOULD work, but unfortunately does not work.

So in the end I wanted to create a PLEG that accomplishes what vacation ghost attempts to do. I have not been able to get PLEG to do this correctly either. I posted way back in OCT how to do this. Since then I tried unsuccessfully to get this working.

I use another PLEG to control my lights auto on/off with motions. So I first had to set up a condition so that when my security is armed away, then bypass the lighting PLEG and arm the Vacation PLEG (random lights on/off). Easy enough. The trouble arises with my inability to set up a light to randomly turn on/off if it is night while security is armed away.[/quote]

I’m guessing you could do this, but you’d have to set up multiple schedules for one PLEG…

Sent from my XT1060 using Tapatalk

i gotta ask, how random are the on/off delays? i’ve only had this running for two days, but my on delay is 3 hours and both nights the lights have come on within 30 mins or so of sunset…