Some Bits: Nelson's log

8 posts in November 2021

Some solar calculations

I just got solar installed on my roof in Grass Valley, CA. 28 SunPower SPR-A410 Panels for a nominal maximum of 11.5kW. I’m not officially done yet but in testing it seems to be working and I’m enjoying the spectacle of my meter running backwards. Looking forward to getting access to SunPower’s monitoring software and hopefully lots of data.

In the meantime I was curious what to expect for power generation. NREL has an excellent calculator called PVWatts that takes precise details on the panels orientation, location, etc and estimates how much power you’ll generate. It takes into account local weather, various inefficiencies in the system (I’m calculating a total loss of 11.5%), etc. Anyway the final number they give me is just about 15,000 kWH in a year. The proposal estimated 10% more but that could easily just be different assumptions about efficiency. The system is sized to just about zero out my historical usage over the course of a year and take full advantage of PG&E net metering.

How about monthly variance? November works out to 22kWH per day in November or an average of about 900W. And what about variance over time of day? Here’s a curve of total insolation from this calculator; this doesn’t include factoring the orientation of the panels.

PVWatts doesn’t have a nice display for this, but they do let you download per-hour calculations for the entire year. Here’s an excerpt for today

HourWatts
07:00195
08:00456
09:00775
10:001968
11:002579
12:003578
13:003619
14:005147
15:002705
16:001060

Interesting how skewed this is to the afternoon; I assume it’s because my panels are at an angle on a west-facing roof.

Anyway that’s all theoretical calculations. I’m excited to get actual measured outputs and compare. Soon!

Android phone migration doesn’t work very well

I got a new phone, replacing my Pixel 3 (my first Android phone) with a Pixel 6 Pro. So far mostly so good; the new phone is nice. It’s too big IMHO but that’s the trend.

I am surprised at how bad the migration tool was moving data from my old phone to my new one. I think moving from my iPhone to the Pixel 3 worked better than this Pixel upgrade, although perhaps I had low expectations the first time.

The good

It’s simple enough to get the transfer going. Plug the two phones together (USB-C means no bizarro cables), press some buttons, and it’s off. It completed very quickly.

All the Google services moved seamlessly. Gmail, Android backups, Photos... no problems with any of that. Damn well better not be!

Getting Verizon to provision the new phone was also relatively easy. I finally can use an eSIM, so that’s nice, although I never could find IMEI2 in the software settings anywhere. (I had to read the tiny numbers off the box). Verizon basically just has you paste in the IMEI and do some auth stuff and they just transfer phone service over. Slick! (There was a caveat early in the Pixel 6 release you had to tell Verizon to set you up with a non-CDMA phone or else SMS didn’t work. I don’t seem to have needed to do that, and indeed that discussion says this was fixed.)

The bad

Google slammed me out of Firefox, switching my default browser back to Chrome. Funny how that happens. It’s an illegal monopolistic practice, btw, and one we used to complain about loudly at Google when Microsoft did it.

My Google Pay sort of carried over? My credit card is there but I had to reauthorize it. My California vaccination record which I’d laboriously gotten into Google Pay awhile back did not.

Almost no app state copied over. I mean some did; I have all my old text messages, for instance. Aegis also managed to bring all my (encrypted) 2FA tokens over (there’s an explicit preference to enable this). But lots of apps didn’t. For example both dict.cc and Kiwix download 100MB+ databases and cache them to let you read things offline. Those databases did not get transferred over. It seems pretty random what did and what didn’t. I can’t tell if this is just bugs / old design in some apps or if the migration tool is weirdly selective. Given all the changes to Android file semantics over the years I’m gonna guess old design.

No app logins carried over. Everything - Twitter, my bank, Lyft, etc - all require I log in again. No doubt this is “for security” but it’s a very bad user experience, there’s probably 50 logins I have to do. And really how much security is this providing? Many of these are for services where I don’t really use the app regularly but rely on notifications instead. I’m having to go through every single installed app and log them in one at a time.

Logging in the apps reminds me just what a shitty user experience usernames and passwords are. It’s 2021 and that’s still the best we can do? I’ve got 1Password set up, and in theory it’s integrated in to Android as a keyboard. Some apps prompt me to “fill with 1Password”, but I’d say only 25%. And some of those will only prompt with username or password but not both. Also inconsistently; second time I try the password field will prompt me to press a button for the 1Password fill. Mostly though I am just cut and pasting awkwardly between two Android apps. It’s terrible.

