[solved] .97+ issues - mqtt in configuration.yaml ignored, no dns

With latest upgrades my mqtt setup which was operational is not. I run a emqx broker

I have come up with a temporary solution which is to edit directly the core.config_entties file directly and use an ip address instead of a hostname.

From what I can gather two things have changed.

  1. MQTT configuration is not supposed to be done via configuration.yaml any more
  2. how dns is done has been changed.

The relevant posts are

If I remove the mqtt entry in core.config_entries the yaml is still ignored and the log shows errors about loading mqtt config.

So…

  1. was there supposed to be a new web ui for configuring mqtt? I know it wasn’t intended that users edit that json file, or is there a way like lovelace to tell HA that you want to use the yaml and not a built in configuration in .storage

  2. What has changed with DNS? I see now a new container hassio_dns. Is there a way to tell it where my primary DNS server is because it my case it’s on my LAN gateway router (DNSmasq) and it has entries for all my local devices. Apparently even though the host machine itself knows to use it HA no longer does. I would like to use my local hostnames and not ip addresses. The name resolution post above doesn’t specifically say how to do that in a full docker setup. It mentions needing a CLI and there is none in a docker install.


imo
Changes are good but of late seems like the documentation isn’t keeping up with all the changes. None of this seems to be mentioned there (like the mqtt page which mentions nothing about this this alternative configuration). I’ve ended up having to search/post in the forum to find answers to what has broken. Is there some place where breaking changes are documented before/if they make it into the main documentation?

It’s been there for quite some time.

Configuration, Integrations, PLUS sign

Every release gets a “Breaking Changes” section

What version did you upgrade from?

The mqtt authentication change happened many versions ago. Back in November some time last year.

already an mqtt integration there (configuration.yaml) and when clicked says
This integration has no devices.
so like I said tat least for me I have no web ui for mqtt

If I delete and restart it’s back. no opportunity to add like you mentioned.

As mentioned in one of the posts I linked it was said “this was normal” well apparently it’s not it should be displaying an inteface.

I tried scrubbing (via rename) .storage in hopes that old json there was messing things up but then HA would not even boot. Before it seems that HA would generate a new clear .storage folder.

been upgrading all along to whatever was latest docker image, breaking changes happened from .96 to .97

BTW I also scrubbed my containers and reran the install script since all recently moved to this repo.

I suspect it just doesn’t like something in .storage coming from an earlier version? What else?

There were no mqtt breaking changes in that release.

There was a seperate supervisor update that broke some peoples dns.

As to your dns configuration question, make sure you are using the latest SSH addon (official or community) as it has these commands you need to use (you actually linked to the topic with them):

  • hassio dns options --servers dns://IP_ADDRESS
  • hassio dns restart

Also, hassio dns info To check.

my issues are related to dns and .storage config vs yaml config so not directly mqtt

Will try the ssh addon for cli access to container. Still need to know why I don’t get a UI for mqtt config

The commands work in the hassio CLI. No need for container access.

Ok for those needing to set the dns server in a docker install once the ssh client add on is installed I ran it and the log says that a pub/key pair was created. So look in your /usr/share/hassio/addons/data directory for the keypair public key ssh_host_rsa_key.pub. Open that file and paste the contents as a quoted string into the config of the addon with user hassio

  "ssh": {
    "username": "hassio",
    "password": "",
    "authorized_keys": [
      "ssh-rsa blah blah blah"
    ],
...

Then run again and this time it should succeed and you should be able to open the web terminal. Then per @tom_l run those two commands and it’s done.

As to mqtt config

commented out the mqtt in the yaml
deleted the mqtt entry in the ui
created a new one, asking for mqtt.
This time I got the config dialog and entered the info
I used my host name instead of ip address now that the dns is fixed.

The other thing to note is one can’t edit those settings. To change them you must repeat the process above to recreate the entry.


Looking back the reason I just had this issue was because the .storage config was fine but referenced my broker by domain so when the dns lookup method got changed that broke the mqtt config.

Seems as though the change in DNS lookup was a pretty big deal for anyone using domain names in any of their configs/integrations rather than ip addresses but now I’m set.

That leaves this question:
What about all the other mqtt publish integration config values like birth_message etc.?? Do those still go in an mqtt: key in configuration.yaml as the dialog only supports broker, port, login and discovery?