Routines triggering incorrectly?


(Paul) #1

Hi,

I’m relatively new to smart things having moved from another system.

I’m trying to replicate the setup I had in the living room where I have a table lamp controlled by a centralite switch, a centralite Motion detector, and an aeon mini more remote control.

I have the light set up to turn on when motion is detected after sunset, and turn off 15 minutes after motion ceases, which seemingly works fine.

I’m trying to create the ability to override the motion sensor using the remot, so I created a mode using the ide called “Motion override”, I have a routine linked to a button on the remote which turns the light off AND sets the mode to “motion override”.

The motion detection routine has the option set for “don’t automatically do this if I’m in one of these modes” with “Motion override” selected.

I can see the hub is in the correct mode, yet the lights still activate on motion. I’ve had a quick look at the live logging on the ide and I can see entries along the lines of “routine not triggered because of xxx…” so it looks like the hub see’s the confit, logs it, but doesn’t act correctly on it.

It looks like a bug to me, anyone any ideas?


#2

I know you’re new so you may have a posting limit, but if you can show screenshots of your routines it would help a lot.

Also, you can do everything you want to with one automation if you use core. It’s sort of like a scripting language for SmartThings. Very powerful and particularly good for “if A then B unless C” kind of stacked conditionals. So you might want to just jump straight into that because you’ll end up with a much more elegant solution. Set up is more complex, but there are a lot of community members who will be glad to help you with it if needed.


(Paul) #3

I can only post one image sadly, I could do with posting 6… hopefully this gives you enough of an idea

Thanks for the pointers, here are the most pertinent routines, hopefully it’s pretty self explanatory; lights should only go on if the mode is set to ‘evening’ the no motion routine is the normal route to turn lights Off on no motion, the override routine changes the mode so the motion detect shouldnt trigger.

I’ll go have a read up on core now, I’d still be interesting in working out what’s wrong without core, if only for my own sanity


#4

I would need to see the detail screens as well, but a common issue is when people set up a smart lighting automation that turns on the light with motion and then also, in the same automation, turns it off after a period of inactivity.

If there is a mode change in between the time when the light comes on and the time when the light is scheduled to go off, it will still go off in the scenario because the off schedule was created while the other mode was active.

This is actually one of the most common reasons why people start using custom code, nowadays typically core, because it can handle this scenario while the official features cannot.


(Paul) #5

So it seems I’ve been granted basic access now so can post multiple images if needed, what do you mean by the detail screen? I can’t see anything much more detailed than what I posted. Here are the other settings for that routine and related


(Paul) #6

Bad form replying to myself…

Also I had a go at installing CoRE… simple it is not. I think I’ve got GitHub integrated, and I’ve synced with core and published it, I can’t seem to see anything in either the ide or the iOS ui to let me start tinkering, any ideas?


#7

Core has its own wiki as well as its Own section on these forums. And it’s own peer Assistance thread. There’s even a video for how to get started. So just start from the FAQ and then follow the links in that thread.

And if you just check the core section of the forum, there are at least four threads there where people are trying to override a previous motion control command. As I mentioned, it’s a very popular use case.

https://community.smartthings.com/c/smartapps/core


#8

Do you have screenshots from two different automations mixed together there? It’s kind of hard to follow. Could you edit that post to put them in sequence for the two separate automations and put a text statement in between the two? Thanks.


(Paul) #9

sorry, the joys of posting from an iPad, edited to show the flow properly (there are three separate routines) and I’ve added some explanatory text


#10

OK, it’s as I thought… if the mode changes after the when things quiet down turn off action has been scheduled, The mode won’t make any difference. You can’t really have an “override” mode for something that is already scheduled to happen, it’s just not the way the platform works. It doesn’t check at the moment that it’s about to turn off the lights. It checks at the moment that it creates the scheduled action of turning off the lights.

I think you just need to go to core or webcore for this, that’s pretty much what everybody does.


(Paul) #11

Ok, thanks very much for the help, still struggling to get core set up, I’ll give it another’s go


#12

There are lots of people who will be glad to help you with core, just ask in that section of the forum. :sunglasses:

https://community.smartthings.com/c/smartapps/core