I’m looking for any guidance on how to register and receive events (i.e. switch state change) in an application I’m coding. Application will run on my home computer and I’d like to recieve push events whenever a device changes state.
Welcome to the SmartThings Community,
For this, you need to create a
SmartApp as using its token type and
installedAppId allows us to create subscriptions:
API | SmartThings Developers
Here’s a tutorial on how to create a simple SmartApp:
Getting Started with a Simple SmartApp using the new SmartApp SDK
This SDK builds on the CoreSDK and provides kick start for SmartApp development. The SmartApp SDK reduces the amount of code necessary to write a SmartApp using the new platform and API. The SmartApp SDK supports both Webhook and AWS Lamda deployment, but this tutorial will focus on the deploying a webhook SmartApp using Glitch.
Maybe Try this first:
Developer Workspace Account
Github or Glitch Account
One Contact Sensor
One or more Light Devices
I suggest having all of the required accounts created before getting started. You will need a location prepared with at least one contact sensor and one or more light devices.
SDK: GitHub - SmartThingsCommunity/smartapp-sdk-nodejs…