Some Bits: Nelson's log

8 posts in January 2023

More Starlink product failures

Been a bad month for Starlink.

The ISP service had a meltdown a week or two ago, see my previous blog posts. For a week+ there were a lot more dropouts. Then there was a 12 hour period of massive packet loss. My connection fixed itself 2023-01-22 at 22:40 (California time). My guess is they were doing experiments with traffic shaping that failed badly.

Starlink announced last fall they were imposing data caps in December. Then they pushed it back to February. Today, Jan 31, we learn it’s now “April at the earliest”. They don’t actually communicate these slipped deadlines to customers; the only way to learn about it is to read the terms of service document and see if they changed it.

A lot of Starlink v2 folks are finding their dishes are failing this winter. Best guess is it’s the cable connector at the antenna. (It’s a proprietary cable, costs $60-$100, and may not ship for a month+). There’s a lot of suspicion it’s related to dish heating in winter.

Starlink support has never been great but recently got much worse. I submitted a ticket complaining about service quality and it took 13 days to get a response. Lots of reports on the Reddit of a month+ without a response to things like “you said you shipped equipment and didn’t” or “the dish arrived but doesn’t work” or “I’ve been offline for 6 weeks now”. Here’s someone billed for service they haven’t received yet. Folks are starting to file FTC and FCC complaints; those do get a swift reply.

It’s just not going very well over at the Starlink division. It’s so frustrating. The service is an amazing engineering accomplishment. It worked great the first year until the company decided to sell to more customers than they have capacity for. Now it’s nearly unusable in the evenings. And all the execution around the product that you need in a consumer business is just terrible.

Not clear it’s going to improve either. From what I’ve seen they can only find a market in the US with our far-flung lousy Internet infrastructure. Other rich countries in Europe and Asia don’t need satellite Internet because local infrastructure is better. And the places that do need it, most customers can’t afford $100/mo for Internet. They have far too many customers for their capacity in the US and nowhere near enough customers where they have excess capacity. I wonder how much money they’re losing.

UDP metronome vs. Starlink

I created a custom tool for monitoring network connections. Here’s some notes on what I learned from it and what I plan next.

I wrote the tool in a couple of hours. It uses aioudp to send a UDP packet to a server every 100ms or so, the server reflects it back. This very vaguely mimics application traffic. I then log back whether the reply came back in order and how long it took. Data is sent to influx and graphed with Grafana. 1 second timeouts or packets out of order are marked as “errors”.

I left this running with the client behind Starlink and the server on my lightly loaded reliable machine in a datacenter. Quick and dirty and there’s some things I’d improve in the timing of packet sends (it only sends after it receives the last one, so slow RTT means fewer packets), but it got me some data pretty quick. However I’m going to stop running it because it’s kinda sloppy.

Going forward I am going to look at irtt for the network testing. It’s a ~5 year old program that does something similar with UDP to monitor connection latency. But written and tested much more carefully than mine. I haven’t dug into what all it can do but it seems to the task. This experiment made me realize it’s much more useful to graph anomalies and shifts in the general trend, not the basic sequence of successes you expect.

I was a little worried about this high frequency testing but the volume isn’t so bad. My data packets are about 20 bytes, so call it 50 bytes total for the packet (including headers) or 0.5 kbytes/sec or 43 megabytes a day. It’s negligible.

Starlink on a normal day

Here’s a graph of the data after a full day. For each slot I’m graphing the mean RTT and the max/min for the time interval. The scale here is about 1 minute a pixel, so there’s up to 600 packets being measured. Errors peak at about 10, or under 2% packet loss.

I like how this shows the daily congestion so clearly. The heavy line of mean RTT in the second graph is very clear; you can see the latency creep up from 100ms to 150ms in the busy times of day. The max/min also spreads significantly, showing the jitter. (Standard deviation just follows the same trend as mean.) The error rate graph at the top is also illuminating. Unfortunately I screwed up here because most errors are timeouts (1 second) and that delays my dumb code from sending another packet, so at 100% packet loss I’m only possibly getting 60 packets a minute through, not the 600 I intended.

For comparison here is a graph from ICMP pings in the same time interval. This shows roughly the same pattern of evening congestion, particularly in the packet loss red dots. But the picture with mean RTT isn’t nearly so clear. Not sure why that is but I think it’s because of my higher frequency sampling with the metronome; 600 a minute vs. 4 x 5 packets a minute with the pings.

