Automation skip actions after migration

Hi there,

Is anyone running into issues with automations not doing what they are set to do?
This is happening right after migration, as a two-folded issue:

  1. Automation are quite rarely not triggered or at least not notifying this, while a further run would do.

  2. Actions in the automation are not accomplished or skipped, specifically serious troubles are happening with STHM not disengaging, and the system sounding alarms all over the place since 48 hrs. now, despite several rewrites and deep checks. Frequency of the issue is a 2/5.

Wondering if any is in the same ship and found any workaround?
It really is a nightmare here with my family extremely frustrated by alarms going off and my neighborhood giving us a hard time…rightly so, to be honest :face_with_head_bandage:

Matteo.

Just to make sure we’re talking about the same thing…

SHM was the security feature in the classic app.

STHM is the security feature in the new V3 app.

Although these have some similar functionality, they are completely separate pieces of code. You cannot dismiss an SHM alert from the new app or an automation created in the new app. And you cannot dismiss an STHM alert from the classic app.

If by chance you have multiple members of your household and one is using the new app and one is using the classic app then that can create the problem you are seeing.

Here’s the community FAQ. (The topic title is a clickable link)

If instead, you wrote SHM because you’re used to that from the classic app but you meant to say STHM, then that’s a different issue. Can you post a screenshot of the automation which is not working?

Thanks a lot for such a fast response, that’s right, it’s STHM, and no, the Classic app is 100% disinstalled by all at the minute and the issue is visibly happening with STHM.

This is the automation that fails sometimes:

A bit of background - that is a virtual switch:

This is triggered by Home Assistant after evaluating presence and a lot other things. HA does switch these off/on/off every time to trigger something, this has always worked flawlessly and the off flip is very rarely needed if somebody in the house messes with a button from smartthings or so, however this has never happened in the past 8 months really.

If Away
Then
Change security mode disarmed
change this location mode to Home

that does not look right???

If you are away, wouldn’t you want it to arm and set location mode to away :slight_smile:

Let me explain the logic:
If:
-we are now away (this is set as a precondition)
-we then get home (Home Virtual Switch is activated)
Then:
-disarm STHM
-set mode to home.

Hope it makes sense :wink:

I hate preconditions, they don’t show and confuse the heck out of me

Indeed didn’t remember setting that up as a “precondition”, don’t quite get what’s being done different in this case? As it was there active after the migration the only thought was, okay, this might save some processing capacity as it’s not always checking the switch, and indeed you’d not want that to go night->home by that automation, but rather run the “Good morning” automation in that case.

I better let one of the experts assist. you’ll be in better hands :slight_smile:

Your input is appreciated! Quite lost on what’s going so wrong here, must be something really unexpected driving us nuts :slight_smile:
Do we know if maybe dropping an email to support would be more handy for the Team or are the forums being checked?

1 Like

@ErMejoo, try changing your device type in the IDE to “virtual switch”. That is what I am using and it is working for me.

1 Like

Nice one @perduewv , trying it out!

Noticed this on IDE - “Alarm System Status” says unconfigured, not too sure it refers to STHM:
image

Sharing a screen recording of the unexpected behavior:

  1. :white_check_mark: Mode is home, you activate the night mode virtual switch, the “Good Night ([from] cinema, home)” automation runs, the notification is shown, it activates active (stay) mode for STHM and changes mode to Night.

  2. :o: The home virtual switch is activated, the “Good Morning or Welcome Home ([from] night)” automation runs, the notification is shown, it does not disarm STHM as expected.

  3. :white_check_mark: The home virtual switch is activated again, all is done to expectation this time.

The failing automation follows.

The IF part of your automation is working since you are receiving the notification. Have you been able to verify that the Location mode is changing to Home?

If it is changing the location to Home, I would try removing “Change security mode” from the THEN section in this automation and create a 2nd automation as follows:

IF = Location - Home (precondition toggle off)
THEN = Change security mode - Disarmed

This would essentially mean that anytime the Location changes to Home, STHM will disarm. This is how I do mine, because it gets triggered by 3 other automations… when someone arrives home, when we tell Alexa “Good morning” and at 8am when I want the house to go to Home mode (only if someone is home and Location hasn’t already been changed via Alexa “Good morning”).

2 Likes

Very good advice, indeed, trying this out as we speak, sounds like a good simplification also, I like it :wink:

The virtual switch unfortunately didn’t do the trick, but was worth a try, I can see less spinning circles on the app with it!

It looks like the mode is indeed not changed unfortunately, therefore this doesn’t solve still.

History of events: mode is night, home virtual switch is switched on as motion happens, the automation good morning is run (below), however the mode is not changed and stays night :pensive::

Good morning automation:

An idea…could it be that as soon as the automation itself removes the trigger/condition(not pre-), i.e. the virtual switch being on is the trigger, and the automation switches it off (then), this interrupts the automation without bringing it to completion?
I could test this, basically removing altogether the switch off action.

Any other clue or idea is welcome!

A possible sync/timing issue between ST & HA regarding that switch was something I thought of also, but didn’t want to overwhelm you with a bunch of maybes… because, quite frankly, without documentation, we’re all just shooting in the dark and learning through trial & error.

From my experience, the actions in the THEN section don’t always happen in the order in which they are listed, and there is no way to set the order. So, my next step would be to remove the virtual switch from the THEN section and try that (if you haven’t already.) If the location successfully changes with this change, then you could create a separate automation where…

IF: Location = Home (no precondition)
THEN: HomeVirtualSwitch = OFF

Out of curiosity, what condition(s) in HA trigger your switch to turn on? I know you mentioned presence, but you also mentioned “a lot of other things”. Could any of these “other things” be conflicting?

That’s indeed close to what I’m trialling now. In fact I figured that I don’t need nor HA nor ST to switch the virtual switches off given HA is already triggering things by switching first off and then on these switches. It’s super annoying to see the switches on quite randomly now, always more than one, but so far this worked perfectly so, fingers crossed!

Indeed, if this doesn’t fail, there’s a fundamental flaw in how ST processes automations that do manipulate the trigger of the very same automation, interrupting the execution at times unexpectedly.