How can I do this: dog sets off alarms at night

You could use either a motion sensor upstairs or door sensor on your bedroom door. A regular routine can disarm SHM between X hours when things happen (using the motion sensor). Then have another routine for arming SHM when things quiet down between X hours. Doesn’t look like there is a time range option for the door sensor, so that would have to use Rule Machine, but i don’t think Rule Machine integrates with SHM.

SHM mode changes can be both a trigger and an action in Rule Machine.

oh cool! i must have an old version installed. Off to update…

Yeah I think it was only a version or two ago that it was added!

Knew someone would! Thanks…

So sorry for noob questions, what is rule machine? I’m new to ST and I’m finding it more complicated than I imagined it was.

No worries! That’s what this forum is for. Rule Machine is a SmartApp created by one of the members/developers on here

Ah ha ok sorry…
I actually have that in the smart apps>my apps section. But someone said there is a newer version, how do I check my version please.

If there is a newer one, do I just copy and paste the code again on my computer.

@jdawson can I ask your rules/triggers etc specifically please for this to help me. I’m happy to order a new motion trigger to assist.


@R2D2 Yes, just overwrite the old codes with new one to update. Publish the Rule Machine code and save the Rule code.

No problem. I have two rules:

As you can see, I also have a door that will trigger “Up In The Night!”.

The trick here is the mode criteria, otherwise you’d put your house in night mode anytime the motion sensors didn’t see motion.

Back again @jdawson I’ve just got my new motion sensors to help me with false triggers when the dog gets up!

I’m having trouble though, I’m following you’re example and screenshots, however in the define conditions I’ve got my back door sensor closed and ground floor motion “none”.

In define a rule though it doesn’t show my motion sensor on the upstairs for selection. (This is in and working fine)

Am I doing something wrong?

Also are modes just a label and something to use in rules, rather than having anything defined in them? e.g. Night is just a label?


I’m not sure I’m following you here, perhaps you could put up a screenshot?

So I have 4 modes: Disarmed, Away, Night, Night Disarmed. I have Up in the Night! run only when mode is Night and Back to Bed! run only during Night Disarmed. This is key so that Back to Bed! doesn’t run during the day when I’m home but have no motion on the sensors. You could probably also achieve this with a virtual switch or Private Boolean in Rule Machine.

I’m getting in a muddle sorry… What are the “define conditions” that you have to set?

Maybe better if I tell you what I want and currently have?

I have motion sensor and a multi sensor downstairs. I have a motion sensor now upstairs on landing. During night if motion on upstairs somehow disable smart home monitoring and then reactivate.


Reread your previous post and I think I understand now what you mean. Is upstairs motion false set in your conditions? You can only have rules based on conditions, so set the conditions first, then decide the rule logic (AND vs OR).

I’ve deleted and started again, so why do I have to put upstairs motion false in conditions? I’m confused…

Does it not need a trigger either, your screenshots show it doesn’t have one so how does “up in night” run?

Thanks for your help

The [true] and [false] that show up under conditions are only there to serve as a reminder/check to tell you what those conditions are reporting at the moment you are constructing/reviewing the rule.

You don’t need to put anything in the false section of the rule. With the rules James posted, he only wants actions to happen when the rules are true.

I do something very similar for my dog’s nightly moves.

Hi David, can you screenshot your rules please for this so I can try and navigate mine?

Also what I wanted was if the upstairs motion and then within a minute say the downstairs motion, then disarm, ie in this order to detect if I’m coming downstairs during the night to let the dog out.

I only want this you to temp disarm, and want it reactivate, or not disarm if not in this order, ie if a real security alert happened.


Rules and Triggers behave slightly different, you could probably get this to work with Triggers but Rules seem to make more sense in my head.

So for my example:

Rule: Upstairs active OR Bedroom open

So this rule will evaluate anytime there is motion/motion stops upstairs OR the bedroom open/closes, i.e. anytime any of the conditions change state. If the rule is True, then the true actions occur, if the rule is false, then in my case nothing happens. I have the other rule to take care of things when all motion stops.

I also realize now that what I do isn’t quite what you’re hoping for. Disarming my house isn’t a two-step process. I don’t have the house disarm of it sees motion downstairs only after it sees motion upstairs. It just disarms when it sees motion upstairs, and then waits for all motion in the house to stop and then re-arms. I suppose this is a weak point if an intruder happens to break in while the wife is up in the night going to the bathroom. :wink:

I will share, but it might be confusing as this setup was one of my first with ST and RM so it is inelegant to say the least. I had 2 rules and a virtual switch.

Your question prompted me to rethink it a bit. I have posted the Old Way as well as my last 5 minute rethinking of the setup (New Way). I have not yet tested the New Way.

note: I do not have Upper Landing (my motion sensor in this rule) in the Armed(stay) security set up. I also use Upper Landing to transform my house into day mode when I wake up, so I restrict the Calvin rule to pure night time hours. I actively put the house into Night mode when I go to sleep.

Bottom line: old way works, but is likely clunky. New way will be tested, likely tonight.

Old Way - note Calvin nighttime is the virtual switch. (Please excuse the ringer notification - still getting used to the iphone6 button placement.)

New Way:

1 Like

This is the same in my setup too - I recognize this and have accepted the risk.

1 Like

I’ve thought about it and it seems possible to do, but the added complexity (and therefore likelihood to fail) just doesn’t seem worth the small benefit.