Are SmartApp rules always evaluated in the cloud?

I’ve set up a rule in the Smart Lighting app that

turns on a (zwave) switch if there is motion in the hallway sensor and it is between sunset and sunrise.

Does that evaluation happen in the cloud or in the hub?

It seems amazing to me that a motion sensor could ping up an event to the hub, the hub ping it up to the cloud over the internet, the server evaluate that event and send a signal back to the hub over the internet, and the hub relay the turn on command to the physical switch - all seemingly without a delay.

Is this really the way it works?

The answer is: It depends.

Not sure there is a FAQ for this yet, but to run locally in Hub V2, the following conditions must be met:

  1. It must be a SmartApp that SmartThings has specifically included in the Hub firmware. Right now, I think that’s only Smart Lighting, actually.

  2. All the Devices need to local compatible (ZigBee, Z-Wave … but I don’t think IP counts, yet).

  3. All the Device Handlers have to be select ones that have been specifically included in the Hub firmware.

  4. Events always eventually get sent to the Cloud. And the mobile App only reads/writes to/from the Cloud.

Anyone here will chip in with the easy IDE page URL that shows which of your SmartApps are executing locally.

If you have a Hub V1 … then everything is cloud only.

1 Like

If you have a v2 hub as mentioned then they could be running locally. To verify:
Local Running SmartApps: https://graph.api.smartthings.com/localInstalledSmartApp/
Local device list: https://graph.api.smartthings.com/localDevice/

2 Likes

do i need to bookmark those links or are they menu items someplace on the IDE website? I dont see them.

I haven’t seen them in the IDE so I have them bookmarked.

ok. thanks for sharing!

So I have nothing in those two lists… Does that mean all my stuff’s in the cloud?

I am using Smart Lighting for about 6 different rules at the moment.

I’m a developer. I’m just curious because in the example I stated in the first post, it just seems incredible that that scenario could run so quickly in the cloud.

I’ve tried playing around with things like IFTTT and the latency makes it a no-go for anything critical like switches etc.