XaiJu
beestat
beestat

patreon


Rewriting the Aggregate Runtime Card

If you read the post from two weeks ago you might know that I'm reworking a good chunk of the backend to cut down on the massive amount of data I am accumulating.

Work on that front is going well, but there are a lot of side-effects. One of the bigger ones is that I have to query a new table for the Aggregate Runtime (now called Runtime Summary) data. The actual data is largely the same, so I could have simply made the appropriate changes to my API so that the frontend would have continued to work identically.

But that's too easy. :) Any time I rework large chunks of my application I always take the time to make sure I'm doing things the right way. In the case of the Runtime Summary, I had some changes I wanted to make. If you're interested in the details hit me up and I'll be happy to explain them. Here's the flyover:

1. The data grouping is no longer happening at the database-level. The API now returns one row per date and the frontend does the grouping by month, year, etc.

2. I'm making a few changes to the class hierarchy on the frontend so that I can better re-use some of the chart code.

3. I'm abstracting away a few things inside the Runtime Summary card so that it's not pegged to the thermostat you are actively on. Other cards will see this same change soon, but this will allow more customized dashboards...think two Runtime Summary cards; one for each zone in your home.

Work on this card is going well, but it takes a minute. There are dozens of minor things I have to handle. Some work with simple copy/paste from the old version, but others require minor tweaks to make work just right. When I'm done I will have a more performant and more flexible Runtime Summary card.

I am tentatively expecting to go live in 2-3 months with this new version. I wish it was sooner but this is such a massive and tedious change that requires a lot of careful considerations...and a 200GB migration to top it all off. There won't be any grand new features right off the bat, but performance will improve. Immediately after I will begin the effort on sensor data.

Looking forward to lots of changes to round out this year.


More Creators