In the supervisor log in Home Asstant the following can be read . The last two sentences keep repeating.
21-07-04 18:41:02 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'user2'
21-07-04 18:41:02 INFO (MainThread) [supervisor.auth] Successful login for 'user2'
21-07-04 18:44:41 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'homeassistant'
21-07-04 18:44:42 WARNING (MainThread) [supervisor.auth] Unauthorized login for 'homeassistant'
There is communication from ESP8266 to Mosquito. User2 is authorized bij Home Assistant.
Data is continously sent but does not reach home assistant. When i listen to the subject no data appear.
I am experiencing similar problems…
Initially I realized I had created a username/PW that used the same username ‘patrick’ as the HA username that perhaps it caused a clash (diff password) but after removing this configured username I still get the following in the logs regularly:
23-03-03 16:27:57 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'patrick'
23-03-03 16:27:58 INFO (MainThread) [supervisor.auth] Successful login for 'patrick'
23-03-03 16:28:40 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'patrick'
23-03-03 16:28:40 WARNING (MainThread) [supervisor.auth] Unauthorized login for 'patrick'
23-03-03 16:28:43 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
23-03-03 16:28:43 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
23-03-03 16:28:43 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
23-03-03 16:28:43 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
23-03-03 16:28:55 INFO (MainThread) [supervisor.store] Loading add-ons from store: 144 all - 0 new - 0 remove
23-03-03 16:28:55 INFO (MainThread) [supervisor.store] Loading add-ons from store: 144 all - 0 new - 0 remove
23-03-03 16:29:18 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
23-03-03 16:33:24 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'patrick'
23-03-03 16:33:24 INFO (MainThread) [supervisor.auth] Successful login for 'patrick'
23-03-03 16:36:09 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'patrick'
23-03-03 16:36:09 WARNING (MainThread) [supervisor.auth] Unauthorized login for 'patrick'
as you can see, it shows that sometimes it can successfully login, other times not.
Any hint would be appreciated.
HomeAssistant may have MQTT Broker addon installed. MQTT Broker have a list of the users inside it’s config, with the passwords.
HomeAssistant may also have MQTT integration installed, to connect HA to MQTT Broker, and it have user name & pass in it’s config.
So when MQTT INTEGRATTION is trying to reach MQTT Broker ADDON and user is absent in MQTT Broker addon configuration you will see next error in log:
23-06-28 10:48:11 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'homeassistant'
23-06-28 10:48:11 WARNING (MainThread) [supervisor.auth] Unauthorized login for 'homeassistant'
All you need to do is to find MQTT credentials in your MQTT device or service (like MQTT integration in HA) and copy them to MQTT Broker config.
Also I saw weird bugs with ghost MQTT messages and the solution was to copy MQTT Broker config to a safe place, uninstall MQTT Broker, install it again and past config data back. Reboot, restart etc did not help, only full re-install.