Motion Control - Getting light to stay on

What exactly do you mean by manual control? Just on/off and dim? If that is all, you should be able to still use the mode and motion lighting by using the "Name to use with Alexa" or something like that at the bottom. That creates a virtual device for your rule that stays in sync with the rule so if you tell Alexa for instance to turn on the lights, she will go in accordance to the rule. Then for the button controller just reference that virtual device and enable the option where manual changes override motion settings.

1 Like

I think I will go back to RM.
Could you post some of what you have done, and also explain a bit about the "4-5 rules for each room"?

I will post back what my new RM creation is.

Okay. This is driving me a bit crazy.

Here is the rule moved to RM

I can see issues already.

  1. If the door stays unlocked, will that affect the light turning off?
  2. Same is contact is left opened - will light stay on?
    Or are both of these one and done?

Answers:

  1. The light will turn on when the door is unlocked and turn of in 20 minutes, regardless of whether it is locked again or not.

  2. The light will turn off 20 minutes after the door was opened regardless of whether it is closed again or not.

  3. The light will turn off 20 minutes after it received the first motion event. It will also most likely turn off 20 minutes after every other motion events it received. (Same if you open / unlock the door). I would recommend you add a “Cancel Delayed Actions” at the top (first action of the rule) to avoid this.

See the following link for more information on “Cancel Delayed Actions”:

Thanks @cjkeenan, I would never have looked at the Alexa option, I'll give it a go and see if it does what I need.

One example use case is I want to be able to walk into a room, have the motion lighting setup through the app turn the lights on, but then press a Hue dimmer button or have a switch turn on cause the lighting rule to essentially stop, leaving the lights on until I turn the lights off with the Hue dimmer or some other situation. This all worked perfectly for me up to the last point. I could pause the rule so the lights would remain switched on when I pressed the Hue dimmer button, but when I turned the lights off with the Hue dimmer, when I later re-entered the room, the motion lighting rule would log that it would not turn the lights on because they were already on.

This is from memory, not in front of my home PC at the moment.... I'm almost certain there is one or more rules on top of what I have listed, I'll post back later today...

Motion Lighting - Turn Lights On
Triggered by Motion Sensor / Zone Motion Sensor becoming active
If Motion Override VS is Off THEN
Cancels Turn Lights Off Rule below
Activate Scenes Per Mode for the

Motion Lighting - Keep Lights On
Triggered by Motion / Zone Sensor being Active
Cancel Turn Lights Off Rule
-- Not sure how effective this rule is.....

Motion Lighting - Turn Lights Off
Triggered by motion becoming inactive for relevant sensor / zone sensor
Action - Turn lights off, delayed by X minutes, cancellable (required for earlier rules)

Motion Lighting - Motion Override
Triggered by Motion Override VS switching off
Cancel Turn off Lights rule

In terms of the Motion Override, this can be turned on by any number of rules or other apps, based on pressing physical buttons, other rules based logic, etc.

Hope this helps.

Updated my last post with updated details of my rules, hopefully this helps...

Will also continue the conversation with @cjkeenan on the alternate conversation re the Alexa option in Motion Lighting.

Thanks to everyone for all of the input.

Still frustrated. I can trigger the light to come on, and it turns off correctly after the 20min delay.
However, I cannot get the motion sensor to keep it on if there is still activity in the garage.

Here is the setup:

What do I need to do to have the motion sensor keep the light on if I am still working in the garage?

The first line of your Actions to Run needs to be:

Cancelled delayed actions

That should fix the issue you are encountering.

I would also recommend that you change your IF condition to Garage Motion inactive. Otherwise, if you move a lot and your motion sensor doesn’t become temporarily inactive, your lights will turn off after 20 minutes.

Okay. I think I've got it:

Question: I don't understand the Cancel Delayed Actions; what exactly does that do?

1 Like

Cancel Delayed Actions will cancel any actions that have been delayed. This is important because rules will occur concurrently.

In your case, it will cancel the lights turning off 20 minutes after the first inactive motion event if the rule is triggered by motion coming on again, someone opening the door, etc.

Makes sense?

I believe so.

Thanks again!

1 Like

But wait!
More issues.
Have noticed that the light is not turning off sometimes.
Here is the log:


Can anyone tell me what is going on?

In your logs, the Garage Motion sensor never becomes inactive, so the code to turn off the lights after 20 minutes never executes.

Hmm. That is odd.
Any ideas why I should look at to resolve this?

Sorry. I meant what I should look at.

You should check the events on your motion detector: does it detect motion and end of motion events?

You can see this by clicking on the “Events” tab within the Garage Motion Sensor device.

Check if the dates and times of the events match when there was motion.

Alternatively, you can check if the device reacts properly when you enter and leave the garage.

1 Like

all these issues sound to me like your mesh in garage is week.. do you have wall switches or extenders every 30 feet or so between garage and hub.. recommend at least one extender in the garage.

Yeah, the door contact and motion sensor are both Zigbee.
I will get another IKEA Tradfri repeater and place it in the garage.
I do have one outside the house in the furnace room - it is located below the hub (hub upstairs), and is approx 40ft and two walls to the garage.

you can just get any zigbee plug as well they pretty much all repeat and plug it in the garage and have an extra switch .. also recommend you put one on immediately the other side of the wall of the garage . i did.. garage to house walls are usually thicker and better insulated (ie like outer walls).
and can cause more problems.. i had problems with my zwave in the garage and still occasionally i can see based on the number of hops and signal strength.