I’m sort of over the hump doing all this. I’m to the Ms in my apps making sure each one works on the new phone. No real surprises along the way, it’s just a terrible chore. Android really could make this better.

I’m grouching about Android but my memory of iOS was it was about the same migrating between iPhones.

Escaping Authy: migrating OTP tokens

I’m getting a new phone and decided to stop using Authy and use Aegis Authenticator instead. Authy’s been fairly good but I worry about it as a product. It’s not Twilio’s business. Also it’s closed source. Aegis Authenticator is a nice open source alternative with thoughtful features. Its main drawback is it’s Android-only; no iOS, no desktop apps. Works for me but may not for you.

Authy was an improvement because it offered a way to migrate data to a different Authy install. Unfortunately it does not support a proper open export option. For security, they say, which may be true but also means you’re locked in. So instead of having a managed export we’re reduced to using some scary third party Go program or Javascript pasted in from a Gist. As if that were more secure.

I went with the Javascript; the method that worked for me is documented here. (See the discussion below for updates.) This is an update on an older method that relied on hacking the Chrome extension to get the data out of it. That extension no longer exists but happily the desktop app is just a wrapper for a webapp, a wrapper that supports a debug console. The method boils down to “get to the console and then paste a script which will render a bunch of QR codes you can scan”. Scary and hacky, but it seems to work.

I was able to do all this with Authy Desktop for Windows using Google Chrome. Firefox might or might not work; I couldn’t figure out how to get to the console for the main.html there so using Chrome was easier. I then scanned the resulting QR codes into Aegis and it’s working.

Aegis is nice, btw. It supports various options to backup (encrypted) to JSON files that presumably anything could read.

Update: once you’ve migrated you probably want to delete your Authy account to remove the data they have in cloud storage. It’s pretty easy and they have a thoughtful tool, although note there’s a 30 day wait for it to actually be deleted. The one wrinkle is Authy also has a special unique 2FA protocol, you can recognize it from the 7 digit codes. my529 uses it. I was able to migrate this code to Aegis and log in with it. But Authy’s site and the existence of online authentication protocols makes me think deleting your Authy account may also disable this token behind the scenes. The Authy app recommends you disable it yourself; I changed my529 to use a standard HOTP style token.

Fixing syncthing apt repository

It’s been six weeks since the Let’s Encrypt certificate expiration debacle and I’m still finding errors. This one today from running apt update

Err:3 https://apt.syncthing.net syncthing Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 82.196.13.137 443]
Reading package lists... Done
E: The repository 'https://apt.syncthing.net syncthing Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

The problem is syncthing is signing with a certificate in the expired chain. Or rather used to be. I tried various cargo cult solutions that did not work. The one that did was running apt install ca-certificates. That package was already installed but the command also forces an upgrade. Probably just running apt upgrade would have fixed it so the next apt update would have worked, too.

I’m fascinated by all the systemic failures from the certificate expiry. The Let’s Encrypt team thought carefully and tried really hard to head off problems. They failed. I found this one post-mortem but honestly there’s a masters thesis in systems complexity in analyzing all the global failures.

Propane stoves do not produce soot

This came up on Twitter again today; do gas stoves produce soot? As measured typically in PM2.5, small carbon particles. The answer is no, at least not if your stove is working right.

The graph above is from my Kaiterra Laser Egg (with CO2 sensor) sitting about 10 inches from the burner on a Wolf CG365P/S/LP. I ran the hot burner - 18000 BTU - at full blast with no ventilation. It was turned on for 25 minutes at 10:07 am. As you can see in the graphs above there’s a noticeable increase in CO2 and temperature, but no PM2.5. None. (The CO2 rise is significant but on the order of what my body produces when I sit down near the sensor.)

I trust this sensor; here’s the PM2.5 levels from the same sensor (but 40 feet away) yesterday. We browned some meat about 7pm, which does create soot. I think that’s why people think their gas stoves create soot; they burn something and then blame the fuel, not the food.

Image

Note this is a propane stove, not natural gas, and that may make a meaningful difference. Propane is pretty much pure C3H8 and as long as there’s enough oxygen it burns clean, producing CO2 and water. There is an incomplete combustion that produces carbon monoxide and soot; that shouldn’t happen in a house and in fact the CO could kill you if it’s bad enough. Natural gas is a more complex fuel with various hydrocarbons. I don’t have a natural gas stove handy to test with.

There are other reasons to be concerned about gas stoves. Primarily global warming; that CO2 it puts out is a problem. An electric stove powered by renewables is better for the climate. But in a typical gas powered American house the gas stove is a relatively small contributor to CO2; the gas heater and hot water heater are far bigger contributors. Heat pumps are a higher priority than induction cooktops IMHO.

The other problem with gas stoves is other pollutants, particularly NO2. I’m not quite sure where that comes from, the fuels themselves contain no nitrogen, but presumably there’s contaminants or maybe some side effect with atmospheric nitrogen. From what I’ve read this threat is mostly theoretical and can be managed just by venting your stove to the outside.

I’d be remiss to not point out this article which directly says gas stoves alone put out PM2.5. That contradicts what I’ve read and my own measurement. More complex is their link to this study which finds that homes that cook with gas tend to create more PM2.5 when cooking. But the study is mixing several factors together: energy source, cooking oil type, cooking methods. It’s not hard to imagine that a screaming hot wok on a gas jet would put out more soot than a pot of soup gently simmering on an induction burner. As with all things environmental, the details get complicated.

Anyway: it’s your scorched bacon that’s making soot in your home, not the gas burner.

Android DNS queries on an idle phone

My phone is a Pixel 3 running the latest Android. It mostly sits idle at home on wifi, I use it maybe 30 minutes to an hour a day at most. A couple of days ago I set it up on NextDNS, an ad blocking DNS provider. One nice thing about NextDNS is it gives you stats about the DNS queries. Here’s some data after about 45 hours.

It’s a lot of total queries! 6000, or about 130 an hour. It gets much quieter at night; the lull in the graph below is between 9pm and 7am. My phone has DND enabled from 10pm to 6am, I suspect that has more to do with the pattern than my actual usage.

31% of the queries were blocked as ads or trackers. Google is by far the biggest surveillance on my phone: Analytics, Ads, and Doubleclick. Urban Airship is second, then Crashlytics. I don’t know if that’s because I’m running Android, own a Google-built phone, or if I just mostly use Google services. Probably some of each, also Google’s monopoly power.

Outside ads the biggest source of DNS queries is still Google; Federated ML is top, Google Play (for the store?), and www itself. The other players are Yelp (geolocated to Japan), something called Rainbow API from the Washington Post (Germany), and Syncthing (India!). No idea why the geographic scattering. These are all services I use regularly, although it’d be nice if they weren’t quite so spammy with DNS. 5 queries an hour for something I don’t directly use seems strange. then again these DNS entries are all set up to expire in 1-5 minutes. And hey, DNS is cheap.

All in all not a lot of huge insights other than the magnitude of DNS traffic. But it’s an interesting view into something I’ve never looked at before.

BTW I like NextDNS. It’s more or less the same as AdGuard’s DNS. But it feels more like a real product. You can also customize exactly what’s blocked with some granularity, there’s a lot of OpenDNS-like features too for safe browsing, parental controls, etc. Blocking Parked Domains is a particularly provocative feature. The free tier gives you 300,000 queries / month which I think is enough for two phones at my current activity level. Unlimited usage for a personal account is only $20/year.

Grafana and InfluxDB: rollups

Now that I have a few months of data some of my Grafana graphs were getting slow. I realized I’d made no provision for data rollups. I’m recording data every few seconds. Great for a detailed graph of the last 24 hours, but far too fine grained for a report for a full year. Clearly I need some data aggregation / rollups, just like rrdtool did 22 years ago.

Joke’s on me: there’s no easy way to do aggregates or rollups in Grafana + InfluxDB. It’s a frequently requested feature, this discussion from 2016 is the most complete I’ve found. No clear answer but the fact it’s still not present (even in InfluxDB 2.0) speaks volumes. To be fair, doing a general purpose rollup is kind of hard, lots of weird corner cases.

InfluxDB does have reasonable support for creating a rollup table yhourself; see the Downsampling and data retention docs. You set up a continuous query to populate records and then a retention policy to delete old data. (Hysterically, the docs suggest you create the retention policy first; those only run every 30 minutes so you’ll probably get lucky!) But that amounts to creating a second table for the downsampled data. Whatever queries that data is then responsible for selecting the right table (or worse, merging data). There’s a variety of hacks for working with this in Grafana; the usual suggestion is to make the Grafana query select from the value of a variable rather than a static data source, then populate the variable appropriately. I imagine this can be made to work but what a PITA!

Looking at my own problem again I realized that I only had a million points at worst; that’s not awesome but why is the system choking on that? InfluxDB is super fast! Turns out my problem was the weird dashboard I’d imported didn’t have any sort of group_by clause defined. The ordinary Grafana boilerplate includes a group_by($_interval) as part of the query. InfluxDB is still having to read all the records but at least it’s only shipping a rolled up version to Grafana. Once I added that back my existing dashboards got speedy again. Problem avoided. That won’t work for a system with a lot of data, but for a small data system it’s fine.

Low temperature cooking: Wolf dual-stack burners

I bought a new gas cooktop, a Wolf Professional Gas Cooktop (CG365P/S). It has “dual stack burners” for low temperature control: in addition to the main burner there’s a lower second burner with smaller holes just below the main burner. Having tested it I’m skeptical how useful this feature this is.

The dual stack presents a question when cooking: do I use the main range or the low range? Where do the temperatures intersect? I tested it by putting on a pot of water and waiting for it to come to equilibrium. This is for the small burner, of which there are three. There’s also a medium and large burner. I tested with the Liquid Propane version of the cooktop; it may be natural gas is different.

160F: Main burner, full low
167F: Low burner, full high
142F: Low burner, full low

So there you have it; the lowest high setting is about the same temperature as the highest low setting. It’s more or less a continuous dial. There’s not a lot of range of temperatures on the low burner.

I should note 160F is really low for cooking. Well below boiling water, of course. Well below a simmer too, that’s about 200F. Here’s some reference temperatures. These might not compare exactly to the temperature I measured in the pot of water. (The temperature on a dry or lightly oiled surface is going to be different than the temperature in water.)

284F: Garlic burns
235F: Soft ball sugar for candy
212F: Boiling water
190F: Slow cooking in an Instant Pot on low
167F: Dual stack burner crossover
160F: Hard boiled egg
160F: Conservative food-safe temperature for some things
150F: Cheese fondue (max temperature)
143F: Soft boiled egg
140F: Safe temperature for holding hot food
132F: Medium rare sous vide steak
130F: Chocolate tempering
120F: Rare sous vide steak

You could sorta sous vide something with this burner! Or use it instead of a double boiler (as the marketing suggests). Honestly, it’s very rare I’d ever need to go below the 160F of the main burner. The only thing I cook this low regularly is French-style slow scrambled eggs (which are delicious but takes patience.)

What I really want is fine control over the temperature range. Gas cooktop manufacturers have started to understand this. While they still market themselves on max output (and hot can be good!) they often talk about low temperature performance, too.

That being said the knob on this cooktop is really not helpful for fine control. There’s a total of 60 degrees given to controlling high to low; on my last cooktop I had 270 degrees. There’s more like 90 degrees of control for the low range, but then there’s so little temperature variance there that’s unnecessary. It’s just a bad UI.

Knowing all this now I’m not sure I would have chosen the dual stack burners from Wolf. Maybe it’s more useful on the larger burners. They’re fine, but they aren’t as useful as I had hoped. Also no doubt they complicate the plumbing. The igniter mechanism is the weak system in these products but now there’s a complicated valve that could go wrong, too.

I should add the environmentally correct position these days is to not buy gas cooktops in the US. Burning gas puts out CO2 and contributes to global warming. It’s not the biggest source of CO2, at most 9% of a typical house, house and water heating are by far the bigger contributions. However gas stoves also put out a lot of NO2, a pollutant that’s not healthy to breathe. That’s a real problem although venting to the outside mostly takes care of it. (NO2 is not a greenhouse gas, although N2O is.) Induction is the new hotness and has excellent precise heat control.