Automation works ONCE when i edit and save it, not afterwards amymore

I have a automation that checks for power usage, and if a certain amount of watt is reached, it powers on/off a switch.

If i edit the automation, add something as a condition and then remove it and press save, the automation immediately works. If i turn on/off the routine, it does not work. It does not work keeping it enabled. It just works once and only after i edit the automation and save it.

What is going on? The routine is being executed on my v3 hub locally(has a house icon).

EDIT: Here is proof:

It might help to show the automation as someone might do something similar and be able to offer advice.

It sounds rather like the automation is triggering when a value rises above/falls below a threshold and then isn’t seeing it fall below/rise above the threshold to reset it.

I run a couple of these.


1 Like

Here is a video to proof the issue. Only editing the routine makes it work.

EDIT: If you cannot watch the video click the “youtube” text in the bottom right to open it in a youtube tab, that should make it work.

Do report the issue to ST Support and let them investigate.

Isnt ST support on this forum?

Mostly it is a community forum where users can help each other. There are several staff that focus on firmware and anything with Edge. For other issues such as the app, they will ask users to contact ST Support so it can be forwarded to the appropriate team. Most likely it is a bug in the app causing your particular issue.

I did notice that some of the automation had multiple triggers. I could not tell (due to language) if they were actually triggers or preconditions. If you have numerous actual triggers, it is unlikely that your automation will run because they all must happen (not just exist) at the same time. If you look at my example above, you’ll notice that all but one are preconditions in the one with multiple triggers.

in the end, i disabled everything that tells the device to go off. only the two automations that turn them on, were still enabled. it didn’t turn on until i edited the automation and saved it(without making actual changes)
As you can see, before i edit the automation it is not working.

i hate customer support, i send them this thread and they responded that they are not sure what i meant, and perhaps i can send a screenshot. Also responding to the email is out of the question, they always require some third party steps to respond. Horrible support.

So what happens if you leave it running and the power goes above 280W then falls below it again? Did we see that?

No, thats hard to show as the device is connected to solar panels.

Let’s try another question. You have a Routine saying ‘if power < 280W then turn something on’. You save it and because the power is about 220W something is turned on. When are you expecting it to happen next?

I am not expecting anything to happen until the power rises above 280W and falls below it again. I can imagine why it happens once when you save the Routine even though the power is fairly steady at around 220W, and why disabling and reenabling the Routine doesn’t doesn’t have the same effect.

The device keeps reporting values under 280w, yet the device in question is not being turned on. I would expect it to turn on even if i manually turned it off. Editing the automation makes it turn it on.

My light sensor automations also turn the lights on automatically even if i turn them off in the app, because the conditions for turning them on are met (movement detected and light below certain amount)

But in this case, conditions are met but the device is not being turned on.

You can also test this yourself. If you create a simple automation routine where you say “if light 1 is on, turn light 2 on.” Try turning light 2 off. smartthings will start light 2 again.

No it won’t. It will stay off. If I turn light 1 off and on again then light 2 will be turned on again.

Weird, i just tried this myself and you are right, even though i can almost swear that this works for most my automations, it must be some other things that trigger then that causes it to work.
I coupled my lights to alexa, and sometimes when i turn them off through alexa, they turn on immediately again because it’s still triggered.

Is there a way to make smartthings execute these routines always, and not just “once”?

Thinking to include a virtual switch in the automation that it only activates if the switch is on, and then turns the switch off as action. And then make a routine that automatically turns the switch on again. Would that force it to keep checking?

I don’t think you can do much about the Routines. It seems the developers chose to implement the comparison conditions so they only trigger the Routine when the condition changes from false to true (*). That isn’t the default behaviour of the underlying conditions in the Rules API that powers them. Presumably they felt it made the most sense.

(*) That’s one way they could have done it. There are other ways. Without being able to see the actual Rules we can only speculate. Even if we could see the Rules we might still be guessing what they actually do.

Using the Rules API is one option. A third party app like SharpTools is another.

2 Likes

What about virtual switches?
If the condition of <300w is already met, it wont activate again. But what about “if <300w and virtual switch 1 is on” then X and turn virtual switch 1 off.
Then make a automation that if virtual switch 1 is off for 3 seconds, turn it on again.

Actually that does sound like it might work.

1 Like