REST API or alternative for subscribing to device events

I am tinkering with the SmartThings API and started putting together some dashboards using Influx & Grafana. I was able to get an API token and use REST queries to get the status of all the devices on my account successfully, to populate my database. Works great for things like battery level, temperatures, status of contact sensors.

The problem is there doesn’t seem to be a way to handle events. If someone opens a contact sensor, there’s no way to associate a device handler, and there’s nothing in the status that indicates the last time it was opened. Is there a solution to this using the REST API, or is there another way to subscribe to device events?

Like this?

1 Like

Have you tried the InfluxDB Logger SamartApp?

1 Like

I saw this and didn’t think it was what I was looking for. That says " Create a subscription for an installed app." I apparently don’t understand what an “app” is, but I did a GET on installedapps and it returned nothing, so I assumed that I don’t have “apps”. What am I missing?

The smart app is what connects the SmartThings cloud to your application and contains the subscriptions to devices