home-assistant / addons

:heavy_plus_sign: Docker add-ons for Home Assistant
https://home-assistant.io/hassio/
Apache License 2.0
1.52k stars 1.47k forks source link

[Mosquitto] How to find passwords for `homeassistant` and `addons` users? #3765

Open mahnunchik opened 2 days ago

mahnunchik commented 2 days ago

Describe the issue you are experiencing

https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md#home-assistant-user-management

According to the documentation homeassistant and addons users are pre-registered. I'd like to use mqtt-io addon with Mosquitto broker. Since this is an addon, it makes sense to use the existing addons user for it.

How to find passwords for homeassistant or at least addons user?

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Mosquitto broker

What is the version of the add-on?

6.4.1

Steps to reproduce the issue

  1. Install Mosquitto broker
  2. Install MQTT IO
  3. I'm shocked that the addon can't connect...

System Health information

System Information

version core-2024.9.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.31-haos-raspi
arch aarch64
timezone Asia/Tbilisi
config_dir /config
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.09.1 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 57.8 GB disk_used | 9.8 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | rpi5-64 supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (19.0.0), ESPHome (2024.8.3), File editor (5.8.0), MQTT IO (0.4.0), Mosquitto broker (6.4.1)
Dashboards dashboards | 3 -- | -- resources | 0 views | 0 mode | storage
Recorder oldest_recorder_run | September 13, 2024 at 10:33 AM -- | -- current_recorder_run | September 18, 2024 at 12:04 AM estimated_db_size | 77.96 MiB database_engine | sqlite database_version | 3.45.3

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

No response

Additional information

Maybe there is some predefined user/pass that can be used in mqtt-io config?

/homeassistant/mqtt-io/config.yml

mqtt:
  host: homeassistant.local
  topic_prefix: mqtt_io
  user: homeassistant #OR addons
  password: #?????????????????
  ha_discovery:
    enabled: yes
mahnunchik commented 2 days ago

https://github.com/home-assistant/addons/blob/d5f529465229c3075ae3306769e1378d9b507028/mosquitto/rootfs/etc/services.d/mosquitto/discovery#L18-L50

I found that Mosquitto broker publishes the connection details. I have two questions: