- Develop
- Mobile
- Samsung Automation
SmartThings Automation
smartthings automation integrating smartthing's automation requires an understanding of the smartapp lifecycles and implementing its protocol the smartthings nodes provided in the automation studio allows you to wire installed devices to implement autorun rules without any code or simply deploying an automation node that implements the smartapp lifecycle without coding event nodes for device subscriptions, status nodes for device status checks, and command nodes for device commands are provided in general, the smartthings automation is designed in the following order place the device profile node and determine the required capability enter the web-hook url through the automation node after that, implement the logic that corresponds to the autorun rule you can read the state of the device through the status node you can command the device by placing an command node you can extend the experience using external apis device profile node this node represents an installed device in this flow, you need to choose a device for automation event, condition and action nodes need to know which devices will subscribe to the smartthings cloud or commands this node has a capability that represents a device feature find more information about the capabilities of smartthings properties - name required a label of the name assigned by the user it is a unique name in the flow - capability required the list of capabilities provided by this device determines if this device supports the specified capability name automation node this node represents the webhook endpoint of smartapp the automation node handles lifecycles of smartapp a webhook endpoint in this context is a web services application which can receive incoming http post requests properties - name required a name for the webhook endpoint - endpoint required an endpoint that should be invoked during execution - output lifecyle event next node is the event node only event node this node is registered as a subscriber through the automation node must be used with automation node this node represents a change of device whenever a user installs a smartapp, they typically will select the devices to be used on the smartapp the installed device interacts with this event node when the device changes and an event occurs, the event node can receive the event as a subscriber properties - name required the label of the device assigned by the user - device the unique system identifier for this device - capability required the list of capabilities provided by this device determines if this device supports the specified capability name - attribute the list of attributes for this device determines if this device has the specified attribute status node this node checks the status of the device when a user installs a smartapp, they typically will select the devices to be used by the smartapp this condition node interacts with the installed device this node allows you to branch the flows based on the state of the device properties - name required the label of the device assigned by the user - device the unique system identifier for this device - capability required the list of capabilities provided by this device determines if this device supports the specified capability name - attribute the list of attribute s for this device determine if this device has the specified attribute command node this node can commands to the device when a user installs a smartapp, they typically will select the devices to be used by the smartapp this action node interact with the installed device the commands in this action node can change the state of the installed device properties - name required the label of the device assigned by the user - device the unique system identifier for this device - capability required the list of capabilities provided by this device determine if this device supports the specified capability name - attribute the list of attribute s for this device determines if this device has the specified attribute properties - name required the label of the device assigned by the user - device the unique system identifier for this device - capability required the list of capabilities provided by this device determines if this device supports the specified capability name - attribute the list of attributes for this device determines if this device has the specified attribute example it's a smartthings automation using contactsensor and lifx bulb create a webhook with device profile and automation nodes add a device profile node for the contactsensor with contactsensor capability add a device profile node for the bulb with a switch capability add a node for the smartthings automation webhook add an event node to subscribe to the contactsensor change add status nodes to check the switch is "off" add command nodes to change the bulb to "on" add command nodes to change the bulb "off" save and deploy register in smartthings developer workspace in order for smartthings automation to work, app-registration is required visit the smartthings developer workspace create a new automation project register the smartapp webhook endpoint copy the webhook endpoint on the automation node complete the registration process next is to "deploy to test" install smartapp in smartthings app deploying your smartapp to test does not mean your service is published when you deploy your service to test, only the samsung developer account used to deploy to test will be able to install the service from the smartthings app, and only after enabling developer mode in the smartthings app test-your-device after this, you can install the smartapp that "deploy to test" above visit now - samsung automation studio beta