github MichelFR/MqDockerUp v2.1.0

latest release: v2.2.0
2 hours ago

๐Ÿ“‰ Far less MQTT traffic

MqDockerUp used to republish every container's full set of Home Assistant discovery configs and state on every check โ€” roughly 17 retained messages per container every 5 minutes, almost all of them byte-for-byte identical to the last time. On top of that, every Docker event and every button press in Home Assistant triggered that full sweep for the whole fleet (twice for button presses).

This release makes MqDockerUp quiet unless something actually changed:

  • Publish on change โ€” retained messages are only sent when their payload differs from what was published before. In steady state a check produces no traffic at all. The cache is reset on every MQTT (re)connect, so a restarted broker still receives everything.
  • Targeted refreshes โ€” Docker events and Home Assistant commands now refresh only the affected container instead of sweeping the fleet. Events arriving close together are batched and deduplicated per container. Vanished containers are removed, renamed ones are re-keyed.
  • One Docker inspect pass per check, shared by discovery, state and update publishing (was three).
  • No more repeated Docker Hub lookups โ€” source repository lookups now cache misses too, so images without an org.opencontainers.image.source label no longer hit the Docker Hub API on every update check.
  • Intervals are created once โ€” previously every MQTT reconnect started another set of check timers, multiplying the load over time.

๐Ÿ› Bug fixes

  • Entity removal now works. Removing a container from Home Assistant requires an empty retained payload; MqDockerUp was sending {} instead, which Home Assistant rejects and which left junk retained messages on the broker.
  • Release links in the update entity โ€” the GitHub URL parser for Docker Hub descriptions never actually returned a URL. release_url now points at the image's GitHub releases when a [github](โ€ฆ) link is present.
  • Updated containers are tracked again โ€” after an update the new container was added to the database before its discovery topics were recorded, so they could never be cleaned up later.
  • The legacy (haLegacy) update payload no longer includes an ever-changing last_check timestamp, which forced a state change on every check.

๐Ÿงน Under the hood

Discovery configs, MQTT commands and Docker event handling are now table-driven; ~300 lines of copy-pasted entity and command blocks are gone. Entity unique_ids are unchanged, so existing Home Assistant entities, names and customizations are preserved.

Full Changelog: v2.0.2...v2.1.0

Don't miss a new MqDockerUp release

NewReleases is sending notifications on new releases.