This simple SmartThings automation app turns lights on when a multipurpose sensor opens, and off again when it closes. This automation handles CONFIRMATION requests from the SmartThings API. It was built using the SmartThings SmartApp NodeJS SDK.
For more information about building automations and device integrations on the SmartThings platform see the SmartThings Developer Portal.