Earth Notes: On Website Technicals (2022-05)

Updated 2022-05-21 08:06 GMT.
By Damon Hart-Davis.
Tech updates: timing tweets, energy stats insert, stats explosion, defer/async again, Airogram, off-grid, lowpowermode...
tools
Re-timing my tweets and catching up on some ambient field-recordings! Oh, and a new shiny toy...

2022-05-20: Monterey lowpowermode

Well, part of my plan to reduce grid power demand from laptops at peak times and flatten the duck may finally come to pass!

sudo pmset -c lowpowermode 1

should reduce power consumption of my new MBA when on charger/mains power.

A little root crontab to engage that regularly through peak times (eg from 4pm) and leave lowpowermode again later (eg randomly after ~8pm) might do the trick.

I have manually engaged lowpowermode for all battery operation, via the UI.

Here's what the root crontab entries look like:

8-58/10 16-19 * * * pmset -c lowpowermode 1
9-59/10 20 * * * pmset -c lowpowermode 0

Note that I'm NOT enabling/disabling this on the hour or half hour: too many devices switching at exact half-hour boundaries may itself give the grid indigestion!

This lowpowermode has become available with macOS Monterey (12.x). My MBA is currently on 12.4.

2022-05-19: Air x2 Off-grid

As of ~3pm, I am running both old and new MBAs off-grid while various backups etc continue!

2022-05-18: Air Arrived

My new M1 MacBook Air arrived at around noon. It left Chengdu in China on the 13th, so will have accrued "Air miles" and an associated extra carbon footprint...

Transfer

