
- #SMARTTHINGS SMARTAPP EXAMPLE HOW TO#
- #SMARTTHINGS SMARTAPP EXAMPLE INSTALL#
- #SMARTTHINGS SMARTAPP EXAMPLE DRIVER#
- #SMARTTHINGS SMARTAPP EXAMPLE ZIP#
Another example is getting various Attribute values for a Device by invoking a method in the form. For example, you can get a reference to a Device configured in a SmartApp preference by simply referencing the name of the device configured in the preference. SmartThings makes use of this powerful feature in a few ways. The Groovy programming language offers a powerful feature called Metaprogramming that (among other things) allows for Groovy programs to be written in a way that methods can be created dynamically at run time. The underlying wrapper class may even change at some point (the supported APIs should not, without notice).īut, should you be confused about messages in the log, this is why. This should be transparent to developers, since these objects cannot be instantiated directly. We have wrapped many of our core objects with wrapper objects to protect access to the underlying system object. For example, Event is actually an instance of EventWrapper. You may notice in various log messages or error messages that the objects are actually wrapper objects. For convenience, we have organized the methods available to SmartApps and Device Handlers into the SmartApp or Device Handler API documentation. But each running execution of a SmartApp or Device Handler has available to it many methods and properties. A SmartApp is not an object, in the strict sense of the word, for example (either is a Device Handler). Each object will contain a summary at the top of the document that discusses some of the common ways to get a reference to the object.Īlso worth noting is that some of the “objects” documented are not really objects at all.

You will rarely see constructor documentation for this reason. Instead, various objects are already created and available in your applications. SmartThings objects are rarely created directly by SmartApp or Device Handler developers. The SDKs are a set of libraries and wrappers around the SmartThings API designed specifically for SmartApp creation.This is where you can find API-level documentation for the various objects available in your SmartApps and Device Handlers. There are two SDKs available to help create your SmartApp. Create Your SmartApp With the SmartApp SDK #
#SMARTTHINGS SMARTAPP EXAMPLE HOW TO#
For more complete instructions on how to work with cloud connected devices please visit the Devices documentation section. It is possible to create and control cloud connected devices with a SmartApp. Cloud Connected Devices with SmartApp Connectors # We have created a tutorial on building a SmartApp with Context Store here: If your SmartApp needs to allow external communication or authentication with a third party, you will need a context store.
#SMARTTHINGS SMARTAPP EXAMPLE ZIP#
We have created an example tutorial on building a simple SmartApp that sets the color of a light based on the weather in a given zip code. If you need to create something more complex than a rule, but do not need to hold outside authentication information or other data, you will use a simple SmartApp. Choosing to start with a Simple SmartApp will not preclude you from enabling more advanced features later.

Which one you choose will depend entirely on your specific application. There are typically three types of SmartApps you can create. If using Lambda, permission to execute your Lambda (url) function must be granted to SmartThings.If using a webhook, an app server up and publicly accepting lifecycle events (needs url) from SmartThings via HTTPS.Visit Choosing a Hosting Solution for more details. Pick a solution to host your SmartApp.Developing Your SmartThings Find Device.Get Started With Mobile Connected Devices.
#SMARTTHINGS SMARTAPP EXAMPLE DRIVER#
LAN Edge Device Driver Development Guide.
#SMARTTHINGS SMARTAPP EXAMPLE INSTALL#