One thing that’s instructive with this high frequency data is to graph every single packet. Here’s 1 minute worth of data representing 400-600 packets during a bad time when 11 of those packets got lost. You can see the spread of latencies is just all over. It should be 100ms but some packets are taking 4x as long.

Starlink’s bad day

I lucked out and got this monitoring running on 2023-01-22 when Starlink was having a bad day. I managed to capture the bad behavior and its fix pretty clearly.

You can see a radical change around 22:40 (22:41:27, precisely). Before then error rates were very high and latency was all over the map. Suddenly it smooths out; almost no lost packets, steady latency, and a lower minimum latency. Starlink changed something. FWIW here’s a closeup of the transition.

Starlink nearly unusable for real time apps

My Starlink connection has tipped over to being unusable for real time apps. It’s still OK for loading web pages although slower than the minimal 20 Mbps service level. But real time apps like gaming are completely broken right now. This is in addition to the weird DHCP problem I blogged about earlier today.

The main overriding problem with Starlink is still congestion. The service gets very slow every evening, bad enough I can’t reliably watch a single TV show on Amazon, Netflix, or Plex. They have oversold their capacity.

The new problem is some weird thing where the whole connection drops out for 1-2 seconds. Lots of reports on Reddit summarized here. It’s mostly gamers who notice this but it must affect video calls too. This feels like a new significant problem and it’s hard to guess what it might be.

I should add that Starlink’s support is terrible. Many folks on Reddit report going weeks with no response. To big simple things like “you said you shipped me hardware but it did not arrive” or “my service has been entirely offline for a week and I suspect my hardware is broken how do I get a replacement?”

Here’s some data monitoring. First a basic ping graph of the particularly bad last hour.

Look at that; 5% packet loss over an hour. Latencies all over the place from 50 to 200ms when it is working. Outages of minutes at a time. It’s not even prime time for congestion yet, still 5-6pm.

Today I wrote a new custom monitoring app I’m calling “metronome”. It sends a UDP packet to a server every 100ms. The server reflects it, the monitor measure round trip time. I wrote this to more closely monitor something like a game application; I don’t love using ICMP ping for connection monitoring. Also it’s nice to have something so high frequency. It’s still a little buggy but giving some useful results. Here’s a graph of that same hour; see those clusters of 200+ms? Ping to that server is about 100ms.

A change?

Edit: woke up this morning to 12 hours of data. Something changed abruptly at about 22:40 (local time); packet loss went way down both on my UDP metronome and my old reliable ping graph. There’s still a wide spread of jitter in the metronome but that slowly improves as it gets towards midnight and later, which is consistent with residential user congestion. The download speed graph at bottom (once an hour) confirms the usual nighttime congestion pattern.

Total guess here but I suspect Starlink is experimenting with traffic shaping algorithms and whatever they were doing before 22:40 was really not working. Either that or something was just broken. Glad to see basically no errors though. There’s no evidence of the 1-2 second microoutages I was seeing this last week. Need to try my game or something to confirm at an application level.

BTW this visualization is very sensitive to how I graph it in Grafana. The green graph at top is drawing max(rtt) every 200ms and leaving it blank / white if there’s no data (the jankiness before 22:40). My app logs data about every 100ms when the network is working, which results in a nice smooth green area after 22:40. I like this but it’s pretty slow & demanding on the graphing software. The usual Grafana graphs average on a time-scale appropriate level, like every 5s in this graph, but then all that averaging gives a very smooth picture that hides the packet loss and jitter. I need more direct visualizations of the variance. The error graph is one measure (it’s just a count of errors per time interval). I should try graphing the literal variance or SD.

Starlink vs Ubiquiti OS: outages with WAN failover

I’ve got a problem that’s recently gotten worse on my LAN. Starlink will stop working and my Ubiquiti router fails over to the backup. But then it never switches back even though it looks like Starlink is up. It appears to be a DHCP failure; my router can’t get an address for the Dishy interface.

Sometimes rebooting the router fixes it; that suggests it’s a UnifiOS problem. Sometimes I have to turn Dishy off for 10+ minutes and then it starts working again, suggesting it’s a Starlink problem. Or maybe it’s more complicated. Today when this happen I rebooted the router but not Dishy. It started working after a minute or three.

This problem has occurred off and on for two years but is now happening about once a day. Rebooting the router seems the best way to get it working again. But I think the problem has fixed itself at least once (after several hours). I may also have had to turn Dishy off entirely for awhile to get things working.

I know from other sources that Starlink’s ground infrastructure has some sort of reset that happens if Dishy is offline for a few minutes, so often unplugging for awhile fixes things. I also know DHCP has to go all the way through the satellite to the Starlink ground station, so if the network is overloaded it’s not as reliable. But this big failure happens at quiet times too, like just now at 7am.. Finally I know UnifiOS also has bugs in its failover system. So many bugs; I probably won’t buy another Ubiquiti product.

An idea for a fix.

I’m trying a fix right now, putting a Netgear ethernet switch between my router and the Dishy PoE injector. I’ve seen signs in the logs that maybe the ethernet link is failing. And coming back, but maybe that’s not working right? I’ve heard other folks suggest a switch may help smooth out problems.

DHCP Logs

I’ve got logs from the router. They are spammy so I’m narrowing in on just the DHCP part like this. grep DHCP *.1.log | grep -v eth1. Here’s what it looks like when things are going well:

2023-01-22T15:02:21,354 <30>Jan 22 07:02:21 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:02:21,440 <30>Jan 22 07:02:21 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T15:04:34,843 <30>Jan 22 07:04:34 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:04:34,918 <30>Jan 22 07:04:34 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T15:07:03,124 <30>Jan 22 07:07:03 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:07:03,208 <30>Jan 22 07:07:03 ubnt dhclient: DHCPACK from 100.64.0.1

Starlink leases are 5 minutes. So the router requests a new address from the 100.64.0.1 endpoint it knows about every 2.5 minutes and all is well.

Here’s what it looks like when it fails:

2023-01-22T15:07:03,124 <30>Jan 22 07:07:03 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:07:03,208 <30>Jan 22 07:07:03 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T15:08:37,364 <30>Jan 22 07:08:37 ubnt dhclient: DHCPRELEASE on eth0 to 100.64.0.1 port 67

2023-01-22T15:08:45,935 <30>Jan 22 07:08:45 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPOFFER from 100.64.0.1

2023-01-22T15:08:52,524 <30>Jan 22 07:08:52 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

2023-01-22T15:09:07,104 <30>Jan 22 07:09:07 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
2023-01-22T15:09:07,171 <30>Jan 22 07:09:07 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:09:07,171 <30>Jan 22 07:09:07 ubnt dhclient: DHCPOFFER from 100.64.0.1

2023-01-22T15:09:14,163 <30>Jan 22 07:09:14 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

2023-01-22T15:09:25,674 <30>Jan 22 07:09:25 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
2023-01-22T15:09:25,766 <30>Jan 22 07:09:25 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:09:25,767 <30>Jan 22 07:09:25 ubnt dhclient: DHCPOFFER from 100.64.0.1

The log starts with one working exchange. Then 1.5 minutes later my router spontaneously sent a DHCPRELEASE out to Starlink. Um, why? After that my router starts DHCP from ground zero, broadcasting DHCPDISCOVER and DHCPREQUEST on the link to 255.255.255.255. It’s lost all DHCP state. It logs that it got a DHCPOFFER from 100.64.0.1 and that’s good, right? But apparently Ubiquiti didn’t like the offer or ignored it because it just tries again in a few seconds. It gets stuck in this state, sending DISCOVER several times a minute, getting offers, and never working.

Here’s what happens after I reboot the router. Starlink didn’t come back right away after the reboot but did start working pretty quickly, within a minute or so.

2023-01-22T16:10:58,089 <13>Jan 22 08:10:58 ubnt shutdown[3967]: shutting down for system reboot

2023-01-22T16:13:28,518 <86>Jan 22 08:13:01 ubnt sudo: pam_unix(sudo:session): session closed for user root
2023-01-22T16:13:28,567 <86>Jan 22 08:13:01 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh -c echo \"LAN\" >/sys/class/net/eth1/ifalias

...

2023-01-22T16:13:34,806 <30>Jan 22 08:13:08 ubnt dhclient: DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 6
2023-01-22T16:13:34,809 <30>Jan 22 08:13:08 ubnt dhclient: DHCPREQUEST on eth2 to 255.255.255.255 port 67
2023-01-22T16:13:34,809 <30>Jan 22 08:13:08 ubnt dhclient: DHCPOFFER from 10.33.1.1
2023-01-22T16:13:34,811 <30>Jan 22 08:13:08 ubnt dhclient: DHCPACK from 10.33.1.1

2023-01-22T16:14:16,367 <30>Jan 22 08:13:49 ubnt dhclient: DHCPREQUEST on eth2 to 255.255.255.255 port 67
2023-01-22T16:14:16,381 <30>Jan 22 08:13:49 ubnt dhclient: DHCPACK from 10.33.1.1

2023-01-22T16:14:16,408 <30>Jan 22 08:13:49 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T16:14:16,470 <30>Jan 22 08:13:49 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T16:16:14,856 <30>Jan 22 08:16:14 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T16:16:14,912 <30>Jan 22 08:16:14 ubnt dhclient: DHCPACK from 100.64.0.1

So the system requests reboot at 08:10:58 and finally reboots at 08:13:01. 7 seconds later it makes a DHCP request on eth2; that’s my backup WAN. It works. No hint of anything on eth0, the primary WAN which Dishy is plugged into. Why? But it gets around to asking for eth0 at 08:13:49, 41 seconds later, and it works. Another routine request succeeds at 08:16:14. We’re back online with Starlink.

More logs

Those samples above are all logs filtered on “DHCP”, but maybe important stuff is hiding in the other log spam. Here’s more detailed logs of the failure around 07:08:37 when the mystery DHCPRELEASE happened. Still doing a bit of filtering egrep -v 'mcad|ipsec|pam_unix' *.1.log

2023-01-22T15:07:03,124 <30>Jan 22 07:07:03 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:07:03,208 <30>Jan 22 07:07:03 ubnt dhclient: DHCPACK from 100.64.0.1
2023-01-22T15:07:07,613 <30>Jan 22 07:07:07 ubnt dhclient: bound to 100.103.201.245 -- renewal in 115 seconds.

2023-01-22T15:08:35,284 <30>Jan 22 07:08:35 ubnt netplugd[3542]: eth0: state ACTIVE flags 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000 -> 0x00001003 UP,BROADCAST,MULTICAST
2023-01-22T15:08:35,284 <190>Jan 22 07:08:35 ubnt zebra[753]: interface eth0 index 2 changed <UP,BROADCAST,MULTICAST>.
2023-01-22T15:08:35,284 <30>Jan 22 07:08:35 ubnt netplugd[25603]: /etc/netplug/netplug eth0 out -> pid 25603
2023-01-22T15:08:35,293 <5>Jan 22 07:08:35 ubnt kernel: eth0: Link down

2023-01-22T15:08:35,951 <181>Jan 22 07:08:35 ubnt wlb: wlb-wan_failover-eth0 wlb-wan_failover-eth0 reachability failed, failover
2023-01-22T15:08:35,951 <181>Jan 22 07:08:35 ubnt wlb: group wan_failover, interface eth0 going Inactive
2023-01-22T15:08:36,211 <181>Jan 22 07:08:36 ubnt wlb: group wan_failover, interface eth2 going Active
2023-01-22T15:08:36,258 <13>Jan 22 07:08:36 ubnt wan-event: [WAN Transition] eth0 to state inactive
2023-01-22T15:08:36,659 <13>Jan 22 07:08:36 ubnt wan-event: [WAN Transition] eth2 to state active
2023-01-22T15:08:36,671 <86>Jan 22 07:08:36 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/conntrack -F

2023-01-22T15:08:37,260 <86>Jan 22 07:08:37 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/dhclient -q -cf /var/run/dhclient_eth0.conf -pf /var/run/dhclient_eth0.pid -lf /var/run/dhclient_eth0.leases -r eth0
2023-01-22T15:08:37,324 <30>Jan 22 07:08:37 ubnt netplugd[3542]: eth0: state OUTING flags 0x00001003 UP,BROADCAST,MULTICAST -> 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000
2023-01-22T15:08:37,324 <190>Jan 22 07:08:37 ubnt zebra[753]: interface eth0 index 2 changed <UP,BROADCAST,RUNNING,MULTICAST>.
2023-01-22T15:08:37,333 <5>Jan 22 07:08:37 ubnt kernel: eth0: 1000 Mbps Full duplex, port 0
2023-01-22T15:08:37,364 <30>Jan 22 07:08:37 ubnt dhclient: DHCPRELEASE on eth0 to 100.64.0.1 port 67

2023-01-22T15:08:38,875 <86>Jan 22 07:08:38 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/ip route add 0.0.0.0/0 via 100.64.0.1 table 201
2023-01-22T15:08:38,965 <86>Jan 22 07:08:38 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/ip route add blackhole 0.0.0.0/0 table 201 metric 256
2023-01-22T15:08:39,707 <30>Jan 22 07:08:39 ubnt ntpd[2874]: Deleting interface #36 eth0, 100.103.201.245#123, interface stats: received=58, sent=58, dropped=0, active_time=6861 secs
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 65.108.121.104 interface 100.103.201.245 -> (null)
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 205.206.70.42 interface 100.103.201.245 -> (null)
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 103.242.68.69 interface 100.103.201.245 -> (null)
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 144.76.76.107 interface 100.103.201.245 -> (null)

