MQTT config not recognised in HA - Both HA and MQTT in a dev docker env

Hi All.

I have 2 environments, the Prod, - Rpi3, Hass.io running the internal MQTT broker, appdaemon, which is working fine, and Dev, which I am running in a Qnap container station docker. ( longer term plan to run the Prod environment on the QNAP NAS)

I’m completely new to HA, MQTT, dockers and code, - this has been a great learning experience, but I’m starting to hit some walls.

My issue is that the HA returns an invalid config ( components and platforms cannot be setup) namely MQTT, sensors and switches).

I can see the MQTT console in the docker, and I set up a device as a test. - I can see the test device connect in console.

My HA config.yaml

Mqtt:
broker: 10.1.1.165
port: 1883
client_id: home-assistant-1
username: my_user_name
password:my_password

the HA Error log returns:

Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml

I cannot find the known_devices file in the Prod (Rpi) environment config, but all is running OK.

By the way, I love the speed at which the HA instance can be restarted in a docker!!

Thanks,

Jarrod.

I don’t understand the relationship between the error you are getting and the MQTT device.

The known_devices.yaml file is where the device tracker component stores it’s discovered devices. I don’t think it stores discovered MQTT devices there. I just looked in the docs for MQTT discovery and there is nothing mentioned there about known_devices.yaml.

To start troubleshooting this you first need to properly format any code snippets per the instructions in the blue box at the top of the page.

Then you need to also include your test device configuration.

And you didn’t really specify which HA environment is giving the error - the production or dev? I assume you mean dev but just to be sure…

Hi finity.

Thanks heaps for the response. So, schoolboy error, running the prod and dev environment at the same time, and switching between the two config.yaml files. - Turns out when I was in the dev ( docker ) instance, and went to configurator to amend the config, the actual prod config was opening instead, ( both on port 8123, albeit different IP addresses.) the http://hassio.local:8123/configurator was opening ( i think) when I had entered the NAS Ip:8123.

This resulted in modifying the prod config.yaml to look for the dev MQTT broker.

I realised when I returned to the prod environment and no MQTT functions were working, - opened the prod config and saw that the MQTT Broker was changed to the DEV broker.

I now have both the Prod ( Pi ) and the Dev (NAS Docker) operating correctly. - I can shut down the Pi, startup the NAS HA and MQTT container and they interact with the hardware as expected.

next steps are to get appdaemon successfully connected to HA running in a container on the NAS. - I have the appdaemon container running, but no connection. _ I’ll swim around in this one for a bit longer before I reach out for help. - I think I have a folder config / directory issue - I Have no clue about folder structures / and configuring AD on a docker… Ive gotten this far because the QNAP container / docker GUI does all of the heavy lifting.

Thanks for helping with the heads up re the known_devices info - save me from going down the wrong rabbit hole.

Cheers,

Jarrod.