Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mahnunchik opened this issue Sep 18, 2024 · 5 comments
Open

Comments

@mahnunchik
Copy link

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
Copy link
Author

mahnunchik commented Sep 18, 2024

# Create discovery config payload for Home Assistant
config=$(bashio::var.json \
host "$(hostname)" \
port "^1883" \
ssl "^false" \
protocol "3.1.1" \
username "homeassistant" \
password "${discovery_password}" \
)
# Send discovery info
if bashio::discovery "mqtt" "${config}" > /dev/null; then
bashio::log.info "Successfully send discovery information to Home Assistant."
else
bashio::log.error "Discovery message to Home Assistant failed!"
fi
# Create service config payload for other add-ons
config=$(bashio::var.json \
host "$(hostname)" \
port "^1883" \
ssl "^false" \
protocol "3.1.1" \
username "addons" \
password "${service_password}" \
)
# Send service info
if bashio::services.publish "mqtt" "${config}" > /dev/null 2>&1; then
bashio::log.info "Successfully send service information to the Supervisor."
else
bashio::log.error "Service message to Supervisor failed!"
fi

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

  • How can I found this user/pass?
  • Is it possible that MQTT-IO can utilize this details?

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 18, 2024
@mahnunchik
Copy link
Author

I'm going to this this issue soon flyte/mqtt-io#406

@github-actions github-actions bot removed the stale label Oct 19, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 18, 2024
@mahnunchik
Copy link
Author

I'm going to fix this issue soon flyte/mqtt-io#406

@github-actions github-actions bot removed the stale label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant