Energy Monitoring

Getting a Span Gen3 Panel Working in Home Assistant (Before Span Closed the Local API)

Written with AI assistance by the editorial team.
Updated November 27, 2026 10 min read

Update, November 2026: the situation at the end of this post has changed. SPAN’s official local API (“SPAN API”, in public beta) now covers Gen3 panels, and the community SpanPanel/span integration uses it. That is what our MAIN 40 runs on today. The story below is how things stood in early 2026; the last section has the current state.

Our test home has a Span Gen3 (MAIN 40) as its load center. The appeal of a smart panel is per-circuit visibility in Home Assistant without sending every watt-hour to a cloud you don’t control. But Span changed the local API between Gen2 and Gen3, and in early 2026 the existing community integration only spoke to Gen2 panels.

This is the story of the standalone integration we built to fix that, and how Span later closed that local API in a firmware update. If you’re staring at a Gen3 panel wondering why older guides and integrations won’t connect, you’re in the right place.

The short version

  • In early 2026 the community Home Assistant integration (SpanPanel/span) supported Gen2 / MAIN 32 panels via Span’s HTTP/JSON API and couldn’t talk to Gen3 hardware at all. (It can now; see the last section.)
  • Gen3 hardware (MAIN 40, MLO 48) replaced that with a local gRPC service that Span never publicly documented.
  • We reverse-engineered enough of the gRPC schema to read panel state and packaged it as a standalone, Gen3-only Home Assistant integration — Griswoldlabs/span-panel-ha (v1.0.0, Feb 2026), installable through HACS as a custom repository. Gen2 owners keep using the community integration; this one is for Gen3.
  • We shared it on the Home Assistant community forum for other Gen3 / MLO 48 owners to test — and a later Span firmware update (7.2.0) closed that gRPC service. That’s the part of this story that turned out to matter most (it’s the last section).

If you just want the how, keep reading. But if you own a Gen3 panel today, skip to the last section first — a later Span firmware update changed what’s actually possible right now.

Why local control mattered enough to do this

A whole-home energy monitor that talks to a vendor’s cloud has three failure modes:

  1. The vendor goes down or rate-limits you. Span has had outages. If your automations depend on circuit-level data and the cloud is gone, your “smart” home stops being smart at exactly the moment a 30-amp dryer kicks on during a brownout and you wanted to know about it.
  2. The vendor changes pricing or features. A “free” cloud API today can become a paid one later.
  3. Latency. A cloud round-trip is slower than a local connection on the LAN. That matters when you’re using circuit power as a trigger condition in an automation.

Cloud integrations are fine for plenty of things, but for the load center, local is the right call.

What was actually broken

The community span_panel integration is a HACS custom component that talks to a panel’s HTTP/JSON API. On Gen2 panels (the older hardware), you can hit http://<panel-ip>/api/v1/... and get a JSON dump of every circuit’s state. The integration polls that endpoint, parses it, and exposes circuits as Home Assistant entities. Simple, stable, well-supported.

On a Gen3 panel in early 2026, that integration failed at the config flow, because the Gen3 doesn’t run the same web service. It serves gRPC on a different port instead.

Span hadn’t published a .proto file for Gen3 and hadn’t documented the gRPC service publicly.

Reverse-engineering the gRPC service

gRPC traffic is HTTP/2 with protobuf payloads. If you don’t have the .proto file, you have two options: ask the vendor, or capture traffic from a known client and figure out the schema empirically. The integration came from option two.

The Span mobile app talks to the Gen3 panel locally over the same gRPC service when you’re on the home WiFi. The method is to put mitmproxy in transparent mode between a phone and the panel, capture a few minutes of traffic, and decode the binary protobuf payloads with protoc --decode_raw.

Pattern matching on those payloads gives:

  • Service name: roughly span.panel.v1.PanelService
  • Streaming RPC: the panel pushes state at ~1 Hz over a server-streaming method (the client sends one request, the server keeps responding forever)
  • Message shape: each push includes a list of circuits, each with position, name, power_w, voltage_v, current_a, plus a main-feed block with frequency and bidirectional power

That is enough to write a partial .proto file and compile a Python stub. In the integration, SpanGrpcClient is a thin async wrapper around the streaming call.

Structuring the integration

Home Assistant’s standard pattern for a polling integration is the DataUpdateCoordinator — HA calls an async_update_data method on an interval and fans the result out to entities. The Gen3 panel doesn’t poll, though; it pushes state at ~1 Hz over a server-streaming gRPC call. That doesn’t fit the coordinator pattern naturally.

There are two ways to reconcile them:

  1. Make the push look like polling. Keep a DataUpdateCoordinator, but have the gRPC stream write each incoming payload to a buffer; async_update_data just returns whatever’s currently in the buffer. Cheap, and it reuses HA’s standard entity/coordinator plumbing.
  2. Push state directly into entities. Skip the coordinator, update entity state straight from the stream handler. Slightly cleaner in theory, but you throw away all the coordinator machinery HA gives you for free — availability tracking, staggered updates, reload handling.

We went with option 1. A background task owns the gRPC stream and writes the latest panel snapshot into a buffer; the coordinator reads from it. It’s a mild abuse of the pattern, but it means the rest of the integration — entities, config flow, device registry — behaves like any other well-mannered HA component.

Because Gen3’s gRPC protocol shares essentially nothing with Gen2’s REST API, we built this as a separate, Gen3-only integration rather than trying to bolt it onto the community span_panel component. Gen2 / MAIN 32 owners are already well served there; carrying two entirely different transports in one repo would have been a maintenance burden for no real benefit. The layout is a plain HACS custom component (internal file names below are illustrative — see the repo for the current structure):

