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

MQTT Enhancements for Home Assistant #1162

Open
LorenKeagle opened this issue Apr 26, 2024 · 1 comment
Open

MQTT Enhancements for Home Assistant #1162

LorenKeagle opened this issue Apr 26, 2024 · 1 comment

Comments

@LorenKeagle
Copy link

Description

I've recently attempted to integrate Diun into my Home Assistant installation for reporting docker image updates using the Home Assistant MQTT Update provider.

From the documentation:

state_topic string (optional)
The MQTT topic subscribed to receive state updates. The state update may be either JSON or a simple string with installed_version value. When a JSON payload is detected, the state value of the JSON payload should supply the installed_version and can optional supply: latest_version, title, release_summary, release_url or an entity_picture URL.

The issue with the data provided from Diun is that it only contains information about the detected update. Ideally, the JSON payload could provide the "installed_version" and "latest_version" entries, as well as the container name and other attributes supported by this Home Assistant provider.

In addition, sending all updates through a single topic is not ideal, as this provider will only generate a single entity. A dynamic topic such as docker/diun/<container_name> would make things much easier.

Of course, a dedicate Home Assistant integration would be ideal from a user perspective, but this seems like the most direct way to integrate multiple container update entities with minimal configuration and state tracking.

@linuxdaemon
Copy link

Supporting templated topics like telegraf or similar tools do would work, allowing things like topic: docker/diun/{{ .Container.Name }} to allow for more control. I suppose a payload template as well would allow for a nice generic solution to this, allowing a user to set the payload structure as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants