Skip to content

Navigation Menu

Sign in
Sign up

Homie 5 MCP Server enables LLM connection and access to a SPAN panel! #6

dcj started this conversation in Show and tell
Discussion options

One of the Homie contributors published a Homie MCP server today: https://github.com/Tieske/homie5-mcp-server

I was able to easily configure it (using Claude!) to connect to my SPAN panels, the first thing I asked Claude subsequent was "Go look at my SPAN panel, and summarize what you see", and here is the result:

Panel Core — SPAN HW 1.2, firmware spanos2/r202603/05
 - Serial: nt-xxxx-xxxxx
 - L1: 122.0V, L2: 122.2V, 200A main breaker
 - Main relay: CLOSED, dominant power source: GRID
 - Grid-islandable: true (has battery backup)
 Lugs
 ┌────────────┬──────────────┬─────────────────┬─────────────────┐
 │ │ Active Power │ Imported Energy │ Exported Energy │
 ├────────────┼──────────────┼─────────────────┼─────────────────┤
 │ Upstream │ 805.9 W │ 19.4 MWh │ 2.7 MWh │
 ├────────────┼──────────────┼─────────────────┼─────────────────┤
 │ Downstream │ 1727.5 W │ 12.7 MWh │ 5.6 MWh │
 └────────────┴──────────────┴─────────────────┴─────────────────┘
 Aggregate Power Flows
 ┌─────────┬──────────────────────┐
 │ Source │ Power │
 ├─────────┼──────────────────────┤
 │ PV │ -1954 W (generating) │
 ├─────────┼──────────────────────┤
 │ Battery │ 0 W (idle) │
 ├─────────┼──────────────────────┤
 │ Grid │ -819 W (importing) │
 ├─────────┼──────────────────────┤
 │ Site │ 2773 W (consuming) │
 └─────────┴──────────────────────┘
 Battery (BESS) — Tesla Powerwall 2 AC
 - Serial: TGxxxxxxxxxxxx, FW 26.2.0
 - 81 kWh capacity, SoC: 100%, SoE: 81.0 kWh
 - Connected, ON_GRID, positioned UPSTREAM
 Solar PV — Enphase IQ7PLUS, 4640 W nameplate, positioned IN_PANEL
 - Currently generating ~1905 W
 Power Control System (PCS) — mostly unconfigured, 200A requested import limit
 Circuits (16 total, all relays CLOSED)
 ┌───────────────────────────────┬───────┬───────────┬───────────────┐
 │ Circuit │ Space │ Power │ Shed Priority │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Kitchen-Outlets-1 & Outlets-2 │ 1 │ -4.6 W │ NEVER │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Clothes-Dryer │ 2 │ 0.0 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Attic-Back-Outlet │ 5 │ 0.0 W │ SOC_THRESHOLD │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ HVAC-Heating-Coil │ 6 │ 0.0 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Wine Refrigerator │ 7 │ -6.7 W │ SOC_THRESHOLD │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Water-Heater │ 9 │ 0.0 W │ NEVER │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ HVAC-Heat-Pump │ 10 │ -5.8 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ HVAC-Air-Handler │ 13 │ -61.5 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Ovens │ 14 │ -7.4 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Studio-HVAC │ 17 │ -10.2 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Cooktop/Stove │ 18 │ -6.1 W │ SOC_THRESHOLD │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Future-240VAC-1 │ 21 │ 0.0 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Espresso-Machine │ 22 │ -6.0 W │ SOC_THRESHOLD │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Future-240VAC-2 │ 25 │ 0.0 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Shed-240VAC-Outlet │ 26 │ 0.0 W │ OFF_GRID │
 ├───────────────────────────────┼───────┼───────────┼───────────────┤
 │ Commissioned PV System │ 29 │ +1904.6 W │ OFF_GRID │
 └───────────────────────────────┴───────┴───────────┴───────────────┘
 Settable properties: relay and shed-priority on each circuit, dominant-power-source on the core node.
You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

dcj
Feb 27, 2026
Maintainer Author

Homie 5 MCP Server — SPAN Panel Configuration for Claude Code

Connect Claude Code directly to your SPAN panel's eBus MQTT broker. This
gives Claude real-time access to all panel data: circuit power/energy,
relay states, battery status, solar production, and settable properties.

