Fix evcc disappearing from the device list - #21
Conversation
|
Aren't volumes docker compose rather than docker? I don't know for sure. Not convinced by this change it seems to be targeting a sympton. If mDNS wasn't working we shouldn't see any announcement rather than "sometimes"? |
|
Volumes are Docker in general, either passed via CLI ( |
|
Looks like there are quite some open issues related to mDNS in ship-go, see here. |
|
Still experiencing the problem that evcc gets lost in the controlbox dropdown. It now seems to happen when restarting evcc (not sure whether this happens always or is a race-condition). Here is the controlbox log from the evcc restart: controlbox and evcc reconnect but evcc does not seem to appear in the mDNS results anymore. Restarting controlbox fixes it. |
|
The log actually rules out the Docker/avahi theory. The SHIP link is alive the whole time (heartbeats from Sequence is: evcc restarts → goodbye → Where that happens in ship-go:
Which provider controlbox uses decides the root cause:
Could you check, while it's broken, on the controlbox host: If evcc is listed there, avahi is fine and ship-go dropped it — that pins it on the avahi resolve path and it's an enbility/ship-go issue. If evcc is absent, it's the announcing side after all. Also useful: which provider controlbox picked at startup (avahi, or the zeroconf fallback). On the PR itself: I'd keep the change regardless. A device with a live connection should never disappear from the list — that's a UI invariant, not a workaround. But the real fix belongs upstream: ship-go should retry a failed resolve, and/or the hub should union the mDNS entries with the connected SKIs so no consumer can see this symptom (evcc's own device list has the same exposure). Unrelated, but visible in your log: the heat pump's certificate expired 608 days ago, and its disconnect/reconnect churn is a separate problem. 🤖 Generated with Claude Code |
|
Does not seem to happen always, like in: Can't reproduce right now. |
|
I probably fixed the bad situation when I previously restarted controlbox. So the stack probably needs to go in the bad state first... Does it make sense to update eebus-go in controlbox? |
|
Small addition... I am quite sure that controlbox uses avahi. At least it is installed on the Raspberry on which controlbox runs. I can execute |
|
Thanks, that What the output provesevcc is in avahi, fully resolved: Two things die here: the Docker/avahi-socket theory, and the "missing mandatory TXT element" branch I raised last time. ship-go dropped the entry, not the network. What I verified in ship-go v0.6.0 (the version this repo pins)The list is a verbatim projection of the mDNS map. Every failure branch in the avahi provider is terminal. Two tempting theories I had to discard after reading the code:
A version bump won't help. ship-go HEAD has byte-identical resolve-error handling. The blocker is in controlboxThree candidates remain, all terminal, all logged at Debug:
Could you uncomment those four bodies, reproduce, and look for On the PRI'd merge it. A device with a live connection disappearing from a discovery list is an invariant violation, not a cosmetic workaround — and per One note on the diff, not a blocker: it reads 🤖 Generated with Claude Code |

Short Description
evcc keeps disappearing from the dropdown list of found devices even though the connection is still alive and exchanging heartbeats.
Analysis
The data structure feeding the dropdown is driven purely by mDNS discovery visibility. So for some reason, evcc seems to disappear from the mDNS record.
Workaround
Keep connected devices in the list like proposed in this PR. The dropdown list should never drop a device that's actively connected, regardless of what the latest mDNS record says.
Potential Docker Fix
Claude believes that the root cause is the incomplete pure-Go Zeroconf implementation used by eebus-go as avahi is not made available to the evcc Docker container. So I also applied the following fix to my
docker-compose.ymlto potentially stabilize mDNS:Maybe we should also add the
avahi/dbusvolumes to the default evcc EEBus Docker config? Requires avahi to be installed on the host.Ping @andig