A Brief Note About Scheduling in a Mesh Network

Most people are used to thinking of an app as a way to make something happen. You start it, the thing you asked for happens immediately.

In a home automation network that relies on a “mesh network,” as SmartThings does, it’s more like sending a text message to someone else asking them to do something when they can. So you aren’t “turning the light on.” Instead, you’re asking the light to turn itself on once it gets your message.

The same things can affect this as affect any messaging system. The recipient may not have checked their messages yet. Or they have gotten the message, but be busy doing something else and so haven’t gotten around to acting on it yet.

If you send text messages to several people, like “Let’s meet at 7 in front of the movie theatre,” you can’t be sure exactly who will get the message first, read the message first, or show up at the movie theatre first. You feel pretty sure that everything will happen at about the same time, but you’re not controlling the exact sequence. Even if you send a message to Ben and then send a message to April, April might check her messages before Ben checks his. And just because April reads the message first doesn’t guarantee she’ll be the first to arrive at the theatre.

There are technical reasons why mesh networks are often a very good choice for home automation. It just helps to remember that scheduling actions in ST really means scheduling action request messages to be sent… It’s still up to the individual devices to wake up, read the request, and physically perform the action. And if you send requests to multiple devices at about the same time, you can’t be 100% sure of the order in which all the actions will occur.

More information for developers writing custom code is available at the following link:

http://docs.smartthings.com/en/latest/smartapp-developers-guide/scheduling.html

3 Likes

Well written explanation and very helpful for all to understand. I have often wondered why sometimes things would not happen as planned and this provides an explanation. I am rather new to an open home automation system and glad that I ran into this thread. Now I am going to try to look at a more efficient way scheduling many actions at the same time.

3 Likes