Skip to main content

SmartApp Basics

SmartApps are custom applications that execute outside of the SmartThings Platform. SmartApps are most useful as a means to extend the limits of what is possible with SmartThings Automations.

All of the SmartApp execution will happen on the server or Lambda that you control. The complexity of execution and the number of expected users will need to be examined to understand the hardware or execution requirements your app needs to handle. Your application will respond to lifecycle events sent from SmartThings to perform actions on behalf of your users and will execute any scheduled tasks that you have created in the SmartApp.

InstalledApp

An InstalledApp is the user’s instance of the app you have created. These installs include details of the installations like the access the app has, the subscriptions setup, and the schedules created for the app. The InstalledApp is attached to the user account of the end user who installed it.

When an installedApp is uninstalled by the user, all tokens, subscriptions, and schedules associated with that install will be revoked.

Configuration

This lifecycle event allows you to send configuration information from the user to your backend service.

Read More about configuration here.

Subscriptions

Subscriptions allows for an installed application to listen for events, and react to them as necessary. For example, assuming you granted permission to the devices during app installation, you could subscribe to a motion sensor and turn on lights when motion is detected. Common use cases for subscriptions include:

  • Allowing a third party to sync a remote system
  • Allowing an App to react to a device event which can trigger other actions to occur
  • Allowing a third party to gather analytics on how their devices are behaving

Subscriptions are sent to the webhook callback Url or Lambda function defined in your SmartApp configuration.

Read More about subscriptions here.

Schedules

Schedules allow an InstalledApp to be notified via the same method as a subscription that a scheduled event has occurred. These scheduled events are either a one time event or an event that triggers on a recurring basis set up using a cron expression.

Read More about scheduling here.

Next Steps

Visit Create a SmartApp when you're ready to start developing your SmartApp.