Closed mihalski closed 5 years ago
Looks like it publishes to api/ instead of default auto discovery prefix.
Special thanks to @oscar-b ! The solution is to specify discovery_prefix in the config:
mqtt:
discovery_prefix: homeassistant
Otto is also a core dev for Home Assistant, so I'm guessing there's a corresponding change coming on that side. I was about to try updating Home Assistant to dev as well to see if that gets it working again.
This is a pretty unpleasant surprise though, even if upgrading fixes it.
I just updated my Home Assistant server to 0.85.0.dev0 (homeassistant/home-assistant:dev on docker hub) and autodiscovery is still not working.
@OttoWinter - what's the intended migration path here? Sure hoping there's something I can do on the Home Assistant side, as the device I upgraded happens to be a hard-to-reach esp01_1m device that I have to retrieve and flash via serial adapter.
@brandond Have you not tried the fix I suggested? Works for me.
Oh... facepalm
That, ladies and gentlemen, is a bug - And thank you very much for reporting the full log and spotting the discovery prefix. That would have taken lots of time to find for myself π
And I can tell you how it happened: While developing the esphomelib native API, the api namespace was first called homeassistant
because it was made for use with HA. But then I thought of other use cases (for example inter node communication) and decided to change the name to just api
.
That change would have required me going through lots of files and changing probably around 50-100 occurences of homeassistant
to api
. So I did what most programmers would do in that case π Find and Replace. I thought I only applied it to the API folder but apparently not.
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Hass.io with esphomelibyaml-edge addon (current rebuild).
ESP (ESP32/ESP8266/Board/Sonoff):
Wemos D1 Mini Affected component:
MQTT
Description of problem: After the auto-discovery (and re-discovery in Home Assistant) were both implemented everything was perfect. Then after an update to esphomelib/yaml a couple of days ago it stopped working. Nothing is published to the homeassistant topic for Home Assistant to discover.
Problem-relevant YAML-configuration entries:
Traceback (if applicable):
Additional information: