Recreating a WebCore Piston with RM. Light stays ON with Motion, until Door contact "Opens"


HI everyone,
I've been with ST for around 5yrs, and I'm now about 3/4 done migrating to HE.
I have a few ST WebCore Pistons that I want to move to HE, so I can finish moving everything on over.
I have tried setting up WebCore in HE but I keep having issues. After adding the 185 devices in WC and try to create a piston, none of my device are listed to pick from.
So I'm trying to create them in RM.

I was never that great working with WC, now I total lost with RM... lol

What I'm trying to recreate is a WC Piston that always worked great for me.

(I'm using a GE Motion/light switch, and a Door Contact Sensor)

*Once Motion is Active - Turn Bathroom Light "ON"
*Once Motion is Inactive - Turn Bathroom Light "OFF"
*But "IF" Motion is Inactive -and- Door Contact Sensor is "Closed", then Leave Light "ON"
*When Door Contact Sensor "Changes" to "Open" - Wait 1 minute and Turn Light "OFF".

I have been looking to see if someone has a similar RM setup like what I'm needing, but haven't seen one posted yet.
If someone has the same thing or similar in RM, I would be grateful if you would share it with me. Or if someone could help me recreate what I'm needing in RM, I would be very grateful.

Thank you,

(*)Here is the WC Piston that I am trying to recreate in RM.......


First, you are going to have to create this in several rules. I don't think one is going to cut it.

The first would be a trigger.
Trigger event: Motion Active
Action: Lights on

The second would be a triggered rule:
Trigger: Motion Inactive OR contact open
Condition/Rule: Contact Open
Action: Lights Off

Now this means that the lights will turn off immediately after motion is inactive. I don't know what timeout you have for the motion sensor but I would be cautious of that.


I've started doing these sorts of rules using a stand-alone action that does the actual device control and then trigger/conditional rules to run them. See Outside Automatic lights on doors/locks/presence for an example.

One idea would be:

  1. Action that:
    • Turns on light
    • Stop This Rule (cancels any previously scheduled turn-off)
    • Turns off light after delay of 1 minute
  2. Trigger Rule when motion goes active
    • Run Action 1
    • Pause Action 1
  3. Conditional rule when motion is inactive AND door contact is Open
    • Unpause Action 1
    • Run Action 1

I've had a lot of luck creating virtual sensors/lights and building the rule with those to make testing easier.


@nkyspike, these simple rules work well with me :slight_smile: :

  1. Trigger Lights On ( Motion ) :

  2. Rule Lights Off - Door Open ( wait 1 minutes ) :


@nkyspike beat me to it. But I have a slightly different take on it. I just tried this as a test:

  1. A trigger to turn the light on:

  2. A rule to turn the light off:

For my "off" I defined a rule so that if the light is on and the door is closed, the light will stay on. But if the door opens, the light will turn off after 1 minute. This means that there will also be a delay of 1 minute if there's no motion and the door is open, which might not be what you want. Works, though.


I think you can do this with a simple trigger:

 Trigger Event:  Motion active
     Turn on light
     Wait until contact opens
     Turn off light


This works for me. My motion sensor has a 30 second timer on it so that's why the delay is only set to 30 (total of 1 minute).


Thanks "Everyone" for your helpful responses to my question!
I feel a little more comfortable now, moving forward with all of your suggestions.
Once I get it working ( :crossed_fingers: ) I'll post an update.

Thanks again!


@ Ryan780 Opps sorry, I forgot to mention I have the default timer set for 5 Minutes within the GE motion/light switch setting.


Thank you all again, for all your help and ideas.
I went ahead and setup two different rooms using TranDzung RM layout, and everything is working out great so far! :grin:

Here is how it looks for me........



Couldn't this be done in one rule?

Conditions: motion active
Rule: motion active
Actions for true: ON light
Actions for false:
Simple conditional action If contact is open
Off light with delay of 1 Mon cancel on truth change.


Hi @homeauto2112
Just looking at your rule and I see in the select conditions you have an 'AND'.
How did you put that in there?
I've had a rummage around and cannot see how to do it. :slight_smile:


That's because it isn't a AND it's a "and" in the name of the device


@bobbles It's in the drop-down tab, in Define the Rule.


Ah ha. I kept looking at it thinking 'how did he do that'.
Strange device name though, Motion sensor and light switch.


Thanks for the reply but I appreciate it can be done in rule definition but I was talking about conditions not rule definition.


I'm using the GE Light Switch, Vacancy/Occupancy Sensor.
It's a light switch with a built in motion sensor, works really well.


Ah ha. The coin it has fallen. :wink:


@nkyspike I've been looking at that switch. Is the motion sensor visible to HE? Can I use rules to control the light? Or is it all self contained?


@jabecker I'm still a newbie with HE, so I'll post some screen shots in hoping to answer some of your questions. But it does look to have full adjustments for both Motion & Lighting to work with.
Sorry I couldn't be more helpful.