Earth Notes: On Website Technicals (2022-03)

Updated 2022-10-23.
Tech updates: jq, daylight bug not saving.
Learning some new tools, analysing data from some new toys!

2022-03-28: Timezone / DST Bug

So today I discover a subtle cross-platform (eg between macOS and Linux) bug in my handling of the difference in local time (for boost-from-grid) and UTC (for more or less everything else such as stats).

I expect more bugs to pop out of the woodwork over the next few days.

One of my tech suppliers had its on-line portal messed up this morning by the time change, another managed to avoid it this year but last was bad!

Amongst all the other reasons to stop flicking the clock back and forth 1h twice a year — fiddling at the edges of an ~8h change in UK day length between mid-summer and mid-winter — is avoiding all these hard-to-test code issues. Please just make it stop. Preferably on GMT/UTC for the UK, so that Greenwich stays on Greenwich time!

On a general note, the eddi+Thermino does seem to be working, and automatic diversion (not affected by the above bug) almost eliminated gas use this last week. Hurrah!

2022-03-12: Learning jq

I want to keep track of how much electricity I have diverted (or boosted) to my shiny new Sunamp Thermino heat battery (via the myenergi eddi) installed a few days ago.

This is energy that would have been kWh-for-kWh (ignoring efficiency issues) from gas before.

Today's new script is which makes use of the rather nifty jq tool to extract and summarise data of interest from the eddi by-hour JSON stats to a single CSV row easier to process with *nix tools.

Example raw JSON from eddi for today so far:

% sh script/myenergi/ 2022-03-12

Example summarised output (in kWh rather than Joules!):

% sh script/myenergi/ -h
#Eddi daily stats summary in kWh; definitely partial if h < 24
% sh script/myenergi/ 2022-03-12

Thus there was ~4.3kWh diverted and none boosted today so far (~21h). Also this claims ~1.2kWh grid imports and 0.6kWh exports in total so far. (The Enphase believes 0.6 and 0.9 respectively...)