-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Random switch state #54
Comments
What I've done for that is, I added one action for each light. The living room lights have their own timeline wait random time, on, wait random time, off, etc. The dining room lights have their own timeline, with their own random times. So not all lights turn on at the same time and not all lights turn off at the same time. Would this fix your problem? |
Hi Adrian, Thanks for your reply! I have it setup almost as you describe (separate randomly delayed actions for each light). This prevents all changes occurring at the same time. The method you describe requires a long chain of individual random on and off actions. This could easily complete early if random delays are all short and would be further compounded in the long winter nights. Using one random toggle action for each light, every 30 minutes, can run as long as needed without running out of pre-coded on/off's The setup I have is:
I have a separate Piston that randomly turns everything off between 11:30 and 11:45 to simulate bedtime. The problem with the above is that:
This shows an obvious pattern and also having all lights off at any point is unrealistic, as I need it to look like the house is occupied. Having a 'change state to random On or Off' option will be a massive help. Some lights can then randomly stay on for multiple cycles, others can stay off. Many Thanks and keep up the awesome work!!! Robin |
Suggestion - Add a wait after the trigger: Result - Light randomly comes on 20-60 min after sunset and off between 10:30PM-11:00PM Trigger happens at sunset |
Thanks for the input Xtropy74 but I'm looking for a more random on / off every 30 minutes (trigger every 3mins, random 5-25 min delay, change to random state).... Without the random state part all lights will be on at the hour and off at the half hour, even with separate delayed actions. In the end I created my own random state variable via a separate piston, making use of the existing $randomlevel variable: Trigger every minute... I then adapted each action in my 'away lights' piston to use the new @randomstate variable. Each light has a separate random delayed action and follow the following logic: Trigger every 30 mins Action: Would be great if CoRE could have a built in random state variable though... I could then just the 'load state from variable' option and save a lot of confusion. |
@Xtropy74 |
Looking into a more complex light cycle action with rotating colors et al. |
Would you consider adding an option to randomly switch state?
I'm trying to setup a piston that simulates someone being home. It will trigger every 30 minutes whilst we're out (done) but the only options for switch states are on / off / toggle. I have included a 1-29 minute random wait before each device toggles but this still results in all lights being on at some point and all off at another (even if only for minimum 1 minute but up to 29 minutes) as the piston first activates at sunset with all devices in the off state.
The fact that switches are toggling (be it at random times) also leaves a noticeable pattern of On>Off>On>Off etc etc.
I would like to get something like this random example:
On>On>Off>On>Off>Off>Off>On>Off etc etc.
Thanks in advance!!
Robin
The text was updated successfully, but these errors were encountered: