Any way to get data from > 1 year ago?

I’m toying with some analytics on a local server. The idea is to look at heating degree days, propane costs, YoY usage and evaluate the benefit of various other changes in insulation and supplementary heat (woodstove). The data I’ve got from Beestat for the last year about my runtime is great. I recognize that storing data gets pricey, but if you’ve got any suggestions on how to access more than 1 year of data from anywhere (here, Ecobee.com, etc) I’d be interested!

1 Like

Here’s a script that you can run in your browser’s console that will export all of your historical profiles. Generally one per week stored for all time. This should mostly get you what you want.

You can also access this same data via the API if you’d like to automate any of this.

I do not store high resolution data past one year, so it’s not possible to recalculate these in any meaningful way.

var rows = []

rows.push([
  'thermostat_id',
  'date',
  'profile'
]);

new beestat.api()
  .add_call('profile', 'read_id')
  .set_callback(function(data) {
    Object.values(data).forEach(function(profile) {
      rows.push([
        profile.thermostat_id,
        profile.date,
        '"' + JSON.stringify(profile.profile).replace(/"/g, '""') + '"'
      ]);
    });

    var csv = 'data:text/csv;charset=utf-8,';

    rows.forEach(function(row) {
      csv += row.join(',') + "\r\n";
    });

    var encoded = encodeURI(csv);
    window.open(encoded);
  })
  .send();

Amazing, thank you! Monthly summaries about runtime are really all I’m interested in, so this should work great.

Once I get things running, I may set up an API key.

1 Like