Prerequisites

  • SPAN panel running firmware with eBus/Homie 5 MQTT support
  • MQTT credentials for your panel (obtained via POST /api/v2/auth/register)
  • The homie5-mcp-server
    built locally (npm run build)

Single Panel

Add to ~/.claude.json under mcpServers:

{
 "mcpServers": {
 "span-panel": {
 "type": "stdio",
 "command": "node",
 "args": [
 "/path/to/homie5-mcp-server/build/index.js"
 ],
 "env": {
 "HOMIE_BROKER_URL": "ws://<mqtt-username>:<mqtt-password>@<panel-hostname>:9001",
 "HOMIE_DOMAIN": "ebus"
 }
 }
 }
}
Variable Value
HOMIE_BROKER_URL ws://user:pass@span-SERIAL.local:9001 — WebSocket connection to the panel's MQTT broker on port 9001
HOMIE_DOMAIN Must be ebus — SPAN panels publish under ebus/5/<serial>/ topics

Multiple Panels

Add one entry per panel:

{
 "span-panel-1": {
 "type": "stdio",
 "command": "node",
 "args": ["/path/to/homie5-mcp-server/build/index.js"],
 "env": {
 "HOMIE_BROKER_URL": "ws://user1:pass1@span-SERIAL1.local:9001",
 "HOMIE_DOMAIN": "ebus"
 }
 },
 "span-panel-2": {
 "type": "stdio",
 "command": "node",
 "args": ["/path/to/homie5-mcp-server/build/index.js"],
 "env": {
 "HOMIE_BROKER_URL": "ws://user2:pass2@span-SERIAL2.local:9001",
 "HOMIE_DOMAIN": "ebus"
 }
 }
}

Each panel has its own MQTT broker and credentials. Claude will discover
devices on each broker independently.

Obtaining MQTT Credentials

Register a client with the SPAN panel's REST API:

curl -X POST https://<panel-hostname>/api/v2/auth/register \
 -H "Content-Type: application/json" \
 -d '{"name": "claude-code"}' \
 --insecure

The response includes an access token. Use it to retrieve MQTT broker
credentials from the panel's auth endpoints. Refer to the SPAN API
documentation for the full authentication flow.

What Claude Can Do

Once connected, Claude has access to these Homie 5 MCP tools:

  • homie_get_devices — list all discovered devices on a panel
  • homie_get_device — full device detail: nodes, properties, current values
  • homie_get_value — read a specific property (e.g., circuit power, battery SoC)
  • homie_set_value — send commands to settable properties (e.g., circuit relay, shed priority)
  • homie_discover — force re-discovery if devices seem stale

Example Interactions

  • "What's the current power consumption on each circuit?"
  • "Show me the battery state of charge"
  • "Which circuits are set to shed priority OFF_GRID?"
  • "Turn off the relay on the Shed-240VAC-Outlet circuit"
  • "What firmware version is the panel running?"

Notes

  • SPAN panels use port 9001 for WebSocket MQTT (not the standard 1883/8883)
  • Each panel runs its own independent MQTT broker — there is no shared broker
  • Settable properties (relay, shed-priority, dominant-power-source) will
    actually command the panel — use with care
  • The active-power property on circuits uses watts despite the $description
    declaring kW (known firmware bug)
You must be logged in to vote
2 replies
Comment options

This would be cool as part of a dashboard, especially if SPAN would expose either the historical data in Homie from the cloud or better yet an AI agent that could get the summary from the cloud.

Users could then model upgrades based on actual data like "what size battery makes the most sense based on my past usage?", "what's the most economical time to charge my battery or two of my vehicles?"

Right now that data is locked away and HA installs tend to be more transient than a cloud warehouse.

Comment options

dcj Mar 7, 2026
Maintainer Author

In my role as SPAN panel homeowner (and in no way representing SPAN), as a proponent of local-first and self-hosted solutions, what I want is an "eBus archiver" service, that would subscribe to the eBus MQTT broker, and store everything into a "real" database, my initial thought being Postgres with the TimescaleDB extension. That is about the total extent that I have thought about this idea, but I'm hoping to get to that at some point, but "don't hold your breath" :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /