Details regarding Smartthings Architecture?

I have been doing research on SmartThings Architecture. I’m trying to know the exact procedure of command execution for a device sent by user via a SmartThings Mobile Application.
For example: A user taps on the SmartThings Mobile Application screen to turn on a Switch (let’s name it as S1). Now S1 will be turned on.
I want to know detailed architecture of this procedure starting from a tap in Mobile application to turning on of the switch.
I have tried to go through the architecture, but I’m unable to understand this procedure. Kindly please help me with this issue.

First rule of home automation: “The model number matters.“

In this case, it depends very much on which communication route the device uses with your smartthings account.

There are four main categories.

  1. cloud to cloud.

In these cases, the physical device communicates with its own cloud via the Internet, that cloud communicates with the smartthings cloud, the smartthings cloud communicates with the smartthings app by Internet. For example, this is how a TPLink Kasa switch works with SmartThings.

  1. direct connected devices.

These are Wi-Fi devices which do not have their own cloud. They connect by Internet to the smartthings cloud, which communicates with the smartthings app by Internet. For example, this is how some Tasmota WiFi switches work with SmartThings.

  1. hub connected devices.

These are using either the Z wave or the Zigbee protocol. They communicate with the SmartThings Hub in the same physical location using that RF protocol. The hub communicates with the smartthings cloud by Internet and the smartthings cloud communicates with the smartthings app by Internet. Note that the hub does not communicate directly with your phone. The SmartThings app always goes through the smartthings cloud even if the phone is on the same local Wi-Fi as the hub. For example, this is how a Fibaro switch works with SmartThings.

  1. phone connected Bluetooth devices.

With some Samsung phone models there are a few Bluetooth devices which communicate directly with the phone. however, the SmartThings app still needs the SmartThings cloud.

———————

So the exact details that you are asking about will vary depending on which of the four categories the specific device is in. :thinking:

However, they will always start in the same place: when you tap on something in the app on your phone, the app communicates with the smartthings cloud via Internet. What happens next depends on which of the four categories the device itself is in.

here’s one of the more recent diagrams SmartThings has published

2 Likes

Yep. That one leaves off direct-connected devices, though. :thinking:

@jody.albritton

1 Like

Quick and ugly MS Paint touch-up :joy:

3 Likes

Yeah, the original was a funny drawing, because it implied that the Samsung smart appliances like the refrigerator and the oven were hub connected, which they are not. :wink:

1 Like

I really thank you for explaining me various categories of devices. I understand everything explained by you. But I need to know about how to communication is taking place between SmartThings mobile app and SmartThings cloud. I also need to know how the commands from SmartThings Mobile app are handled in SmartThings Cloud. I want to know how device handlers and event handlers processes the command sent from my Mobile Phone.

For example: If there is a state change which leads to an event, then automation within SmartApp are taken care by Event Handlers. But how are the commands send by SmartThings application are taken care of?

@Gaurav_Goyal If you are using a direct-connected device, you can see how the device communicates with the cloud in the SmartThings IoT Core SDK.