To tranfer my life from my old MBA to the new one, while still leaving a working clone on the old one, I did the following:

  1. Backed up the old one to Time Machine fully.
  2. In Internet Accounts turned off all mail connections (I don't want a mess of mail randomnly across the MBAs) but left calendars on so I can use them everywhete.
  3. Backed up again with Time Machine.
  4. Used the new MBA's migration assistant to restore from the old MBA's Time Machine backups; that took all night.
  5. (The new MBA will get a new 4TB Time Machine esternal HDD.)
  6. In the morning complete the set up of the new MBA, starting with turning back on the mail in all the relevant accounts and all the re-authentication that that implies...
  7. Trying to run EOU scripts on the new MBA, but clearly some of the binaries are not "fat" since I get env: node: Bad CPU type in executable and script/get_img_XxY: line 16: /usr/local/bin/identify: Bad CPU type in executable; items installed by brew are clearly going to have to be discovered and reinstalled (and indeed brew itself):
    • imagemagick
    • npm
    • ...

Firefox picked up where I left off! And ssh is all working as intended.

On opening, mail tells me that it will spend a few minutes importing my (236,093) messages.

On opening Skype I am asked to enable Rosetta to emulate/run Intel (x64) apps. That also lets my brew apps run, it seems! Though I should try to move to native banaries when I can, for speed. (Skype seemed to have forgotten me when it ran: I have reinstalled native.)

Pretty darn smooth so far...

A brew upgrade caused me to uninstall a couple of things that it was getting stuck on and that I no longer need (eg rstudio).

Signal reported its database corrupt. Having cleared it, and (re-)linked with my phone all seems fine.

(I note that the new MBA doesn't seem entirely flat: the front LHS rocks down a bit when I rest on it, so I've slipped a few bits of paper under that foot for now.)

I have followed instructions on How to migrate to native Homebrew on an M1 Mac to set up the new /opt/homebrew and gradually populate it.

% /opt/homebrew/bin/brew install zopfli
% /opt/homebrew/bin/brew install jpeg-xl
...

I may not need to be in a huge hurry to get the native versions. Running emulated x64 in Rosetta may only have a ~20% speed penalty:

% time /usr/local/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ...
5.634u 0.022s 0:05.66 99.8%	0+0k 0+0io 0pf+0w
% time /usr/local/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ...
5.635u 0.022s 0:05.66 99.8%	0+0k 0+0io 0pf+0w
% time /opt/homebrew/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ...
4.479u 0.065s 0:04.83 93.7%	0+0k 0+0io 0pf+0w
% time /opt/homebrew/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ...
4.473u 0.017s 0:04.49 99.7%	0+0k 0+0io 0pf+0w

Google Drive just silently failed to do anything when I tried to launch it on the new MBA, so I'm doing a fresh install...

2022-05-16: Async Desktop Again

WebPageTest is now complaining that my share42 JS script is render-blocking, even though it is loaded very late and updating stuff generally out of sight. So for desktop only I have made it async again. This seems to allow it to be discovered faster and loaded in parallel with other objects. I'd still prefer it not complete for bandwidth and CPU, but if WPT says async is better, then it must be right!

2022-05-13: Energy Stats Explosion

I made lots of progress on stats: extracting more of them, consolidating from multiple sources into one CSV/table, displaying them as tables, etc.

Yesterday I decided to auto-insert a selection of energy stats rendered this way into any page spatially marked as at 16WW, tagged microgen, but not marked dataset so as not to pollute other data pages that have their own data to showcase!

2022-05-11: Energy Stats Insert

I'v started a semi-automatic mechanism to insert relevant 16WW energy stats into pages' codas.

Initially the pages will be explicitly selected with a head directive, but that might broaden automatically to TECH pages with 16WW location and a simple temporal coverage for example.

Pages that are inappropiate (eg error or lite) will not get the insert.

This page has been marked up to include such stats as of writing.

To start with this will be placeholder text, and may fall back to that when, say, stats for the specified time are not available.

The intention is for this content to be static tables and/or text, extracted quickly on the fly, and will not force a page update. This will only be updated (eg stylistically) if all pages are, or the particular page is naturally rebuilt for some other reason. It is possible that live graphics and page-type-specific content will be included.

2022-05-08: Tweet (Re)Timing

I have been pushing out automated EOU tweets in the wee hours (for AU/NZ) and noon-ish. The former is nominally good for UK interaction too because there's not much else going on at that time.

There are suggestions that around the start of the business day, and in the early evening, are when many people are dipping into social media.

So I've doubled up on my 'daytime' posting to be two: mid-morning and mid-evening.

Exceeding five (automated) postings on weekdays (three on weekends) is said to be overdoing things, so this won't be. Any excess will be my human wit and charm: what's the worst that could happen?

Oh, and I visited a music festival yesterday and did a field recording.

I also updated the reutils library to allow 280 character tweets. I saw that the old 140 limit had stopped at least one of these EOU tweets from being sent.

~1164 words.

Energy Stats

Yearly gas import

From data/consolidated/energy/std/gas/Y/gas-Y.csv.

Table: yearly gas import; sources: Loop meter; max: 9000
Source: LoopSource: meter
DatekWhkWh
2007*9000unknown cover
20088883+++++++++
20096201++++++
20105784++++++
20113937++++
20123707++++
20133859++++
20142997+++
20152862+++
2016*3267~92% cover3851++++
20173423+++3429+++
20183680++++3806++++
20192888+++3157+++
2020*2077~75% cover2899+++
20213379+++

Yearly grid import

From data/consolidated/energy/std/imp/Y/imp-Y.csv.

Table: yearly grid import; sources: Eddi Enphase meter; max: 9800
Source: EddiSource: EnphaseSource: meter
DatekWhkWhkWh
2005*9800unknown cover
2006*9800unknown cover
2007*6968unknown cover
2008*409~16% cover
2009*403~25% cover
20101220+
20111081+
20121015+
20131108+
20141136+
20151183+
20161242+
20171248+
2018*420~41% cover1187+
2019846914
20209611054+
20219351003+
2022*126~18% cover*297~33% cover

Yearly grid export

From data/consolidated/energy/std/exp/Y/exp-Y.csv.

Table: yearly grid export; sources: Eddi Enphase meter; max: 3491.5
Source: EddiSource: EnphaseSource: meter
DatekWhkWhkWh
2009*148~25% cover
20103044++++++++
20113492++++++++++
20123251+++++++++
20133199+++++++++
20143402+++++++++
20153226+++++++++
20163150+++++++++
20173181+++++++++
2018*693~41% cover3170+++++++++
20192706+++++++2778+++++++
20202627+++++++2722+++++++
20212230++++++2299++++++
2022*251~18% cover*271~33% cover

Yearly gross in-home electricity consumption

From data/consolidated/energy/std/con/Y/con-Y.csv.

Table: yearly gross in-home electricity consumption; sources: Enphase meter; max: 9700
Source: EnphaseSource: meter
DatekWhkWh
20059700++++++++++
20069700++++++++++
20076968+++++++
20082036++
20091942++
20101554+
20111578+
20121542+
20131659+
20141678+
20151786+
20161831+
20171862+
2018*768~41% cover1998++
20191937+1992++
20202343++2398++
20212119++2205++
2022*927~33% cover

Yearly total grid-tied PV generation

From data/consolidated/energy/std/gen/Y/gen-Y.csv.

Table: yearly total grid-tied PV generation; sources: Enphase meter SunnyBeam; max: 4084.42
Source: EnphaseSource: meterSource: SunnyBeam
DatekWhkWhkWh
2008*915~92% cover*890~85% cover
20092956+++++++2907+++++++
20103547++++++++3483++++++++
20113988+++++++++3922+++++++++
20123778+++++++++3713+++++++++
20133750+++++++++3688+++++++++
20143944+++++++++3882+++++++++
20153829+++++++++3767+++++++++
20163703+++++++++3677+++++++++
20173794+++++++++3737+++++++++
2018*1069~41% cover3928+++++++++3931+++++++++
20193871+++++++++3856+++++++++3801+++++++++
20204084+++++++++4070+++++++++4021+++++++++
20213514++++++++3501++++++++3449++++++++
2022*978~33% cover*973~33% cover*1270~39% cover

Yearly off-grid primary PV generation

From data/consolidated/energy/std/geno/Y/geno-Y.csv.

Table: yearly off-grid primary PV generation; sources: SSMPPT; max: 99.2
Source: SSMPPT
DatekWh
2016*40.0~38% cover
201799.2++++++++++
201883.0++++++++
201966.7++++++
202062.2++++++
202182.1++++++++
2022*34.6~39% cover

Yearly DHW heater 1 diversion from PV

From data/consolidated/energy/std/h1d/Y/h1d-Y.csv.

Table: yearly DHW heater 1 diversion from PV; sources: Eddi; max: 197.532
Source: Eddi
DatekWh
2022*198~18% cover

Yearly DHW heater 1 boost from grid

From data/consolidated/energy/std/h1b/Y/h1b-Y.csv.

Table: yearly DHW heater 1 boost from grid; sources: Eddi; max: 14.738
Source: Eddi
DatekWh
2022*14.7~18% cover

See 16WW energy series datasets.