hassio-addons / addon-mqtt-io

MQTT IO - Home Assistant Community Add-ons
MIT License
34 stars 20 forks source link

[Feature] Server & username & password automatic detection #134

Open mahnunchik opened 1 week ago

mahnunchik commented 1 week ago

Problem/Motivation

It would be really great to have automatic detection of server & username & password for local mosquitto installation.

Expected behavior

Like in Zigbee2MQTT:

https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/6d5d0e5fd3b37c840a3b218814905914fa3c1e5f/common/rootfs/docker-entrypoint.sh#L89-L100

Actual behavior

Manual configuration

sinclairpaul commented 1 week ago

As the config is managed through a manually created file, not sure how this would be possible?

mahnunchik commented 1 week ago

@sinclairpaul You may find how it is implemented in Zigbee2MQTT https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/6d5d0e5fd3b37c840a3b218814905914fa3c1e5f/common/rootfs/docker-entrypoint.sh#L89-L100

sinclairpaul commented 1 week ago

Thanks I'm aware, and it's passed through Environment Variables, this application has a file managed by the user.

mahnunchik commented 1 week ago

Yes, and if server/username/password not specified by the user then it consumed from the env vars. It is super helpful (end easy to use) for simple setup like mosquitto, mqtt and mqtt-io on the same machine.

sinclairpaul commented 1 week ago

Which is due to the fact that the application supports configuration via Environment Variables, this doesn't. You can look at the MQTT IO documentation for reference which this addon installs.