2023-01-22T15:08:41,079 <86>Jan 22 07:08:41 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/ubnt-add-connected.pl
2023-01-22T15:08:41,610 <86>Jan 22 07:08:41 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/rm -f /var/run/dhclient_eth0.pid
2023-01-22T15:08:42,643 <86>Jan 22 07:08:42 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/opt/vyatta/sbin/vyatta-interfaces.pl --dev eth0 --restore-ipv6
2023-01-22T15:08:44,308 <30>Jan 22 07:08:44 ubnt netplugd[3542]: eth0: state OUTING pid 25603 exited status 0
2023-01-22T15:08:44,309 <30>Jan 22 07:08:44 ubnt netplugd[25761]: /etc/netplug/netplug eth0 in -> pid 25761
2023-01-22T15:08:45,718 <86>Jan 22 07:08:45 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh -c /sbin/dhclient -q -nw -cf /var/run/dhclient_eth0.conf -pf /var/run/dhclient_eth0.pid  -lf /var/run/dhclient_eth0.leases eth0  2> /dev/null &
2023-01-22T15:08:45,935 <30>Jan 22 07:08:45 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPOFFER from 100.64.0.1

I’ve put line breaks in logical groupings. Group 1 is a normal good DHCP exchange. Group 2 is 90 seconds later and looks like eth0 spontaneously went down. There’s nothing in the logs to explain why that might have happened. Group 3 is the failover system correctly realizing eth0 isn’t working and switching me to my backup WAN, eth2. Group 4 is eth0 coming back up just about 2 seconds after it went down. Note that the router sends the DHCPRELEASE at the end of this little group.

It then takes a good 7 seconds until the last group when the router sends a DHCPDISCOVER out the Dishy interface. Why so long? And even though it gets a DHCPOFFER reply immediately the router doesn’t seem to use it. And then we’re back to the logfile above; there’s no extra info in the extended logs to shed light on why it’s not accepting the offer.

So my guess of what’s going on based on these logs is..

  • Hardware gremlins cause eth0 to fail
  • The router correctly shuts down the eth0 interface and fails over
  • eth0 comes back up 2 seconds later
  • The router correctly releases the DHCP lease, then tries to get a new one
  • Starlink ?correctly? sends a DHCP offer as soon as asked
  • The router bugs out and fails to use the lease. It keeps trying several times a minute.
  • I have to reboot the router to fix it, or it magically fixes itself after minutes / hours.

These are all pretty rough guesses though. I’m poking at two black boxes with one crappy logfile as my only evidence. Anyway I put a switch in the path to maybe help defend against hardware gremlins. We’ll see. Update: so far so good, 7 days without a disconnect. OTOH the old setup used to go a week+ without a problem too so not certain. I’ve seen other failovers but nothing related to eth0 going down.

eth0 goes down a lot

I should note that eth0 seems to go down a lot; several times a day. But not every day? There’s a gap of a whole week where it never once went down, then another gap of a day+. Super weird. Anyway the DHCP failure doesn’t happen every single time eth0 goes down.

# grep -h 'eth0: Link down' *.1.log* | sort -n

2023-01-10T11:27:19,663 <5>Jan 10 03:27:19 ubnt kernel: eth0: Link down
2023-01-10T11:27:36,793 <5>Jan 10 03:27:36 ubnt kernel: eth0: Link down
2023-01-10T13:22:33,664 <5>Jan 10 05:22:33 ubnt kernel: eth0: Link down
2023-01-10T15:17:28,666 <5>Jan 10 07:17:28 ubnt kernel: eth0: Link down
2023-01-10T17:12:23,981 <5>Jan 10 09:12:23 ubnt kernel: eth0: Link down

2023-01-18T02:22:33,753 <5>Jan 17 18:22:33 ubnt kernel: eth0: Link down
2023-01-18T04:52:05,885 <5>Jan 17 20:52:05 ubnt kernel: eth0: Link down
2023-01-18T05:02:24,905 <5>Jan 17 21:02:24 ubnt kernel: eth0: Link down
2023-01-18T07:48:57,901 <5>Jan 17 23:48:57 ubnt kernel: eth0: Link down
2023-01-18T09:43:53,337 <5>Jan 18 01:43:53 ubnt kernel: eth0: Link down
2023-01-18T11:38:48,875 <5>Jan 18 03:38:48 ubnt kernel: eth0: Link down
2023-01-18T13:33:44,726 <5>Jan 18 05:33:44 ubnt kernel: eth0: Link down
2023-01-18T14:58:30,367 <5>Jan 18 06:58:30 ubnt kernel: eth0: Link down
2023-01-18T14:59:01,387 <5>Jan 18 06:59:01 ubnt kernel: eth0: Link down
2023-01-18T16:53:56,208 <5>Jan 18 08:53:56 ubnt kernel: eth0: Link down
2023-01-18T17:02:20,938 <5>Jan 18 09:02:20 ubnt kernel: eth0: Link down
2023-01-18T19:29:46,174 <5>Jan 18 11:29:46 ubnt kernel: eth0: Link down
2023-01-18T21:24:42,410 <5>Jan 18 13:24:42 ubnt kernel: eth0: Link down
2023-01-18T23:19:38,480 <5>Jan 18 15:19:38 ubnt kernel: eth0: Link down
2023-01-19T01:14:34,209 <5>Jan 18 17:14:34 ubnt kernel: eth0: Link down
2023-01-19T03:09:29,842 <5>Jan 18 19:09:29 ubnt kernel: eth0: Link down
2023-01-19T05:04:25,189 <5>Jan 18 21:04:25 ubnt kernel: eth0: Link down
2023-01-19T06:59:19,270 <5>Jan 18 22:59:19 ubnt kernel: eth0: Link down
2023-01-19T08:54:14,486 <5>Jan 19 00:54:14 ubnt kernel: eth0: Link down
2023-01-19T10:49:11,733 <5>Jan 19 02:49:11 ubnt kernel: eth0: Link down
2023-01-19T12:44:05,754 <5>Jan 19 04:44:05 ubnt kernel: eth0: Link down
2023-01-19T14:39:02,849 <5>Jan 19 06:39:02 ubnt kernel: eth0: Link down

2023-01-21T11:04:04,617 <5>Jan 21 03:04:04 ubnt kernel: eth0: Link down
2023-01-21T12:59:17,757 <5>Jan 21 04:59:17 ubnt kernel: eth0: Link down
2023-01-21T14:54:11,780 <5>Jan 21 06:54:11 ubnt kernel: eth0: Link down
2023-01-21T16:49:09,336 <5>Jan 21 08:49:09 ubnt kernel: eth0: Link down
2023-01-22T11:18:27,227 <5>Jan 22 03:18:27 ubnt kernel: eth0: Link down
2023-01-22T11:18:44,227 <5>Jan 22 03:18:44 ubnt kernel: eth0: Link down
2023-01-22T13:13:40,293 <5>Jan 22 05:13:40 ubnt kernel: eth0: Link down
2023-01-22T15:08:35,293 <5>Jan 22 07:08:35 ubnt kernel: eth0: Link down
2023-01-22T15:59:57,613 <5>Jan 22 07:59:57 ubnt kernel: eth0: Link down

Tools for writing simpler English

I want to improve my writing by making it simpler, stripping unnecessarily fancy words and complex sentence structures. There’s a lot of room for nuance here, I want automation to make suggestions for things that can be improved, not an automatic rewrite. Here’s some tools I found, see also this Ask Metafilter discussion.

Hemingway Editor is the best of the lot I’ve tried so far. It has an excellent UI. Its suggestions are helpful and clear without being overbearing. It catches things I like to fix. Also it’s fast. The whole thing is running in the browser, your text is not sent back to a server for analysis. Some suggestions it makes: using fewer adverbs, avoiding qualifying language, nonspecific language, passive voice, and complex words. The webapp appears fully free with no upsell. They sell a desktop editor app in a low key way.

Readable.com looks similar to Hemingway but a little more transparent in its heuristics and with a UI not quite as nice. There’s more emphasis on metrics: academic sounding things like “Flesch-Kincaid Grade Level”. Also counts of words and sentences. There are counts of cliches and adverbs. No highlighting of passive voice. The app shuttles you into a login or commercial version pretty quick.

Grammarly is the best known tool I’ve seen and has an emphasis on “correct” grammar. The free version doesn’t seem to offer much. The premium version promises to provide some fairly subtle types of editing depending on your goal; the domain and expertise of your audience, etc. I can’t evaluate how good the suggestions are without paying. (Even the free version requires a signup to use, ugh.)

