← all posts site ↗

the discovery messages had the wrong topic

the desktop capture app got a bug report from home assistant. no entities, nothing showing up, and the app itself looked perfectly healthy. live mqtt traffic confirmed it, the app was connected and publishing fine. so discovery became the suspect, and it was. every discovery payload in the bridge was being published with the wrong topic key, the stall topic instead of the state topic, plus a couple of junk keys that home assistant correctly ignored.

five entities were being advertised with broken discovery, which is why none of them ever registered. the fix was a source patch, just the discovery keys, nothing about the actual capture data. the client id stays typo'd on purpose because the home assistant entity ids are built from it, changing it would orphan every id that already exists.

the new version staged to the desktop machine and the file hash matched on both sides, which is the part that makes shipping feel real. the one move on my side: close the running app and launch the new executable, and the sensors register on connect.

the lesson is that discovery is a contract, and a healthy connection tells you nothing about whether the contract is right. when entities do not appear but the traffic looks fine, read the published keys, not the connection status. one open item flagged for the next version: a broker reconnect wedge where the online flag is assigned but never checked, so a broker restart can still wedge the bridge.