Hello everyone!
I just installed CoRE and I intend to switch to it from Rule Machine.
To do so, I would like some help, since when I tried to set the pistons myself, they did not work as intended.
Here is what I want to do:
-
I want all my lights to turn on to the level of 1% on sunset and stay that way until 08:30pm.
-
When someone arrives (mobile presence sensor), a piston should capture the state of all the lamps and then dim them to the level of 100% for the period of 10 minutes. After that, the piston should restore them to their previous state.
This should happen from sunset to sunrise, meaning that after 08:30pm, the lights will go from off to on (100%), and then back to off.
Here’s something that I need to avoid (In the Rule Machine, I used a virtual override switch to keep it fro happening), let me explain:
2 people get home at the same time: first people makes the rule run, thus making the lights dim from 1% to 100%, this happens by checking the previous state then running full power 100% for 10 minutes and returning it to 1% at the end.
Since a second person arrived at the same time (same car), the second person makes the rule run again, but this time, it makes the light dim from 100% to 100%, because, when it captures the previous light states, those are already at 100%.
Any help is much appreciated.
This is what I had in Rule Machine, the user bamarayne, helped me a great deal:
Rule one: lights on at sunset
Condition - time between sunset and 10pm
Rule - time between sunset and 10pm
Actions for true: dim corridor lights: 10%
Rule two: capture/restore lights
Condition - private Boolean: this rule: false
Rule - private Boolean: this rule: false
Action for true - Capture: corridor lights, Set private Boolean: rule three: false
Actions for false - restore captured bulbs, set private Boolean: rule three: true, turn off the virtual override switch
Rule three: arrival lights
Conditions - private Boolean: this rule: false
Rule - private Boolean: this rule: false
Actions for true - dim corridor lights: 99%, set private Boolean: rule two: true - delay 10 minutes
Actions for false - leave blank
Rule four: trigger - someone arrives
Trigger actions - presence sensor arrives (any)
Actions - set private Boolean: rule two: false
Action - Turn on Virtual Override Switch
Restrictions - only between two times: sunset and sunrise
Switch to disable rule: Virtual Override Switch