Rules slow to initiate

Using rules engine with Smart Things.

Are rules created in SharpTools stored locally on my hub or are they in the cloud?

The reason I’m asking is I’m finding a delay from when an event trigger actually happens to when the SharpTools Rule sees the trigger…sometimes 5 seconds or so. Once the Rule gets going, there is no delay and it runs awesome.

I’m guessing that rules are saved in the cloud and I’m simply seeing internet delays…however, wanted to verify my assumption is correct.

All Sharptools actions occur in the cloud. There is nothing local on you ST hub.

If you want local use ST Routines or the new Smartlighting.

Can you share more details about what you’re experiencing?

Keep in mind that after the initial trigger of the rule, the system caches some information so it can process the rules faster, so you might try testing your rule a few times.

Edit: We previously discussed using the ‘stays’ feature within rules, so keep in mind that if you use a ‘stays’ configuration within a trigger, the rule flow won’t execute until the trigger is valid for your specified duration. (You can enable the ‘debug’ level logs in your rule log viewer to see the original event hitting and then the delay for your specified duration) This won’t impact a ‘has stayed’ IF condition though as that is evaluated immediately when that block is encountered in the flow and looks backward in time.

Seeing that Sharptools is cloud…I’m sure that is my delay. It is happening on all my rules.

If I have a trigger of “Switch X turns on”…and then from there run the routine.

If I flip the switch, it takes about 3-5 seconds for the routine to actually start (although sometimes it is right away)…no delays or “stays” triggers. This delay is no doubt dumb old internet delays.

It isn’t a big deal at all.

Thanks

I’ve started to experience delays with rules on SharpTools that I haven’t modified. I have a motion sensor that triggers a light to turn on. In the last few weeks I’ve started to experience a delay after motion. It takes a few seconds for the light to turn on.

@josh how can I troubleshoot this?

Have you checked your rule logs and what do they say?

If you’re interacting with SmartThings devices and you are seeing intermittent ‘Unauthorized’ messages within your rule logs, then you may be impacted by an issue that seems to have cropped up with the SmartThings API recently:

:link: [Resolved] SmartThings Intermittent "Unauthorized" errors in rule

1 Like

I checked the logs. I am indeed getting the error “401 Unauthorized”. Is there a resolution coming?

The linked thread has more details including a summary of the status from me. I’ve copied a quote here for your convenience / reference.

1 Like

I’ll add my 2 cents here:

I also have been having delay issues, sometimes up to 5 minutes, (which coincidentally is the default reporting time for the devices).

I got deep into troubleshooting with SmartThings and a few related excerpts follow. Keep in mind that I disabled my SharpTools rules and created duplicate SmartThings Routines because initally they said the issue was with SharpTools.

The information was captured using SmartThings CLI:

Hi Nayely-


I may have captured it.


I ran the CLI and opened the laundry room door a8f50a26-b1aa-40c9-b106-10bfaa483a51 which is in the SmartThings routine “Basement Stairway Lights Turn on”. The lights did not turn on so I left the door open. After about a five minute delay, Basement Stairway Lights e9bf2fde-393e-4f70-9a8f-635466228b13 turned on.


The time was around 7:59 PM or 8:00 PM Eastern Time. Interestingly, the CLI program did not seem to scroll by when this was happening. I looked through the data but could not find a time stamp around the 7:59 PM time. I could just be missing it. I will paste the data at the bottom of this email.

Hi, Kevin.
This is really great evidence, thank you for collecting the info, I already created the report for the engineering team.
In this case, we would need to see why the driver got the event after 5 minutes or so, if it was due to something in the hub, or if the message was actually received until then from the device which I don’t know what can cause it.

Hi Kevin

Nayely will be off for some time, so I am following your case, reading your thread with Nayely I can identify two errors one related to a delay in events and another related to 2 sensors.

1 Case (Events delay): the case is being investigated by the team, as soon as I have updates I will inform you

2 Case (2 sensors): please, Can you explain the issue with these devices? for the last mail, these devices were removed from SmartThings,

Note: if I have missed something please let me know

NOTE: I removed 2 OLD devices that were not being used and replied back to their Engineering with that information.

Hi Kevin
I’m happy to hear that, so I will be pending of the investigation for your first case (Events delay)

DAYS LATER:

Hi Kevin

Unfortunately, we can’t see a delay in the logs in the previous mail you commented that the door was opened around october 4th at 7:59 PM or 8:00, in the locos we can see the following:

1- the device sent the open event to the hub at 2023-10-05T00:05:06.131509479+00:00 UTC
2- the event turns on the light at 2023-10-05T00:05:06.624864145+00:00 UTC

So we can’t see the delay based on the logs, but will still investigate why the device is sending the event 5 minutes after

DAYS LATER:

Hi Kevin

I understand, from our side, we can only discard that as a problem of SmartThings Hub or the Driver, that does not mean that the devices are bad but the reason for the delay is not caused by SmartThings. As you mentioned the problems are generated randomly, in my opinion, something wrong happened between the devices and the hub. they are out of our scope.

I can recommend checking the following :
- Sometimes users have problems with Zigbee and Wi-Fi channels, you can read more here
- Try to re-add the devices on SmartThings
- Check if, after some steps or using a specific scenario, you can reproduce the issue

but there are only recommendations

So basically they gave up at this point!

The delays still persist!!!

ADDITIONALLY: I’ve recently been having unrelated issues with all of my Zooz motion sensors getting STUCK on ACTIVE. They have worked fine for a long time. Working with Zooz Support, I bought a new one and swapped out 1 of them because they initially said the device was bad. Same thing happened. So then I got this reply back from Zooz Support:

Hi Kevin,

We’re currently working with the driver developer and SmartThings support to resolve the problem. It’s not clear what’s causing it other than some type of recent platform change on SmartThings. We’re trying to find the source as quickly as possible and will notify as soon as we have a fix. Thank you for your patience!

Agnes

Zooz Support Team

EDIT: So now I’m wondering if this “recent platform change” is the cause of these other issues…???

1 Like