page ( 'mainPage', ( context, page, configData ) => ) on the SmartApp object. enableEventLogging ( 2 ) // logs all lifecycle event requests and responses as pretty-printed JSON. InstallationĬonst SmartApp = require ( ) const express = require ( 'express' ) const server = express ( ) const PORT = 8080 /* Define the SmartApp */ const smartapp = new SmartApp ( ). To learn more about SmartApps, including choosing the best hosting solution for your SmartApp, visit the SmartApp developer documentation. Webhook SmartApps are any publicly-accessible web server that will receive a POST request payload. There are two distinct options for hosting your SmartApp: AWS Lambda and Webhook.ĪWS Lambda SmartApps are hosted in the Amazon Web Services cloud and are invoked by ARN instead of a public-DNS address. Creating a SmartApp allows you to control and get status notifications from SmartThings devices using the SmartThings API. 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. 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. All of the SmartApp execution will happen on the server or Lambda that you control. SmartApps are custom applications that execute outside of the SmartThings Platform. ✅ Firebase Cloud Firestore plugin ( usage).✅ Context Store plugins – easily scale access token management (and more) to support many users.✅ Winston framework manges log messages.✅ Integrated i18n framework provides configuration page localization.✅ Configuration page API simplifies page definition.✅ Event handler framework dispatches lifecycle events to named event handlers. ![]() ✅ Javascript API hides details of REST calls and authentication.This SDK includes a set of Node.js libraries for building Webhook and AWS Lambda SmartApps, and interacting with the public SmartThings API. See the Version 2.0.0 release notes for more information. Axios is now used rather than request-promise-native for making HTTP calls, resulting in changes to the error.Methods that return lists now return arrays instead of objects with the properties items and _links.The major non-backwards compatible changes include: This major release is not fully backwards compatible with version 1.X, though for most SmartApps the changes required should be relatively minor. ![]() For a detailed look at the API, check out the reference documentation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |