Add dormant sml2mqtt power-meter bridge (phase 1 of moving HA off edge) #83

Merged
k.renner merged 1 commits from worktree-ha-meter-mqtt-bridge into master 2026-06-27 20:46:35 +00:00
1 Commits
Author SHA1 Message Date
k.rennerandClaude Opus 4.8 dbe1218c06 feat(home-assistant): add dormant sml2mqtt power-meter bridge (phase 1)
First phase of moving the resource-hungry Home Assistant pod off k8s-edge.
HA is pinned to edge solely by the USB power meter (FTDI FT230X) it reads
via the built-in edl21 integration. This adds an sml2mqtt bridge that will
read the meter and publish to the in-cluster Mosquitto broker, so HA can
read it over MQTT and stop needing the USB device / the edge node.

Shipped DORMANT (replicas: 0): the meter's serial port is a single
stream, so sml2mqtt and HA's edl21 cannot both read it. Merging this
changes nothing at runtime. The cutover (separate steps) is: disable
edl21 -> scale this to 1 -> add HA MQTT sensors reusing the existing
entity_ids (preserves long-term-statistics history) -> evict HA from edge.

Contents:
- sml2mqtt-deployment.yaml: edge-pinned, replicas:0, runs
  spacemanspiff2007/sml2mqtt:3.6.0 as root (meter dev is root:root 0600;
  no privileged needed), USB hostPath mount, init container renders the
  broker password into config.yml from a Secret.
- sml2mqtt-config.yaml: v3 config; Wh kept (not kWh) to match edl21 so
  history is continuous; publishes to mosquitto:1883 as user sml2mqtt.
- mosquitto: 4th broker user `sml2mqtt` (publish-only sml2mqtt/#) via a
  new bootstrap Job + passwd/ACL/env entries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 22:45:09 +02:00