custom_components/span_panel/
├── __init__.py
├── config_flow.py          # discovers the panel over gRPC
├── coordinator.py          # buffers the streamed panel state
├── sensor.py               # circuit + main-feed entities
└── proto/                  # compiled protobuf stubs

The config flow connects to the gRPC service, confirms it’s answering as a Gen3 panel, and sets things up — there’s no REST fallback, because Gen3 hardware doesn’t answer on the old HTTP endpoints at all.

What the YAML side looks like

There’s no manual YAML for span_panel — it’s a config-flow integration, you add it through the Home Assistant UI. But once it’s set up, you can use the entities like any other power sensor. Here’s an example that combines a Span main-feed reading with Tesla solar production:

template:
  - sensor:
      - name: "House Net Power"
        unique_id: house_net_power
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        state: >
          {% set load = states('sensor.span_main_feed_power') | float(0) %}
          {% set solar = states('sensor.my_home_solar_power') | float(0) %}
          {{ (load - solar) | round(0) }}
        availability: >
          {{ states('sensor.span_main_feed_power') | is_number and
             states('sensor.my_home_solar_power') | is_number }}

When that number goes positive, the house is pulling from the grid. When it goes negative, it is exporting. It’s a one-line template once both integrations work, but it’s the kind of dashboard tile that’s useless if the underlying data is flaky — which is why local-first matters.

Releasing it

We didn’t try to fold this into the community span_panel integration. Gen3’s gRPC transport shares almost nothing with Gen2’s REST API, so merging them into one codebase would have meant carrying two completely different clients for two generations of hardware, indefinitely. A clean, standalone Gen3-only integration was the honest packaging: Griswoldlabs/span-panel-ha, tagged v1.0.0 in February 2026 and installable through HACS as a custom repository — add the repo URL, then search “Span MAIN 40.” We posted it on the Home Assistant community forum so other Gen3 and MLO 48 owners could test it, since one MAIN 40 was the only panel we had to develop against.

The unglamorous parts take the most work: getting a typed gRPC stub clean under mypy and ruff, and making the config flow resilient to a panel that drops the stream and reconnects. Working out the protocol is the smaller job; turning it into a well-behaved HA integration that doesn’t spam the log on every reconnect takes longer.

What’s still missing

The Gen3 path doesn’t yet support:

  • Circuit relay control. Gen2 lets you toggle individual breakers via REST. The Gen3 gRPC service has an UpdateState RPC that does the same thing, but it was not in the initial release — the read path is the more common use case and went in first. Relay control was queued for a follow-up.
  • Energy accumulation. The Gen3 push stream gives you instantaneous power but not lifetime energy counters. They can be computed with HA’s integration platform (the same pattern as for solar). It works fine, but you lose data on HA restarts unless you have your recorder set up to persist it.
  • Solar circuit combining. If your solar circuits are wired into the panel rather than directly inverter-tied, the Gen2 integration has logic to combine them into a single solar_power entity. The Gen3 path doesn’t do this yet because circuit naming on Gen3 panels is more flexible and the heuristics need rewriting.

These were all on the to-do list when the firmware change described below ended the project.

Lessons for a project like this

Two things:

Capture more app traffic before writing the client. Samples of the steady-state push are not enough. A freshly-restarted panel sends a slightly different initial message, and a client modelled only on the steady state works after a few minutes but fails on first connection. More mitmproxy time up front catches it.

Start with the gRPC reflection API. Modern gRPC servers often expose a reflection service that lets you query the schema at runtime. Check for that before doing any manual reverse-engineering. Span’s Gen3 panel didn’t expose one on the firmware this integration was built for, but the check comes first.

The twist: Span closed the door

After the release, Span shipped firmware 7.2.0 — and the local gRPC API the integration was built on went dark, as reported in the community forum thread.

The integration stopped connecting. The old port no longer answered; the service had moved, and every gRPC method now came back UNIMPLEMENTED. The local API was, functionally, revoked — remotely, without notice, on a panel its owner had bought outright. Other Gen3 owners on the forum thread hit the same wall.

That is the part of this project that matters most: “local control” on cloud-managed hardware lasts exactly as long as the vendor allows it — a firmware update you don’t get to decline can quietly remove a capability the hardware physically still has.

So where does that leave a Gen3 owner today? Better off than when this post was first written. SPAN has productized an official, LAN-only local interface — branded SPAN API and documented at spanio/SPAN-API-Client-Docs. It is a public beta built on MQTT (Homie / eBus topics) with some request/response operations over REST. It was first released for the MAIN 32, and SPAN’s documentation says firmware r202639 added the MAIN 40 and MLO 48 (plus MAIN 16 and MLO 24).

The community SpanPanel/span integration moved to that interface in v2.0.1 (March 2026): it listens to the panel’s built-in MQTT broker for real-time updates instead of polling. That is the integration to install now, for any panel generation, and it is what our MAIN 40 has run on since October 2026. SPAN’s docs also mark the old v1 REST endpoints (MAIN 32 only) as deprecated with a sunset date of December 31, 2026, so older guides that poll /api/v1/... are on borrowed time.

Griswoldlabs/span-panel-ha only works on a Gen3 panel whose firmware is old enough that the undocumented gRPC service still answers. On 7.2.0 or later that door is closed. The repository stays up as a record of what was possible.


Related guides: Tesla solar in HA without the cloud · Monitoring the smart home with Uptime Kuma · Deploying HA config changes with git and Samba

Tags #home-assistant #span-panel #grpc #energy-monitoring #open-source
Share X / Twitter Facebook
Keep reading