XaiJu
beestat
beestat

patreon


Getting back into the groove with the beestat API

After a long holiday and some much-needed time off from work I've found it to be somewhat difficult to get back into the groove. To help with that, I've been picking up some small/easy/fun tasks to get my feet wet before really diving in. One of those was the beestat API, sparked by a request someone made on a Reddit post.

The backend of beestat is built on top of a generic API that I built years ago as a side-project. I already handled all of the hard stuff like security, users, a CRUD interface, API keys, etc. I make tweaks every now and then but overall I have a really solid framework in place that I have full control over. When the request came through to get programmatic access to beestat data I only had to sit down for about 15 minutes to figure out how to do it.

The result is that I can now assign someone an API key that gives them access to their (and only their) beestat data. The API key never expires and you don't have to go through an oauth/token renewal workflow with ecobee. If you care about the most up-to-date data this isn't for you. Beestat has limits on how frequently it will sync your data and that's going to lag behind the official ecobee API by a bit.

Here's a couple example API calls you could make:

Get a list of all your thermostats:
https://beestat.io/api/?api_key=APIKEY&resource=thermostat&method=read&arguments={} 

Get your aggregate runtime data for the past month grouped by day:
https://beestat.io/api/?api_key=APIKEY&resource=ecobee_runtime_thermostat&method=get_aggregate_runtime&arguments={"ecobee_thermostat_id":123,"time_count":1,"time_period":"month","group_by":"day"} 

There's a lot more, but the beauty of it is that it's now trivial to get all sorts of useful information. This is all presently undocumented, but if you'd like to try it out shoot me an email at contact@beestat.io with your thermostat serial and I can set you up. At some later date I'll build some proper documentation and allow you to generate API keys directly from beestat, but for a quick v1 I'm pretty happy about this.


More Creators