My Smart Meter Went Quiet for Ten Days: a 1,094-Day Client Certificate and IEEE 2030.5
Vicente Louvet
- 7 minutes read - 1391 wordsTwo sensors in Home Assistant had polled my electricity meter every five seconds for two years. One afternoon they both went unknown and stayed that way for ten days before I noticed. Nothing had changed on my side: no update, no restart, no config edit. The meter was still answering other hosts on the LAN. And yet it had quietly stopped talking to me.
The culprit was a client certificate I generated in 2023 with a script that handed it exactly three years of life. When it expired, the meter rejected every poll with a TLS alert, and Home Assistant just logged Command failed (with return code 1) every five seconds until it ran out of curiosity. This post is the post mortem: how the meter’s local IEEE 2030.5 interface actually authenticates, why a cumulative register quietly books ten days of power into a single hour, and what I’d check first next time.
The setup #
If you already run Home Assistant, picture an ordinary install. Mine is a Home Assistant Green running HA OS, Core 2026.10.x at the time of the fix, on .18 — a sealed appliance I don’t think about. The electricity meter is an Itron Gen5 Riva smart meter from Xcel Energy, and here’s the part that matters: it exposes a local IEEE 2030.5 (Smart Energy Profile) endpoint over Wi-Fi.
- HTTPS on port 8081, TLS 1.2 only.
- It insists on exactly one cipher:
ECDHE-ECDSA-AES128-CCM8. - It wants an ECDSA client certificate that you generate yourself and register with the utility.
Registration works by a thing called LFDI: the first 40 hex characters of the certificate’s SHA-256 fingerprint, entered on the utility’s “manage meters and devices” page as a device of type “other.” The meter will then accept that certificate.
In Home Assistant that becomes two command_line sensors polling every 5 seconds with curl, one for the consumption register (kWh, total_increasing, endpoint /mr/3/r) and one for instantaneous power (W, /mr/1/r):
command: >
OPENSSL_CONF=/config/openssl.cnf curl -s --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure
--cert /config/cert.pem --key /config/key.pem https://<meter>:8081/upt/1/mr/3/r
The custom openssl.cnf is required because the cipher is below modern TLS defaults, which OpenSSL will refuse out of the box. Long-term statistics have recorded since 2024-11, and the recorder is Postgres on .21. For two years, it just worked.
The afternoon it went quiet #
On 2026-10-21 at 16:36:36 local time, both sensors went unknown simultaneously. Every poll since logged Command failed (with return code 1). The house’s energy dashboard — which I’d come to trust as reliable as anything — went to a flat line.
I did not notice for ten days. unknown is not an error state. Nothing alerts on it. The dashboard doesn’t blink or beep; it just draws a straight line where a history used to be. If you’re nodding along, you already know where this is going.
The useful data point: Home Assistant had not been updated or restarted. The same Core container had been running since 10-14, a week before the outage. And the meter still answered another host on the LAN that had its own, newer certificate. So it wasn’t the meter, and it wasn’t Home Assistant.
Diagnosis #
Home Assistant’s SSH add-on is where this gets done. Two things to know about that add-on: inside it, the config directory is /homeassistant, not /config, and it ships both openssl and curl. The whole fix happens in there.
First command, check the certificate dates:
openssl x509 -noout -dates -in /homeassistant/cert.pem
notBefore=Oct 23 22:36:32 2023 GMT
notAfter=Oct 21 22:36:32 2026 GMT
There it is. 1,094 days, two days short of three years. The next curl confirmed it: the meter answered with TLS alert, bad certificate. The certificate I’d been handing it for two years had expired that afternoon at 16:36 local, and polls had been rejected ever since.
The certificate came from a script I ran in 2023. It’s from the community project xcel_itron2mqtt — scripts/generate_keys.sh — which at the time issued 3-year certificates. The interesting part is that the repo fixed this in spring 2026. On 2026-04-21 it changed the lifetime to 7,300 days (issue #50, PR #51), after other users hit the same wall. I’d generated mine two and a half years before the fix and was carrying the bug it was created to cure.
The fix #
Three steps, none of which required touching the Home Assistant configuration:
- Generate a new ECDSA key and a 7,300-day self-signed certificate in the add-on, keeping the old pair renamed with an
.expired-2026-10-21suffix. - Compute the new LFDI — the first 40 hex characters of the new certificate’s SHA-256 fingerprint — and add it as a new device on the utility’s “manage meters and devices” page. The dialog warns it can take up to 5 business days to propagate.
- Nothing else. The
command_linesensors re-read their files on every poll, so no Home Assistant restart was needed.
The meter accepted the new certificate in about 10 minutes, not the five business days the dialog warned about. Resolved 2026-10-31 at 14:59 local. The consumption register resumed at 32,847.922 kWh.
Ten days in one hour #
Here’s the part that costs nothing to fix and everything to understand. The meter’s register is cumulative — it only ever counts up. Home Assistant’s last good value was from 10-21; the new value arrived on 10-31. The roughly 195 kWh consumed while the sensors were silent got booked into a single hour.
Let me repeat that differently. Ten days of my house’s power usage, everything that ran between 10-21 and 10-31, collapsed into one bar on the chart at 14:00 on 10-31. With a total_increasing sensor there is no honest way to spread that back over the ten days it actually happened. The per-hour history for that stretch is simply gone, and pretending otherwise would be inventing data. That flat line on the dashboard was never just cosmetic; it was the truth of what I lost. The 195 kWh is real; the ten days of shape behind it isn’t recoverable.
What I would do differently #
Each of these is cheap, and together they turn a ten-day blind spot into a fifteen-minute fix.
Check certificate dates first when a TLS client that has worked for years starts failing with no change on either end:
openssl x509 -noout -enddate -in cert.pemOne line. It would have found this before the curl did.
Alert on
unknown. A sensor that has reported every 5 seconds for two years goingunknownfor an hour is an incident, not a state. The Energy dashboard treats it as neither.The new certificate expires in 2046. A calendar entry is cheaper than a repeat.
Longer-term, not done: the native integration ha-ieee-2030-5 warns 60 days before expiry and lets a new certificate be added while the old one still works. I have not installed or tested it.
Small things learned along the way #
Two near-misses, one sentence each:
- Home Assistant’s REST Supervisor proxy only exposes a handful of
/api/hassio/*endpoints to a long-lived token (core/supervisor/host logs, backup download); the rest return 401. The WebSocket API’ssupervisor/apicommand reaches everything — know which one you’re using before you assume a 401 means the gateway is down. - Nightly automatic Home Assistant backups are encrypted, so I couldn’t pull the old certificate out of a backup for comparison. The SSH add-on was the only way in.
Takeaways #
- A certificate’s date is the failure you least expect and most easily miss. A TLS client that worked for two years failed precisely because of the thing I never once looked at.
unknownis a symptom, not a vacation. If a high-frequency sensor stops reporting, make that loud. The dashboard will cheerfully draw a flat line and file it under “normal.”total_increasingregisters tell the truth and nothing but. Ten days of power collapsed into one hour, and no honest fix could put it back. That’s the hidden cost of the outage.- A generator’s 3-year default was the real bug, fixed upstream on 2026-04-21, two and a half years after it handed me a cert that was already counting down.
- The fix was three steps and no restart — generate, register, wait ten minutes. The friction was finding it, and the find was one
openssl x509command. - Read the dates first, always. Every command in my troubleshooting was slower than the enddate check that actually answered the question.