Can “local-user” be the first user that I created with the web-interface, during the first login of home assistant?
Do I have to set, in configuration.yaml, “mypw” (the same password used in the mosquitto “logins” line) for the mqtt “password” ? In this yaml file I wrote
If you are using a Home Assistant user then you don’t need to define any local user at all. My MQTT broker is just set as defaults. You will then need to make sure your devices use that same username and password.
You also don’t need ANYTHING about MQTT in your config yaml. Use the MQTT integration.
I don’t understand yet… If I don’t set anything, as you say:
If mosquitto is used with the addon, does home assistant shut-down the embedded broker and use the mosquitto one, on localhost, instead? (so I don’t need to configure any host for the broker)
You need the Mosquitto Addon and the MQTT Integration. Leave the addon at it’s defaults. When you add the integration, tick the box to enable MQTT Discovery.
Then in the devices where you configure the username and password for the broker, use the username and password for a Home Assistant User.
ok, thanks, now something is starting to work.
I can see, in the mosquitto addon console that my dev connects correctly:
1549580654: New connection from 192.168.1.3 on port 1883.
[INFO] found test-hass on Home Assistant
1549580654: New client connected from 192.168.1.3 as McLighting01 (c1, k10, u’test-hass’).
However, I don’t see it in the webUI. home-assistant.log says:
2019-02-08 00:04:29 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Component failed to initialize.
2019-02-08 00:04:29 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of light.mqtt. Setup failed for dependencies: mqtt
2019-02-08 00:04:29 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform light.mqtt: Could not set up all dependencies.
I don’t want to use the MQTT auto discovery…
And this is the configuration for the light I just added:
This is a little problematic, since there is no device listed. I would like to use the intregrated broker as the default broker, even for things not to see in the HomeAssi.
How can one use the broker with the hassio - user without putting plaintext passwords into configs ?
The docs are a freaking nightmare.
A simpel question how to enter a username and password gives you a freaking sh** load of posts with questions not related to the OP instead of a awnser related to OP.
OP asked for something. If you dont know the awnser. Please shut te F up.
There is not anyone here with a simple awnser. It is frustrating.
The word offtopic has no meaning here.
Even the form here is a nightmare // END RANT
This is what you need to set in the config page via addon under mosquitto.
I want to clarify some things about this that I learned/tested recently, and post them here for future reference if that can help.
Yes you can, but in this case you don’t need to: If the account is a HA user defined in HA you don’t need it in the addon configuration (thus not exposing a password).
If you create a specific HA account for use to connect to the broker, you will have to allow it to connect to HA in order to set a password (which, once more, you do not need to configure in the broked/addon)
If you want to use a local account (i.e. the account needed for a client to connect to the broker), you can define here a mqtt client username and password
if you installed th MQTT integration, everything is configured during this integration configuration, no need to change yaml configuration files. In this integration configuration, you can use the local account you configured for the addon as a mqtt client user/password, or leave the default homeassistant/long_randomly_generated_password.
Basically you just need an username/password only if you need to connect to the broker with another client such as MQTT Explorer. The MQTT integration acts as a client to the addon/broker (amongst other things) with no additional configuration.