I am having trouble setting up mqtt via the add-on.
Here is what I have done:
- I added mosquitto broker as an add-on (no changes in the config)
- I created a new person in people with the name mqtt and a password
- I then restarted home assistant - weirdly I already get a couple of requests in the Mosquitto logs (see below)
- now MQTT is automatically detected, so I click on “add”
- I reconfigure it with the new User and Passwort but get the following error:
So now I am puzzled… Where do the mosquitto broker request come from? Is the mosquitto add-on as well as the MQTT integration set-up correctly?
Here are the logs in the broker:
> [15:11:15] INFO: Starting NGINX for authentication handling...
> s6-rc: info: service legacy-services successfully started
> [15:11:15] INFO: Starting mosquitto MQTT broker...
> 2025-01-03 15:11:15: Warning: Mosquitto should not be run as root/administrator.
> 2025-01-03 15:11:15: mosquitto version 2.0.18 starting
>
> 2025-01-03 15:11:15: Config loaded from /etc/mosquitto/mosquitto.conf.
>
> 2025-01-03 15:11:15: Loading plugin: /usr/share/mosquitto/go-auth.so
>
> 2025-01-03 15:11:15: ├── Username/password checking enabled.
>
> 2025-01-03 15:11:15: ├── TLS-PSK checking enabled.
>
> 2025-01-03 15:11:15: └── Extended authentication not enabled.
>
> 2025-01-03 15:11:15: Opening ipv4 listen socket on port 1883.
>
> 2025-01-03 15:11:15: Opening ipv6 listen socket on port 1883.
>
> 2025-01-03 15:11:15: Opening websockets listen socket on port 1884.
>
> 2025-01-03 15:11:15: mosquitto version 2.0.18 running
>
> 2025-01-03 15:11:18: New connection from ::1:47242 on port 1883.
>
> 2025-01-03 15:11:18: Client <unknown> disconnected due to protocol error.
>
> [15:11:19] INFO: Successfully send discovery information to Home Assistant.
>
> [15:11:20] INFO: Successfully send service information to the Supervisor.
>
> 2025-01-03 15:12:58: New connection from 172.30.32.1:50332 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:12:58: Client auto-23DE5EC2-9974-7BA9-D216-33D0D2F52F04 disconnected, not authorised.
>
> 2025-01-03 15:12:58: New connection from 172.30.32.1:50348 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:12:58: Client auto-E2B03B3E-ACBB-6054-D833-954C85CE6FA2 disconnected, not authorised.
>
> 2025-01-03 15:12:59: New connection from 172.30.32.1:50360 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:12:59: Client auto-FABE205F-DCBA-95F5-5A1F-64083515E06F disconnected, not authorised.
>
> 2025-01-03 15:12:59: New connection from 172.30.32.1:50372 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:12:59: Client auto-AAB7B7BC-9739-55DC-3171-B8F3364C5D51 disconnected, not authorised.
>
> 2025-01-03 15:13:01: New connection from 172.30.32.1:50384 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:01: Client auto-8675ED43-1CF5-C397-2068-AED3D029AA9D disconnected, not authorised.
>
> 2025-01-03 15:13:01: New connection from 172.30.32.1:50388 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:01: Client auto-B437E3BD-AA4B-C9B8-AB32-AF946FBC90BC disconnected, not authorised.
>
> 2025-01-03 15:13:05: New connection from 172.30.32.1:42164 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:05: Client auto-960BE15C-146D-219D-DB83-566124A950E2 disconnected, not authorised.
>
> 2025-01-03 15:13:05: New connection from 172.30.32.1:42172 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:05: Client auto-47BB1ED1-F103-991C-8737-8CB509160A83 disconnected, not authorised.
>
> 2025-01-03 15:13:13: New connection from 172.30.32.1:41112 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:13: Client auto-6036000B-6175-9D85-122C-7E957E141928 disconnected, not authorised.
>
> 2025-01-03 15:13:13: New connection from 172.30.32.1:41122 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:13: Client auto-A227B209-5276-77A3-64CD-6A04677951E8 disconnected, not authorised.
>
> 2025-01-03 15:13:29: New connection from 172.30.32.1:55896 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:29: Client auto-5B8556A7-BB91-DF44-8D42-75C186CD9483 disconnected, not authorised.
>
> 2025-01-03 15:13:29: New connection from 172.30.32.1:55904 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:13:29: Client auto-14984821-E7F3-2C33-07B1-0FE2B515A77B disconnected, not authorised.
>
> 2025-01-03 15:14:01: New connection from 172.30.32.1:45458 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:14:01: Client auto-2DDA1530-7A1D-CE3D-5AF6-CA0D05D61183 disconnected, not authorised.
>
> 2025-01-03 15:14:01: New connection from 172.30.32.1:45466 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:14:01: Client auto-6192113F-B219-5F05-1E8D-6604C2326FA0 disconnected, not authorised.
>
> 2025-01-03 15:15:05: New connection from 172.30.32.1:48768 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:15:05: Client auto-8C7FA1AC-8096-4DB6-BC48-AE6B516DECC7 disconnected, not authorised.
>
> 2025-01-03 15:15:05: New connection from 172.30.32.1:48784 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:15:05: Client auto-F0D407D1-DD6D-10D8-4862-317524B45F8E disconnected, not authorised.
>
> 2025-01-03 15:15:52: New connection from 172.30.32.2:53866 on port 1883.
>
> 2025-01-03 15:15:52: Client <unknown> closed its connection.
>
> 2025-01-03 15:16:14: New connection from 172.30.32.1:50025 on port 1883.
>
> 2025-01-03 15:16:14: New client connected from 172.30.32.1:50025 as 5QVFmTn0QAv740EBnWsBMi (p2, c1, k60, u'homeassistant').
>
> 2025-01-03 15:16:15: Client 5QVFmTn0QAv740EBnWsBMi disconnected.
>
> 2025-01-03 15:16:15: New connection from 172.30.32.1:54377 on port 1883.
>
> 2025-01-03 15:16:15: New client connected from 172.30.32.1:54377 as 73lEHKmufdYTD9HCXTtkzu (p2, c1, k60, u'homeassistant').
>
> time="2025-01-03T15:16:20+01:00" level=error msg="POST error: Post \"http://127.0.0.1:80/superuser\": EOF"
>
> 2025-01-03 15:17:05: New connection from 172.30.32.1:32848 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:17:05: Client auto-845DB08C-E96B-D9F1-F0CF-ACEAEBE1E642 disconnected, not authorised.
>
> 2025-01-03 15:17:05: New connection from 172.30.32.1:32852 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:17:05: Client auto-155886F2-5409-1FD8-C457-C94C969C48BB disconnected, not authorised.
>
> 2025-01-03 15:17:35: New connection from 172.30.32.1:49617 on port 1883.
>
> 2025-01-03 15:17:35: Client 4r3Xii37qIwrEKjmpH9A5J disconnected, not authorised.
>
> 2025-01-03 15:17:42: New connection from 172.30.32.1:55247 on port 1883.
>
> 2025-01-03 15:17:42: Client 225OxCe4iSj4dc3sZSjc5X disconnected, not authorised.
>
> 2025-01-03 15:17:52: New connection from 172.30.32.2:40382 on port 1883.
>
> 2025-01-03 15:17:52: Client <unknown> closed its connection.
>
> 2025-01-03 15:19:05: New connection from 172.30.32.1:47832 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:19:05: Client auto-D6321DF8-6849-11CC-6082-6B2E55FCD7F6 disconnected, not authorised.
>
> 2025-01-03 15:19:05: New connection from 172.30.32.1:47836 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:19:05: Client auto-CC115FEC-E800-E705-E273-EDA569A747D4 disconnected, not authorised.
>
> 2025-01-03 15:19:52: New connection from 172.30.32.2:54150 on port 1883.
>
> 2025-01-03 15:19:52: Client <unknown> closed its connection.
>
> 2025-01-03 15:21:05: New connection from 172.30.32.1:41982 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:21:05: Client auto-AA896252-B2AE-FE29-1A83-CD6E1191301E disconnected, not authorised.
>
> 2025-01-03 15:21:05: New connection from 172.30.32.1:41988 on port 1883.
>
> error: received null username or password for unpwd check
>
> 2025-01-03 15:21:05: Client auto-82652DEB-5F25-08B7-E918-13E303309141 disconnected, not authorised.
Any help is appreciated. Thanks!