Issue with automation: simple motion off rule doesn't always work

Hi,

I just started with SharpTools, but already have a problem with the below simple automation:

Weird thing is, sometimes it works, sometimes it doesn’t. Today it doesn’t and the log is…empty. Obviously, I made sure there would be no motion for prolonged periods of time.

Another weird thing is, when I change the trigger to ‘motion status change to inactive’, it always works! But obviously, I don’t want this type of a trigger for light motion off, I want the X minutes period of inactivity.

Device: Philips Hue motion sensor hooked up to Hue bridge, integrated into SmartThings app.

Lastly, my other automation for lights on (quite a complicated one, with different levels and temperature at different times of day) works flawlessly with the very same motion sensor.

Can someone point me in the right direction, please?

Thanks a lot,
Matt

Hi Matt-
Welcome to the community and thanks for posting! When you’re viewing the Rule Logs, you can tap the Filters button and check the ‘Debug’ option to see all the potential triggers. This is often helpful for state-stays type of rules.

Nice to meet you, Josh!

Thank you for the tip - it actually helped me understand that something is clearly wrong here…

When I filtered for ‘debug’, it showed me a number of lines within which I found a comment, which revealed that the rule was not executed due to…the motion sensor changing state!

That obviously meant there was motion within the period of time I set up in the rule. Driven by a bright idea, I turned the motion around so that it would face the wall, waited the required time and…the automation worked!

Now, before you think me crazy, there was no motion in the room before.

To prove this, I turned the motion sensor around back to its original position, then disabled the SharpTools automation and created the same one, but in the SmartThings app instead.

It worked flawlessly. Without repositioning the motion sensor, I disabled the automation in SmartThings and enabled the one in SharpTools - same result as before, state has changed.

Now it doesn’t work even if I turn it around to face the wall.

What could be the cause of such magic? Why does it work in SmartThings without issue, but not in SharpTools?

I know I could simply use the automation in SmartThings, but I fear that more serious issues appear in the future, the kind of which I won’t be able to circumvent by using SmartThings, because in the end - the sole idea of using SharpTools is its ability to perform advanced automations, the likes of which SmartThings cannot. This is why I’d like to get to the root of the problem.

Anybody has had similar experience or might know what’s causing the issue?

Thanks again,
Matt

1 Like

You should be able to tap the ‘view’ link next to a log entry to view more details – this usually includes information about original event and the second log entry will also include the updated state getting compared.

If you want to PM me the rule ID and the approximate time of execution (and timezone), I would be happy to take a closer look.

1 Like