MQTT Broker Configuration

My MQTT Broker (the Mosquitto add-on from the store) appears to be working. Certainly when I got to Configurations / Integrations and click on MQTT, I’m told it’s already configured.

I’m following the official install guide and it tells me to add:

mqtt:
  broker: 192.168.1.111

Do I need to? I mean, it looks like its working. I’ve also seem some folk add a “password:” key to this. Is there a username required as well?

If it is working, where’s the configuration being stored?

are you on hassio or non-hassio?

I think it’s HAssIO. I didn’t know there were flavours. It has a hass.io dashboard.

You don’t do anything in your configuration it’s already enabled

Yes, it’s hassio then.

I don’t use hassio (I use straight Home Assistant in Docker on Debian) so I can’t really help with the configuration.

I know in my Mosquitto setup I needed to set a username and password in the Mosquitto broker itself and then put that username and password into the HA config. the part I don’t know is how you access the configuration of the Mosquitto add-on in hassio.

And I really would recommend adding a username and password for your broker, especially if you are going to expose your HA to the internet.

Can you provide a link to the “official guide” you used?

It’s accessed in the add-ons page on the hassio tab.

The guy is confused between setting up mqtt from integrations and setting it up from the config file

Yep, my devices log into my hassio with a username and password and my MQTT broker also logs in with its own username and password.

then you need to put the username and password into your config somewhere. I think. Like I said I don’t use hassio.

And I don’t use any integrations except for my chromecast so I can’t help you there either. I use straight config files for everything else.

That’s part of the integration. You don’t use the config file method if you’ve used the integration

@KDM you don’t need to do anything. It’s working. Leave it alone. You used the integration and added your mqtt broker. You’re done. Stop.

I’m pretty sure the MQTT bit is all working. If I got to Developer Tools / MQTT, I can send cmnd/s20_1/power with payload 0 or 1 and it switches my switch on and off.

I’ve also installed the TasmoAdmin addon and it’s found all my switches, and my TH10 sensors.

Ok then you’ve already done that.

Then as moe said above. Stop. :wink:

I missed the part where you said it was working. Normally people don’t ask questions here if everything is working so I got thrown off by that. :smile:

If you are using the inbuilt broker addon and the integration you can delete those lines as well!

OKay. i reselected the advice. I stopped. And restarted. Reinstalled HAass.io. Enebled setoption19 on my Tasmota devices. from that point everything started to work. I haven’t made one single modification to configuration.yaml.

I’m coming to the conclusion that there are two ways of doing this: the automatic way where you touch nothing and it just works, or the manual way where you spend 4 years learning how to write YAML.

Am i right? Is there an automated way to do this and some of you chaps have switched it off?

Actually using mosquitto (which is an add-on and therefore, I don’t think counts as “inbuilt”).

Even so, I did ZERO configuration. Not even the MQTT broker IP. It just worked.

I have nothing configured in my config yaml as it’s not needed.
I have the MQTT Integration and I enabled Discovery
I have the core Mosquitto Addon configured as defaults (nothing entered)

I created a user - mqttuser and a password in the HA auth system that matches the username and password I enter in my switches in Tasmota. (Nots: I could have used ANY HA user - I didn’t need a new one but if I had used an existing user, I would have had to reconfigure all my switches for that user in Tasmota)

I enabled Discovery, Setoption 19 On in all my switches. They all appear and work in Home Assistant with no further configuration.

So yeah… Simple and just works.

I agree. So, why the hell have I just spent two weeks wading through reams of toilet paper on how to modify configuration.yaml?

it really depends on what HA setup you are running. Hassio has add-ons to ease some of the configuration. But I’m pretty sure the configuration is done in the integration instead of the configuration.yaml file. So, it still needs configuring but it just needs it in a different way/location.

And like it or not you should get ready to spend the next four years learning YAML. :wink:

Because a LOT of people here look down their noses at anyone who uses discovery… for devices or MQTT. Meanwhile I happily use both…