Just converted one location why is this is this automation firing multiple times

OK this.is a bug in the automation implementation. When you say check the the mode ie home and use the option to check first it should imply this as an.and. you would never check this first and omplu that the rule would be an or . So when you have multiple other rules and have it selected to allow any on the ( ie any motion sensor is active) it still applies the or to the mode selection and that is why the rule is firing multiple times.

Your screen shot shows “At least one condition must be met.” That’s an Or.

There is an option when you create an automation for “all conditions” (And) or “any condition” (Or).

If your automation was created by the migration then, yes, it’s a bug: the default should be And.

If you created it yourself or changed it in editing, Just choose the other option.

yes but reread the description it makes no sense. .when you put a rule in with the mode ie home it should always be an and implied… there is no reason to check the mode and especially if you check to enforce it first… and then use it in an or with other rules.

other wise for my example ith motion on any of the sensors and a certain mode you have have to write x rules where x= the numver of sensors… I am pretty sure when they added the option to enforce check first for the mode they meant to use it as an AND

As the old saying goes, “your use case is not my use case.“ LOL! :wink:

Some people have special modes like “guest mode” or “party mode” or “Dogwalker mode” Which they might well want to include in an or statement.

It should always be up to the user how they want to set up the rule.

ok but then why have the option there to make it check the mode first. it is a noop when your rules is “or” . i guess just for performance? also you pick multiple modes at onece in hte location mode and it automatically puts them all in an “ior” in the first rule premise

To be honest, I still don’t really understand how the precondition works. I’m still trying to figure it out. :thinking:

Also, do you know a way to check which of these run locally as they dont show up in the ide under smartapps… i am trying to keep more local and have moved more over to light manager as i can confirm which run locally.

As a side note the new app is crap in my opion no way to control what comes out on the single tile and all our hard work for layout of tiles in device types is thrown out on the click on opening of the tile… They at least could have preserved those… Getting a hubitat to see if i want to move over, as stability is also important to me with multiple residences and one always being empty

At least i got the performace of the new app bettry. Really stupid of them to have the default view be all the rooms where it has to refresh every device on open. i removed that.

None of the automations using the automation creator currently run locally.

1 Like

To be fair it actually says ‘At least 1 condition below must be met’. The pre-conditions are above.

Using Automations to effectively replace Routines had long been hampered by the lack of a way of saying ‘only run this automation if the location is in one of these modes’ without the mode change also triggering the automation. There was a clamour to fix this deficiency. So when a location mode ‘precondition’ suddenly arrived unheralded it was natural to hope that ST had delivered on what their users were crying out for.

I created a simple automation saying:

if
  location mode is night (precondition)
  --------
  if any 1 of the below conditions is met
    button A is pressed 4 times
    button B is pressed 4 times
then
   turn light C on

As ‘Location mode will be checked before all other conditions’, it is perfectly reasonable to see the precondition being ANDed with the ‘any’ group. So as the location mode is NOT night I wouldn’t expect pressing a button four times to turn the light on. Yet it does.

In my example, the only way the precondition isn’t a no-op is if the automation gets triggered by e.g. 3 clicks on a button when the location mode is night and the light gets turned on. I haven’t tested it, but I’d find it horribly counter-intuitive.

The presentation of the preconditions is the same whether using ‘all’ or ‘any’. Also when you only have one condition there isn’t even a visual indication of a precondition and it acts as an AND.

I’m rather hoping it IS a bug.

2 Likes

Thanks— I’m still very confused. As you say, hopefully it’s just a bug. :sunglasses:

maybe you should report it as your example succintly described the issue. I did file a report but your description is much better.

I find it amazing that I am the first to find this “Bug”. I just got my first site conversion option a few days ago, but this stuff has been out a long while. Makes me unfortunately think the don’t think it is a bug.

But as I said “Precondition” implies an AND.

and it is pretty common to have a rule like i had…
ie if the mode is night and there is motion on any sensor in the morning change to home. etc. etc. It should replace the “things start happening” option that was in the old system

1 Like

The precondition option is very new, just a couple of weeks. I don’t know how many people are using it.

ah ok that explains it… will see if support can even understand the issue or just tell me to remove and reinstall the app… lol

The same issue here

I have opened a support ticket, will report the outcome.
Thx
Zoran

1 Like

If more one people could please report this. I cannot get past first level support who wont admit it is a bug… ie

In replies all text above this line is added to the ticket

Avinash Pen (SmartThings)

Aug 9, 2020, 12:57 AM MST

Hello Larry,

Thank you writing back to us.