Globish is a nice simple tool that simplify highlights which words in text are not part of a dictionary of 2000 “globish” words, presumably simple English that’s widely understood. I appreciate its straightforwardness but am not sure how useful it is to me.

Simplish tries to translate English text to Simple English, a formal subset of English that goes back nearly 100 years. It’s pretty idiosyncratic though, and I’m not sure (for instance) translating “mobile app” to “things not fixed telephone operation” is particularly helpful. It’s a valiant effort though! There’s other online apps in this vein: Online-Utility, Rewordify, Article Simplifier. The last is a garbage SEO tool, I should have realized that SEO folks would want to remix text like this easily.

3 scripts: a sort of simplest possible thing. Three shell scripts to identify problems in language. Boils down to grepping for problematic words and something that finds duplicate words. Mentioned mostly as an example of how even something very simple can be useful.

What is Hemingway Editor doing?

Some notes on a very light investigation to the browser version. Like I said above, it all runs in Javascript. It was mostly written in 2013, last update in 2017.

Source code is obscured. The oldest version I could find was 74kb of obfuscated Javascript. The current code is 77k and while no longer obfuscated, is minimized. Scanning through this code there’s at least some UI stuff here, I’d guess very little of that 77k is linguistics. Maybe just some straightforward heuristics?

At least some function names are intact in the minimized source code. You can see some numerical scoring functions there like countSentences and countLetters; “getReadingLevel” seems to be a simple arithmetical function of those counts. There’s also tables for heuristics. 150 or so suggestions for replacing complex words like “acquire” with “get”. Another 100 suggestions for passive voice; replace “written” with “wrote”. (There’s also a search for words like “is” or “were” which I think is how it scans for passive.) There’s a table of 150 or so adverbs to avoid. And maybe 40 or so qualifying language phrases like “I hope to”.

All in all it looks like some fairly simple analysis of the text with no fancy parsing or inference of meaning. But packaged very well into a simple product that provides clear suggestions. May be simple, but good!

Speculation on machine learning models

I suspect simple heuristics can get you a long way, as I think Hemingway demonstrates. I bet there’s more academic work in this area that would have good ideas. I know there’s a lot of work on measuring text readability: even something as simple as a UI that highlights readability score for every sentence might be useful.

Large language models are what I’m really curious about. What could GPT-3 do when brought to bear on the problem of simplifying an input text? There’s been some explorations of that idea but a lot of the focus has been on summarization. Or elaboration, SEO spam stuff to write things bigger / faster / in duplicate. But I took a quick try with ChatGPT.

First I asked ChatGPT “Please write a simpler version of the following essay” and pasted in a five paragraph blog post I’d already polished with Hemingway App. It did a pretty good writing a summary. A lot is lost but the gist is there and it’s definitely a lot shorter and simple to read. Amusingly ChatGPT emitted a few compound sentences (with comma errors?) of the type I’m trying to avoid.

I found a weather app called Windy that I really like. It’s available for mobile phones and has extra features like notifications and widgets for the home screen. The app also has a good design and layout. Windy shows information about wind speeds, radar, air quality, and thunderstorms. I also like the forecast view, which gives a lot of detail, like the weather forecast by hour for several days. Windy’s business model is a yearly subscription that costs $19 per month, and they promise not to share or sell your data to third parties. However, the app doesn’t have a feature like Dark Sky, which provides very specific and short-term forecasts.

But I don’t want my text rewritten, I just want suggestions. I got further by asking “please tell me which sentences in the following essay are too complicated and why. what is wrong with my writing?”. It gave me back a list of things, a couple examples:

“Also its UI is a little more understandable.” The use of “also” and “a little” could be more clearly defined.

“It’s a lot of detail packed into a very small tabular display.” This sentence might be confusing for readers who are not familiar with the concept of a tabular display.

“It’s all very nerdy in the way I want.” This sentence is subjective and may not be relatable to all readers.

I don’t agree with all the criticisms: my readers do know what tabular display is and the “nerdy” thing is supposed to be subjective and will be relatable. But they’re valid criticisms for generic writing, OpenGPT just doesn’t quite have my blogging context. Which is why an interactive tool is so important; I want to choose which suggestions I take myself, not just do what the robot says. Still it’s a remarkably good start and I think with the right interactive UI this approach could be quite fruitful.

Linkblog stats

I got an archive view of my linkblog working; 20,000+ links over 19 years!

