Get Sensor Data

Continuing the discussion from Get historical sensor data:

I am completely new here and doing some POC’s with ST i just want to know as discussed in this thread Get historical sensor data that is there a possible way to get the data of a sensor (historical , realtime) additionally does ST provides any REST based API’s to fetch the sensors data (which it does’nt as per my understanding as of now)

Any information / poniters would be helpful

There is a REST API which allows pulling current sensor data

Take a look at This Tutorial

@Charles_Schwer created SmartApp that logs to Google Sheets which would be a good example on how to do it.

If you are logged into the IDE

You can go to https://graph.api.smartthings.com/api/hubs to get your hub id

Then go to https://graph.api.smartthings.com/api/hubs/idHashString/devices to get a list of devices

Then go to https://graph.api.smartthings.com/api/devices/idHashString/events to get recent events

The only problem with the ones in the box above is you have to be logged into the ide, there is no oauth for this. There used to be a loophole where you could use any oauth token on your account to get to this but it was closed recently for security reasons

Have you looked at the initial state event streamer that is integrated with SmartThings:

http://blog.initialstate.com/tutorial-smartthings-meet-initial-state/

or this:

1 Like