We are sorry for any inconvenience caused and would like to inform you that we need below information clearly with screenshots, so that we can escalate it further to look into it deeply.

So I request you to provide us the automation description screenshots exactly how you are trying to set up it along with the screenshots showing the “if” and “then” condition.

Also let us know the SmartThings app version you are using currently.

I appreciate your time and patience and looking forward to hear from you.

Thanks!

Regards,
Avinash
SmartThings Support Team
www.smartthings.com

Avinash Pen (SmartThings)

Aug 8, 2020, 1:16 AM MST

Dear Customer,

Thank you for writing back to us.

We do apologize for the delayed response and sorry for any inconvenience caused and request you to please provide us the automation description screenshots exactly how you are trying to set up it along with the screenshots showing the “if” and “then” condition.

Also let us know the SmartThings app version you are using currently. So that we can investigate it further.

I appreciate your time and patience and looking forward to hear from you.

Thanks!

Regards,
Avinash
SmartThings Support Team
www.smartthings.com

Avinash Pen (SmartThings)

Aug 5, 2020, 1:42 AM MST

Dear Customer,

Thanks for contacting SmartThings Support Team.

We do apologize for any inconvenience you may have had due to this issue and would like to inform you that based on security mode to trigger the Automation only when SmartThings Home Monitor’s security state is set to Armed (Away), Armed (Stay), or Disarmed. If multiple Device status, Location mode, or Security mode conditions are selected:

  1. Touch All conditions for all conditions to be met before triggering the automation
  2. Touch Any condition to require that only some conditions are met before triggering the automation

Their might a reason of condition “If” doesn’t met properly then the error occurs and it will trigger multiple times.

For Example Automation

These instructions will walk you through an example of how to turn on a hallway light when there is motion detected.

In the New SmartThings app :

  1. From the Home screen, touch the Plus (+) icon and select Add automation
  2. Touch Custom automation
  3. Touch the Plus (+) icon below If
  4. Touch Based on a device status
  5. Select your hallway motion sensor device
  6. Touch Motion sensor for the device capability
  7. Touch Motion detected for the device state
  8. Touch Next
  9. Touch the Plus (+) icon below Then
  10. Touch Control a device
  11. Select your hallway lighting device
  12. Tap On for the device action
  13. Optional : Tap Select how long to perform this action to automatically turn the light off after a set period of time
  14. Tap Done
  15. Optional : Enter a name for your Automation
  16. Touch Save

For more information we request you to please go through this link [https://support.smartthings.com/hc/en-us/articles/115002056383-Custom-Automations-in-the-SmartThings-app]

If still the issue persists then please get back to us with the screenshots of the app where you are facing difficulties along with the automation name and SmartThing app version. So that we can investigate it further.

I look forward to hearing from you.

Thanks!

Regards,
Avinash
SmartThings Support Team
www.smartthings.com

Love SmartThings? Please leave us a review on the Google Play Store or the iOS App Store
Not happy? Reply to this email so we can help.

[R5GMDG-V8RX]

Will create a ticket as well. Just had the pleasure of having to factory reset my Hub because I was pretty much forced to migrate to the new app and that migration failed :smile: Anyway, gave me a nice chance to set everything again and was pleased to see the precondition option. Didn’t know it was brand new.

Anyway, doing pretty much the same as the rest here. In pseudocode below, where the first IF is my precondition.

IF 
(
	Location == 'Away'
)
AND
(
	MotionSensor1.HasMovement
		OR
	MotionSensor2.HasMovement
		OR
	MotionSensor3.HasMovement
)
THEN
(
	Location = 'Home'
)

Keeps triggering. Tried to reboot my hub, recreate the automation, doing the same without changing the location and a few other things. Nothing helped, so I figured I must be doing something wrong or it was a bug, which led me to here. Guess I have my answer.

So I got an answer pretty quickly. Seems like they hardly read my email, asking me to reboot my phone and reinstall the app… Just installed it and did a factory reset (and rebooted both phone and hub and redid the automation and and and…).

Also suggested I use a time period as precondition instead of the current mode or my current location. Last thing in the reply was that they couldn’t help me any further, because I’m from the Netherlands and should contact Europe support through the app, instead of emailing the support desk directly.

All in all a pretty frustrating experience so far. I’ll try contacting through the app, if they reply in a similar fashion I’m dropping SmartThings alltogether and adopt https://www.home-assistant.io/

Ive started setting up my hubistat hub… have half the devices in one location moved so far so good. issues here too but what i like is that once set up even if they go out of business it all runs on the hub so none of this about shift like smartthings