diff --git a/.env.example b/.env.example index 7c0f809..02c1fbb 100644 --- a/.env.example +++ b/.env.example @@ -47,5 +47,3 @@ HOMEPAGE_VAR_WEATHER_UNIT=metric IMMICH_DB_PASSWORD=postgres CALIBRE_USERNAME=admin CALIBRE_PASSWORD=admin123 -MOSQUITTO_USERNAME= -MOSQUITTO_PASSWORD= \ No newline at end of file diff --git a/homeassistant/README.md b/homeassistant/README.md index ce79c83..1c5726d 100644 --- a/homeassistant/README.md +++ b/homeassistant/README.md @@ -25,8 +25,6 @@ Set the `HOMEASSISTANT_ACCESS_TOKEN` for homepage support. If you need to use MQTT, you can enable it by setting `COMPOSE_PROFILES=homeassistant,mqtt`. -In the root `.env`, fill `MOSQUITTO_USERNAME` and `MOSQUITTO_PASSWORD` with the credentials you want to use. - Start the container, create a user in mosquitto with the following command and the credentials defined previously: `docker compose exec mosquitto mosquitto_passwd -b /mosquitto/config/pwfile ` diff --git a/homeassistant/docker-compose.yml b/homeassistant/docker-compose.yml index 08ea030..41e3a78 100644 --- a/homeassistant/docker-compose.yml +++ b/homeassistant/docker-compose.yml @@ -49,7 +49,7 @@ services: ports: - "1883:1883" healthcheck: - test: [ "CMD", "mosquitto_sub", "-u", "$${MOSQUITTO_USERNAME}", "-P", "$${MOSQUITTO_PASSWORD}", "-h", "localhost", "-t", "$$SYS/broker/uptime", "-i", "docker_health_check", "-C", "1" ] + test: [ "CMD", "mosquitto_sub", "-p", "1880", "-t", "$$SYS/#", "-C", "1", "-i", "healthcheck", "-W", "3" ] interval: 1m timeout: 10s retries: 3 diff --git a/homeassistant/mosquitto/config/mosquitto.conf b/homeassistant/mosquitto/config/mosquitto.conf index 3686f18..71dda1c 100755 --- a/homeassistant/mosquitto/config/mosquitto.conf +++ b/homeassistant/mosquitto/config/mosquitto.conf @@ -6,4 +6,7 @@ allow_anonymous false log_dest file /mosquitto/log/mosquitto.log -listener 1883 \ No newline at end of file +listener 1883 + +listener 1880 127.0.0.1 +allow_anonymous true \ No newline at end of file