Here’s a dump of links per year. I’ve been pretty consistent.

2003 477
2004 1487
2005 1218
2006 912
2007 1011
2008 665
2009 757
2010 815
2011 1463
2012 1182
2013 1010
2014 1168
2015 1007
2016 979
2017 1453
2018 1311
2019 915
2020 1133
2021 809
2022 927
2023 17

To generate some rollup stats in my database:

create temporary table stats as select year, month, count(year) as count from (select strftime("%Y", ts, "unixepoch") as year, strftime("%m", ts, "unixepoch") as month from links) group by year, month;

A full year of solar

I’ve had my solar system for just about a year now, time to collect full data.

In 2022 PG&E says I netted -1670 kWh. I used 16,000 kW in 2020 and 2021, so I generated about 17,700 kWh this year. Or just about 10% over my usage. My electricity bill should be 0, or maybe even a tiny bit negative.

My solar system was designed to generate 16,600 kWh a year (with 28 * 410W = 11.5kW of panels). So I generated about 7% more power than expected. Not complaining! I am also glad to be generating a bit more power than I use because I intend to convert to electric heat pumps and cars eventually. Although I don’t really have that much excess power...

Above is a graph of daily net power, based on PG&E’s data. You can see the seasonal effect very clearly. I’m net negative quite a bit in spring and summer. I start using more than I make in August and September, to run the air conditioner. (I was out of town in October, hence much less power usage.) I go full net positive once the days get shorter and the sky gets cloudier. It’s nice that my NEM 2 rate plan nets me out over a full year; it’d suck if they trued up once a month.

I was hoping to have better data with the fancy PVS6 monitoring software I built. That worked great right until the day the PVS6 died, stopped talking to the Sunpower servers. No idea what happened there. They eventually just replaced it for me and I haven’t plugged in my little Raspberry Pi to exfil the data since. I have no idea if my monitoring broke it but I don’t want to chance it. Honestly the kind of minute-by-minute data I was getting from the system isn’t very useful anyway, daily summaries are good. Sunpower’s website should give me that but like I said, only started getting good data in September. (Also their website is awful but I bet there’s a data download somewhere.)

Very glad I got solar, wish I’d done it sooner. My system will pay for itself in about 7 years total. The deal under NEM 3 isn’t nearly as good for California consumers, I’m lucky to have gotten in when I did.

Update: true-up bill

Got my bill which contains the full year’s “true-up” for my NEM 2 solar system. I don’t honestly understand much of this. But they agree that I supplied about 1800 kWh more power than I used and paid me the $0.06/kWh or so I expect. (Note they charge $0.40/kWh for the same electricity, but at least I zeroed that part of the bill out.) Also something like $5/mo for delivery charges, eh.

UPS battery replacements by size

Replacing the lead acid battery in a Cyberpower 1000AVR. Officially the battery is called a “RB1290”. It is is 12 volts, 9 amp-hours, dimensions are 5.92 x 2.53 x 3.69 inches. There are a zillion options for replacements at half the price of the OEM battery, the keyword is “1290”. I ordered this one.

What caught my attention is there’s folks out there selling replacement batteries with different specs. 12V/8Ah, 12V/7.5Ah, ... Presumably as long as it’s 12V and fits in the space, it will work. What I don’t know is what practical impact lower capacity has. Does the Cyberpower firmware measure capacity somehow? Or is it programmed to expect a 9Ah battery and thus will confuse everyone when it runs out of juice earlier than expected? I suspect it will still just work, they measure remaining capacity with voltage or something.

The 1000AVR is rated for 600W and 9 minutes at half load. That suggests it has 90Wh of capacity for AC power. The battery’s DC specs are 108Wh, so that’s in the same ballpark. They also sell a bigger 1500AVR with two 1280 or 1290 batteries. That’s 900W or 12 minutes at half runtime, or 180Wh. So the math all makes sense.

Can I buy a higher capacity battery that will fit? Probably no. This site lists a lot of options for 12V batteries that are the same size, ranging from 7AH to 9AH. The 7AH batteries are a tiny bit cheaper ($13 vs $15) but I can’t imagine why you’d pick that.

Some previous notes from me. My new favorite UPS is a CyberPower CP1500PFCLCD PFC Sinewave. Looking now I see someone sells a DC-only UPS for routers, USB devices, etc. Interesting product! The category seems to be called “mini UPS” and Amazon has several choices.

Bonus link: Replacing a UPS Battery With Super-Capacitors