[OBSOLETE] [BETA MILESTONE 1] CoRE (Community's own Rules Engine)

Edit: I’ve updated this as a Latching Piston to make sure motion active keeps things in the right state if the motion sensor doesn’t got out of active state due to constant motion, which a simple piston will do.

Just wanted to post a more complex but still pretty simple example that can help others get a quick understanding of the complexity you can easily achieve without going full tilt with variables and groups.

Previously this worked in a backward manner with RM, it’s easier to read here but works the same with the added “flash” notification that a light is about to turn off, without using flash…

Scenario: Walk into bathroom, light turns on. Leave in under 3 minutes, light will flash after 2 minutes of inactivity, stay on for one more minute, then turn off. So if you’re in the tub falling asleep, the flash will let you wave your arm to keep the light on. If you are in the bathroom for 2 minutes (minimum of activity) the fan will come on, assuming you are in the shower. After no motion from that scenario, the light will still wait it’s two minutes, flash, one minute, turn off, the fan will wait 10 minutes to finish venting the room, then shut off.

Piston Mode: Latching

If…

–Bathroom Motion Sensor -> motion is active

Then…

–Using Bathroom Light

  • Turn on

–With Bathroom Fan

  • Wait 2 minutes
  • Turn on

But If…

–Bathroom motion Sensor -> motion is inactive

Then…

–Using Bathroom Light (Cancel on piston state change)

  • Wait 2 minutes
  • Turn off
  • Turn on after 1000ms
  • Wait 1 minutes
  • Turn off

–With Bathroom Fan (Cancel on piston state change)

  • Wait 10 minutes
  • Turn off
8 Likes