im back to trying this on my main original home assistant install here are my users…
i did have a user name : chris and then user HomeAuto and my password
i changed this for user name HomeAuto user HomeAuto and my password
im back to trying this on my main original home assistant install here are my users…
i did have a user name : chris and then user HomeAuto and my password
i changed this for user name HomeAuto user HomeAuto and my password
There is no local user defined.
You need to add the “HomeAuto” as a user and the password to that.
He has it defined as a HomeAssistant user so there is no need for a local user.
I’m not sure about that.
3reeman,
You have set up the mqtt integration from the side panel ‘Configuration/Integrations/Mqtt’?
Use the same login as that was setup as.
I am ‘sure’ about it as he shows a screenshot of his Home Assistant users lol.
Also when I added the MQTT integration I only had a box to check for discovery… I didn’t need to enter anything else.
You may get those other fields if you have configured MQTT in config yaml but if you use the Hass.io broker and don’t configure in config yaml you don’t see them…
Do I need to delete my settings I had in configuration.yaml ?? And then go through the integrations options ??
Not sure if I’ve got confused with the user’s ??
Main menu… Configuration -> users -> … in that section ?? Thats local users right ??
Yes mqtt broker setting, only.
Then setup the broker via integration.
I think that’s correct.
and so it continues i deleted all settings from my old MQTT config inside configuration.yaml and now when i go to integrations i have the option in discovered devices for MQTT Configure… when i press it i get “unable to connect to broker”
this part is still worrying me [INFO] No local user available but i’m sure i have it …
[INFO] Setup mosquitto configuration
[INFO] No local user available
[INFO] Initialize Hass.io Add-on services
[INFO] Initialize Home Assistant discovery
[INFO] Start Mosquitto daemon
1559927144: mosquitto version 1.5.6 starting
1559927144: Config loaded from /etc/mosquitto.conf.
1559927144: |-- *** auth-plug: startup
1559927144: Opening ipv4 listen socket on port 1883.
1559927144: Opening ipv6 listen socket on port 1883.
1559927144: Opening websockets listen socket on port 1884.
1559927144: Opening ipv4 listen socket on port 8883.
1559927144: Opening ipv6 listen socket on port 8883.
1559927144: Opening websockets listen socket on port 8884.
1559927145: Warning: Mosquitto should not be run as root/administrator.
And your Mosquitto broker config should look like:
{
"logins": [
{
"username": "HomeAuto",
"password": "mqttPassWord"
}
],
"anonymous": false,
"quiet_logs": true,
"customize": {
"active": true,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
Add the same credentials to the side panel mqtt integrations.
To help. I setup a virtual Hass.io for testing. and to see how the Mqtt broker setup procedure works in the latest version of hass io.
After setting up Mqtt broker 4.2 and setting up ACL directory and files. Then going to the side panel to configure Mqtt integration. I did not see the same setup as I posted above, with all the login info.
I just saw what you saw, just a auto discover check box. I think Hass auto discovered the mqtt broker and just needed confirmation.
Configs and a log of my test:
Mqtt.config:
{
"logins": [
{
"username": "hassuser1",
"password": "PWmqttPW"
}
],
"anonymous": false,
"quiet_logs": true,
"customize": {
"active": true,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
\share\mosquitto\accesscontrollist :
user hassuser1
topic #
user homeassistant
topic #
Log from test:
[INFO] Setup mosquitto configuration
[WARN] SSL not enabled - No valid certs found!
[INFO] Found local users inside config
[INFO] Initialize Hass.io Add-on services
[INFO] Initialize Home Assistant discovery
[INFO] Start Mosquitto daemon
1559929877: mosquitto version 1.5.6 starting
1559929877: Config loaded from /etc/mosquitto.conf.
1559929877: |-- *** auth-plug: startup
1559929877: Opening ipv4 listen socket on port 1883.
1559929877: Opening ipv6 listen socket on port 1883.
1559929877: Opening websockets listen socket on port 1884.
1559929877: Warning: Mosquitto should not be run as root/administrator.
1559929924: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1559929924: New client connected from 172.30.32.1 as a9e235ec-53ba-449a-b537-d21225991431 (c1, k60, u'homeassistant').
1559929924: Client a9e235ec-53ba-449a-b537-d21225991431 disconnected.
1559929924: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1559929924: New client connected from 172.30.32.1 as 40755e07-6fa9-48da-8a2c-c1fe3064edab (c1, k60, u'homeassistant').
Just to recap, all mqtt settings removed from configuration.yaml
all.conf
acl_file /share/mosquitto/accesscontrollist
accesscontrollist
user HomeAuto
topic readwrite #
user homeassistant
topic readwrite #
Mqtt settings tried both…
{
“logins”: [
{
“username”: “HomeAuto”,
“password”: “***”
}
],
“anonymous”: false,
“quiet_logs”: true,
“customize”: {
“active”: true,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}
and…
{
“logins”: ,
“anonymous”: false,
“quiet_logs”: true,
“customize”: {
“active”: true,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}
current fault nothing can connect to mqtt and mqtt integrations kicks out an error unable to connect to broker
Are you restarting Hass between changes?
Example:
Remove all set mqtt configs, restart Hass.
Then. Setup the Mqtt broker 4.2 and the ACL files, Maybe a restart here as well, or just try to set up the integration from side panel.
I feel like I’ve tried everything including using a new install on a spare sd card i’m wondering if its a problem with mqtt v 4.3
I did some poking around, because I saw differences between Hass installations. Specifically between a Dockerized install under ubuntu 18.04 and a VM install of Hass.os.
Under a VM Hass.io after setting up Mqtt broker 4.3 and the Mqtt integration side panel. I checked the contents of the file “config.storage\core.config_entries” and the file contained this for the mqtt config (and this is after setting up the addon mqtt broker):
"connection_class": "local_push",
"data": {
"broker": "core-mosquitto",
"discovery": false,
"password": "pu3Saigh8Ohghom9muezae6seexaidoopheleighe4suVaich6oF1peeWooxohNi",
"port": 1883,
"protocol": "3.1.1",
"username": "homeassistant"
},
"domain": "mqtt",
"entry_id": "6f3c90647b1d4d459aa5fe322f2cc4e0",
"options": {},
"source": "hassio",
"title": "Mosquitto broker",
"version": 1
}
My Dockerized hass install has the following mqtt seetings in the file “core.config_entries”:
"connection_class": "local_push",
"data": {
"broker": "127.0.0.1",
"discovery": true,
"password": "mqttPassWord",
"port": 1883,
"username": "hassuser1"
},
"domain": "mqtt",
"entry_id": "67ebb49c4c3243a6c5ba87c39c5c2132",
"options": {},
"source": "user",
"title": "127.0.0.1",
"version": 1
Both I have setup to use the addon Mqtt broker. However the VM hass.io set the broker to the internal broker.
Very odd.
Maybe backup and edit the “config.storage\core.config_entries” to point to the addon broker?
Ok I did not realizes there is a difference in setting up a Hass.io (on a Rpi) and the addon Mqtt broker then on other variants of hass.
If you are useing Hass.IO you NEED to add the Mqtt stuff to your configuration.yaml.
Something like:
mqtt:
broker: 127.0.0.1
port: 1883
username:USER
password: PASSWORD
Sorry I did not realize the fundamental configuration differences between install variants.
I believe adding that config bit will solve the troubles.
Hope that helps.
If you are using the inbuilt Hass.io addon broker then you do not require ANY settings in configuration.yaml You do not need and should remove any mqtt: section.
If you added (as you have) a Home Assistant User to Home Assistant, you can use that username and password for MQTT. A LOCAL user for MQTT is defined in the addon settings and only there. If you use a Home Assistant user then you just leave the user settings in the broker blank.
You would also add the MQTT integration. If you select to use MQTT discovery then check the box. It won’t ask for any other details like brokers or user/password. If you have your MQTT broker on a different machine then that’s a different story.
Make sure if you add or remove the integration that you then restart home assistant.
So its come to this a you tube video showing what im doing or not doing as the case may be,
brand new Hassio install on a raspberry pi 3 B+ 32bit just samba was installed before the recording…
Try lowercase for the username in accesscontrollist
Other than that I have the identical configuration.
ALSO… in the Hassio Users> my MQTT user is MQTT-User but the actual logon name is mqttuser - they don’t have to be the same… The name and the username can be different
Ive tried changing the user name to all lower case and also tried a different one, i can’t believe I’m the only one with this problem ? i’m truly stumped