Need help converting RM rule to a flow - Node red

Sooo ... here's one that I have no idea where to begin.
use case
let the dogs out
door open - light on
door close - light stays on
door open - light still on
door closed - light off
This is set up in RM with a virtual dimmer to count. So moving this rule is do beyond what I can wrap my head around. We love the automation because it turns on a ground level light instead of the one by the patio door and keeps the bugs away from the door.
Any input would be great!

I may be misunderstanding this but in essence you are only worried about the door closing.. it's not really important when the door opens, light turns on (or is already on).

Here is a super simple example... (timing and other stuff can be added as needed)

This just turns the light off every other door close. Is this what you were thinking?

OK! Looking at it, it looks like that's the idea. The door opens, the light turns on ... then one close and open where the light stays on and then the final close the light turns off. I don't know if I have these nodes loaded and I can't check for 8 whole hours.

1 Like

Just need the "node-red-contrib-counter" node.. let me know if it works out!!

Thanks! I'll load it tonight if I don't have it, but I doubt I'll understand how it works until I earn an explanation from someone.
:game_die: :game_die:

The good news is it's fairly straightforward - all it does is keep a count of the messages going through it and puts the current total in a property called "msg.count".

except that I have a bug in my sequence need to test for 2 or 0 not 1.... sigh.. try this one (I subbed the HE device and command nodes for inject and debug msg).

edit1: this will display a debug message every other inject.
edit2: or just test for 2 - the 0 test (first output of the switch node) is really unnecessary and can be eliminated.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.