How to collect SmartThings data

Is there a way to collect this data from SmartThings? I’d like to be able to collect it live (automatically) and import it into Excel or some other chart making option. Is this possible?

You can do that with the CLI using: smartthings devices:status {deviceID}

ConstantGraph

ConstantGraph Data Logging and Charting[quote=“JKB121, post:1, topic:250036, full:true”]
Is there a way to collect this data from SmartThings? I’d like to be able to collect it live (automatically) and import it into Excel or some other chart making option. Is this possible?


[/quote]

@Paul_Oliver if you sign-up to www.constantgraph.com you can connect your account to your SmartThings account (for free) and have access to all of your data live. It allows you to create your own graphs and dashboards so there is no need to go into Excel. Here’s an example dashboard…

I like it, but can’t seem to get any charts to work. I see it is telling me the temperature in a greenhouse, but no graph. Is there a video out there? Maybe it needs some time to collect data??

Thoughts???

Hi @JKB121. By default, you only get to see an hourly graph and so you will need a little time to build up a graph. If you want to see all the values collected so far, then try looking at the raw data in advanced mode (see ConstantGraph Data Logging and Charting - #95 by Automated_House).

Once I figure this out, will I be able to “export” or “import” this into my SharpTools dashboard?
Capture

You can export the raw data points from the Channel Config menu (but not the aggregated data). What do you want to do with the data once you have exported it?

I would really like to just show the chart on my SharpTools dashboard. Is there a way to do it using an http get from SharpTools?

EDIT: It appears that I can access this data using either an HTTP GET or HTTP POST. How can I get an API Key to do this?

I believe @JKB121 is looking for more of an ‘embed’ feature. SharpTools has the ability to embed content from other sites either using an iframe or using an HTML(+JS) snippet.

Sounds like I might be getting somewhere. Are there instructions on how to do this in the sharptools community?

What format does Constant Graph make the embeddable content available in?

It’s most commonly done with the Custom Tiles feature which can either embed an external webpage using an iframe (URL) or can embed an HTML+JS snippet.

I guess the issue is going to be how to maintain the login state of the ConstantGraph page. @joshua_lyon - how do other sites generally manage that normally?

It varies based on the site. For some sites, they include something like an API key within their ‘embed’ widgets. Some sites have public widgets, so it’s just a generic embed (eg. weather).

For other sites that don’t explicitly have an ‘embed’ feature, since the user is just wrapping the other page in an iframe, the cached credentials are used (assuming the user has logged into the other site within that browser).

@constantgraph

Simon, This is the first attempt at adding the On/Off graph to one of my SharpTools dashboards. I believe it will work and just needs a bit of tweaking. I’ll work with a few more tonight.

@joshua_lyon

Is there a way to keep the embedded image inside the custom tile? See the square corners outside of the rounded corners. Not a huge issue though…

Yes, I think some tweaks could be made to calculate an inner radius to match your custom theme’s tile radius. :slight_smile:

The ConstantGraph API only currently supports adding data and not extracting data. If you add a non-SmartThings location the Account page, it will give you an API key.

I’d like to be able to keep the temp data from my crawlspace sensor so I can go back and see historical data. The history data doesn’t go back far enough. Anyone have any thoughts on how to do this? Thanks

Good question, and one that gets asked every month or so, so there are multiple threads already in the forum about it. I have combined yours with one of the most recent, so go up to the top of this thread to read the answers. :sunglasses:

1 Like

If you are just looking to collect the data for later post processing, here is a topic about using Googlesheets in the new architecture.

1 Like