Noob Question: Can I use the SmartThings API without writing an app?

Hi folks,

My first post here, I recently discovered that my energy provider have partnered with Samsung to allow me to pair my gas and electricity smart meters with the SmartThings app. I have this working but now want to write some code which obtains this data from the SmartThings API (where I’m assuming it is stored?) so I can push it to my metrics tools (Grafana, InfluxDB etc).

I have been reading some of the SmartThings docs, but they all seem to be geared towards implementing functionality which will integrate with the SmartThings app, whereas I just want to pull data from the API from some code that runs locally.

So I guess my questions are:

  1. Will my energy data be available in the SmartThings API?
  2. Is it possible to read data from the SmartThings API in the way I have described above?

Many thanks,

Edd

Hi, @edd.grant

Yes, through SmartThings API you’ll get your devices information.

Issue a Personal Access Token so you get to interact directly with the API.

Hope this information helps,
Erick.

As i I understanding it you will need something to recieve the event data you want and send it to your influx DB database. To interact with the new API’ as i believe you either need a AWS App, a web app that uses web hooks, or something like the Smartthings CLI tool.

There are some good examples out there, but you will need a server or something to run the tool/webapp on to retrieve the data and then put it into your database.

The new API is all based on you running your own infrastructure for the apps you want to develop.

You may be able to put something together with the Smartthings CLI that isnt a app, and just pools the smartthings api so often, but that could provide very incomplete data.

If you have a influxdb already i would suggest creating it as a web app, and then posting the details here. I dabbled with something a while ago that would been about 80% of the way there. It wasn’t hard to get something fairly viable. The biggest problem was going to be putting it on a platform always there to serve it.

1 Like

You may want to ask your provider if they have any information on the integration. Also, maybe you can find technical people using SmartThings near you.

I would look into WebCore (https://wiki.webcore.co/) which is pseudo programming with a great community to help to learn it. I think it easily makes complex steps work.

This might also be useful … [RELEASE] Simple Event Logger

To that point there is also already a smartapp written for the Smartthings IDE that will load data to a InfluxDB. A quick google search should point you to it. I run it myseld as i have graphana and influx running on a pi for this purpose.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.