I am fairly new to hassio, and a couple of days started over again with a scratch install in order to learn more from setting up the system again. This time around I am struggling with MQTT. I have installed the mosquitto plugin and I am able to publish messages and control a Sonoff Tasmota switch when calling mosquitto_pub from SSH
I have a hypothesis that when I call mqtt.publish from inside hassio I am somehow calling the built in mqtt service instead of mosquitto. Is there a way I can check this?
Found some more information. If my call from hassio dev tools is in fact going to the built in mqtt broker instead of mosquitto, I should be able to view the messages on the bus for that broker using hbmqtt_sub. I will try this when I’m back home tonight.
Ok, I found the solution:
There was an entry in core.config_entries referring to mqtt. Once I removed that the calls from hassio dev tools are now going to the mosquitto mqtt bus. Not sure how that entry got there, but I assume it was due to an initial attempt to configure mqtt. If anyone can enlighten me it would be greatly appreciated.
For future reference: The clue that got me to check the core.config_entries file in config/.storage was a message in the log
019-02-21 16:53:11 WARNING (MainThread) [homeassistant.components.mqtt] Data in your config entry is going to override your configuration.yaml: {‘broker’: ‘192.168.1.17’, ‘discovery’: False, ‘password’: ‘’, ‘port’: 1883, ‘username’: ‘’}
That brought me to this thread:
I backed up the file before attempting to change it. Once I had removed the entry referring to mqtt everything, and restarted hassio, mqtt worked fine even from the dev tools. Furhter, a new entry was automatically created again, this time with the correct data
I see in the last post of the above mentioned thread that @DavidFW1960 is warning against this. If exiting core.config_entries directly is not safe, is there a safe procedure for this?
Hi! I have a similar problem. I just can’t get the hassio MQTT addon to work and not even with Developer tools. SSH terminal work fine. Starts to sound like a bug. Where can you find that core.config_entries file? Will look the logs next week.