{"id":31618050,"url":"https://github.com/rhizomatics/updates2mqtt","last_synced_at":"2026-05-18T00:14:52.746Z","repository":{"id":317226581,"uuid":"1066521362","full_name":"rhizomatics/updates2mqtt","owner":"rhizomatics","description":"Automated checks and optional upgrades of packages via MQTT with Home Assistant compatibility","archived":false,"fork":false,"pushed_at":"2026-05-11T20:00:47.000Z","size":4145,"stargazers_count":18,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T21:39:33.682Z","etag":null,"topics":["docker","docker-compose","homeassistant","mqtt","updater"],"latest_commit_sha":null,"homepage":"http://updates2mqtt.rhizomatics.org.uk/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhizomatics.png","metadata":{"files":{"readme":"README.de.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T15:43:41.000Z","updated_at":"2026-05-11T19:59:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"51222d5e-8274-4eac-bf42-900c9cc40658","html_url":"https://github.com/rhizomatics/updates2mqtt","commit_stats":null,"previous_names":["rhizomatics/updates2mqtt"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/rhizomatics/updates2mqtt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhizomatics%2Fupdates2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhizomatics%2Fupdates2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhizomatics%2Fupdates2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhizomatics%2Fupdates2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhizomatics","download_url":"https://codeload.github.com/rhizomatics/updates2mqtt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhizomatics%2Fupdates2mqtt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","homeassistant","mqtt","updater"],"created_at":"2025-10-06T13:45:14.760Z","updated_at":"2026-05-18T00:14:47.736Z","avatar_url":"https://github.com/rhizomatics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![updates2mqtt](images/updates2mqtt-dark-256x256.png){ align=left }\n\n# updates2mqtt\n\n[![Rhizomatics Open Source](https://img.shields.io/badge/rhizomatics%20open%20source-lightseagreen)](https://github.com/rhizomatics)\n\n[![PyPI - Version](https://img.shields.io/pypi/v/updates2mqtt)](https://pypi.org/project/updates2mqtt/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/rhizomatics/updates2mqtt)\n[![Coverage](https://raw.githubusercontent.com/rhizomatics/updates2mqtt/refs/heads/badges/badges/coverage.svg)](https://updates2mqtt.rhizomatics.org.uk/developer/coverage/)\n![Tests](https://raw.githubusercontent.com/rhizomatics/updates2mqtt/refs/heads/badges/badges/tests.svg)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/rhizomatics/updates2mqtt/main.svg)](https://results.pre-commit.ci/latest/github/rhizomatics/updates2mqtt/main)\n[![Publish Python 🐍 distribution 📦 to PyPI and TestPyPI](https://github.com/rhizomatics/updates2mqtt/actions/workflows/pypi-publish.yml/badge.svg)](https://github.com/rhizomatics/updates2mqtt/actions/workflows/pypi-publish.yml)\n[![Github Deploy](https://github.com/rhizomatics/updates2mqtt/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/rhizomatics/updates2mqtt/actions/workflows/python-package.yml)\n[![CodeQL](https://github.com/rhizomatics/updates2mqtt/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/rhizomatics/updates2mqtt/actions/workflows/github-code-scanning/codeql)\n[![Dependabot Updates](https://github.com/rhizomatics/updates2mqtt/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/rhizomatics/updates2mqtt/actions/workflows/dependabot/dependabot-updates)\n\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n\n## Summary\n\nLet Home Assistant tell you about new updates to Docker images for your containers.\n\n![Example Home Assistant update page](images/ha_update_detail.png \"Home Assistant Updates\")![Example Home Assistant Release Notes](images/ha_release_notes.png \"Home Assistant Release Notes\"){width=300} \n\nRead the release notes, and optionally click *Update* to trigger a Docker *pull* (or optionally *build*) and *update*.\n\n![Example Home Assistant update dialog](images/ha_update_dialog.png \"Home Assistant Updates\"){width=480}\n\n\n## Description\n\nUpdates2MQTT perioidically checks for new versions of components being available, and publishes new version info to MQTT. HomeAssistant auto discovery is supported, so all updates can be seen in the same place as Home Assistant's own components and add-ins.\n\nCurrently only Docker containers are supported, either via an image registry check (using either v1 Docker APIs or the OCI v2 API), or a git repo for source (see [Local Builds](local_builds.md)), with specific handling for Docker, Github Container Registry, Gitlab, Codeberg, Microsoft Container Registry and LinuxServer Registry, with adaptive behaviour to cope with most\nothers.  The design is modular, so other update sources can be added, at least for notification. The next anticipated is **apt** for Debian based systems.\n\nComponents can also be updated, either automatically or triggered via MQTT, for example by hitting the *Install* button in the HomeAssistant update dialog. Icons and release notes can be specified for a better HA experience. See [Home Assistant Integration](home_assistant.md) for details.\n\nTo get started, read the [Installation](installation.md) and [Configuration](configuration.md) pages.\n\nFor a quick spin, try this:\n\n```bash\ndocker run -v /var/run/docker.sock:/var/run/docker.sock -e MQTT_USER=user1 -e MQTT_PASS=user1 -e MQTT_HOST=192.168.1.5 ghcr.io/rhizomatics/updates2mqtt:latest\n```\n\nor without Docker, using [uv](https://docs.astral.sh/uv/)\n\n```bash\nexport MQTT_HOST=192.168.1.1;export MQTT_USER=user1;export MQTT_PASS=user1;uv run --with updates2mqtt python -m updates2mqtt\n```\n\n## Release Support\n\nPresently only Docker containers are supported, although others are planned, probably with priority for `apt`.\n\n| Ecosystem | Support     | Comments                                                                                           |\n|-----------|-------------|----------------------------------------------------------------------------------------------------|\n| Docker    | Scan. Fetch | Fetch is ``docker pull`` only. Restart support only for ``docker-compose`` image based containers. |\n  \n## Heartbeat\n\nA heartbeat JSON payload is optionally published periodically to a configurable MQTT topic, defaulting to `healthcheck/{node_name}/updates2mqtt`. It contains the current version of Updates2MQTT, the node name, a timestamp, and some basic stats.\n\n## Healthcheck\n\nA `healthcheck.sh` script is included in the Docker image, and can be used as a Docker healthcheck, if the container environment variables are set for `MQTT_HOST`, `MQTT_PORT`, `MQTT_USER` and `MQTT_PASS`. It uses the `mosquitto-clients` Linux package which provides `mosquitto_sub` command to subscribe to topics.\n\n!!! tip\n\n    Check healthcheck is working using `docker inspect --format \"{{json .State.Health }}\" updates2mqtt | jq` (can omit `| jq` if you don't have jsonquery installed, but much easier to read with it)\n\nAnother approach is using a restarter service directly in Docker Compose to force a restart, in this case once a day:\n\n```yaml title=\"Example Compose Service\"\nrestarter:\n    image: docker:cli\n    volumes: [\"/var/run/docker.sock:/var/run/docker.sock\"]\n    command: [\"/bin/sh\", \"-c\", \"while true; do sleep 86400; docker restart updates2mqtt; done\"]\n    restart: unless-stopped\n    environment:\n      - UPD2MQTT_UPDATE=AUTO\n```\n\n## Target Containers\n\nWhile `updates2mqtt` will discover and monitor all containers running under the Docker daemon,\nthere are some options to make to those containers to tune how it works.\n\nThese happen by adding environment variables or docker labels to the containers, typically inside an `.env`\nfile, or as `environment` options inside `docker-compose.yaml`.\n\n### Automated updates\n\nIf Docker containers should be immediately updated, without any confirmation\nor trigger, *e.g.* from the HomeAssistant update dialog, then set an environment variable `UPD2MQTT_UPDATE` in the target container to `Auto` ( it defaults to `Passive`).  If you want it to update without publishing to MQTT and being\nvisible to Home Assistant, then use `Silent`.\n\n```yaml title=\"Example Compose Snippet\"\nrestarter:\n    image: docker:cli\n    command: [\"/bin/sh\", \"-c\", \"while true; do sleep 86400; docker restart mailserver; done\"]\n    environment:\n      - UPD2MQTT_UPDATE=AUTO\n```\n\nAutomated updates can also apply to local builds, where a `git_repo_path` has been defined - if there are remote\ncommits available to pull, then a `git pull`, `docker compose build` and `docker compose up` will be executed.\n\n### Environment Variables\n\nThe following environment variables can be used to configure containers for `updates2mqtt`:\n\n| Env Var                    | Description                                                                                  | Default         |\n|----------------------------|----------------------------------------------------------------------------------------------|-----------------|\n| `UPD2MQTT_UPDATE`          | Update mode, either `Passive` or `Auto`. If `Auto`, updates will be installed automatically. | `Passive`       |\n| `UPD2MQTT_PICTURE`         | URL to an icon to use in Home Assistant.                                                     | Docker logo URL |\n| `UPD2MQTT_RELNOTES`        | URL to release notes for the package.                                                        |                 |\n| `UPD2MQTT_GIT_REPO_PATH`   | Relative path to a local git repo if the image is built locally.                             |                 |\n| `UPD2MQTT_IGNORE`          | If set to `True`, the container will be ignored by Updates2MQTT.                             | False           |\n                        |                 |\n| `UPD2MQTT_VERSION_POLICY` | Change how version derived from container label or image hash, `Version`,`Digest`,`Version_Digest` with default of `Auto`|\n| `UPD2MQTT_REGISTRY_TOKEN` | Access token for authentication to container distribution API, as alternative to making a call to `token` service |\n\n### Docker Labels\n\nAlternatively, use Docker labels\n\n| Label                          | Env Var                    |\n|--------------------------------|----------------------------|\n| `updates2mqtt.update`          | `UPD2MQTT_UPDATE`          |\n| `updates2mqtt.picture`         | `UPD2MQTT_PCITURE`         |\n| `updates2mqtt.relnotes`        | `UPD2MQTT_RELNOTES`        |\n| `updates2mqtt.git_repo_path`   | `UPD2MQTT_GIT_REPO_PATH`   |\n| `updates2mqtt.ignore`          | `UPD2MQTT_IGNORE`          |\n| `updates2mqtt.version_policy`  | `UPD2MQTT_VERSION_POLICY`  |\n| `updates2mqtt.registry_token`  | `UPD2MQTT_REGISTRY_TOKEN`  |\n\n\n\n```yaml title=\"Example Compose Snippet\"\nrestarter:\n    image: docker:cli\n    command: [\"/bin/sh\", \"-c\", \"while true; do sleep 86400; docker restart mailserver; done\"]\n    labels:\n        updates2mqtt.relnotes: https://component.my.com/release_notes\n```\n\n\n## Related Projects\n\nOther apps useful for self-hosting with the help of MQTT:\n\n- [psmqtt](https://github.com/eschava/psmqtt) - Report system health and metrics via MQTT\n\nFind more at [awesome-mqtt](https://github.com/rhizomatics/awesome-mqtt)\n\nFor a more powerful Docker focussed update manager, try [What's Up Docker](https://getwud.github.io/wud/)\n\n## Development\n\nThis component relies on several open source packages:\n\n- [docker-py](https://docker-py.readthedocs.io/en/stable/) SDK for Python for access to Docker APIs\n- [Eclipse Paho](https://eclipse.dev/paho/files/paho.mqtt.python/html/client.html) MQTT client\n- [OmegaConf](https://omegaconf.readthedocs.io) for configuration and validation\n- [structlog](https://www.structlog.org/en/stable/) for structured logging and [rich](https://rich.readthedocs.io/en/stable/) for better exception reporting\n- [hishel](https://hishel.com/) for caching metadata\n- [httpx](https://www.python-httpx.org) for retrieving metadata\n- The Astral [uv](https://docs.astral.sh/uv/) and [ruff](https://docs.astral.sh/ruff/) tools for development and build\n- [pytest](https://docs.pytest.org/en/stable/) and supporting add-ins for automated testing\n- [usingversion](https://pypi.org/project/usingversion/) to log current version info\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhizomatics%2Fupdates2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhizomatics%2Fupdates2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhizomatics%2Fupdates2mqtt/lists"}