Skip to content

Discrepancy between GUI and Home Assistant #510

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

Open
LorenKeagle opened this issue Dec 14, 2024 · 8 comments
Open

Discrepancy between GUI and Home Assistant #510

LorenKeagle opened this issue Dec 14, 2024 · 8 comments

Comments

@LorenKeagle
Copy link

LorenKeagle commented Dec 14, 2024

Using WUD 7.1.1, I have a situation where the WUD GUI is correctly indicating that there is no update available for a container, but the MQTT telemetry to Home Assistant is still indicating one:

Screenshot 2024-12-14 at 2 30 43 AM

Screenshot 2024-12-14 at 2 30 22 AM

Here is my WUD compose file:

services:
  whatsupdocker:
    image: getwud/wud:7.1.1
    container_name: wud
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 3000:3000
    environment:
      - WUD_WATCHER_LOCAL_WATCHALL=true
      - WUD_TRIGGER_MQTT_MOSQUITTO_URL=mqtt://xxx.xxx.xxx.xxx:1883
      - WUD_TRIGGER_MQTT_MOSQUITTO_HASS_ENABLED=true
      - WUD_TRIGGER_MQTT_MOSQUITTO_HASS_DISCOVERY=true
      - WUD_TRIGGER_MQTT_MOSQUITTO_USER=**********
      - WUD_TRIGGER_MQTT_MOSQUITTO_PASSWORD=**********
      - WUD_REGISTRY_LSCR_USERNAME=**********
      - WUD_REGISTRY_LSCR_TOKEN=**********
    labels:
      - 'wud.tag.include=^\d+\.\d+\.\d+$'
      - 'wud.watch.digest=true'
   

And here is the compose entry for the container in question:

  unifi-db:
    image: mongo:7
    container_name: unifi-db
    volumes:
      - ./mongodb/data:/data/db
      - ./mongodb/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
    restart: unless-stopped
    labels:
      - 'wud.tag.include=^7+\.\d+\.\d+$'
      - 'wud.watch.digest=true'

This may be an edge condition related to the usage of the "mongo:7" tag to pull the latest version of mongo 7.x.x. I have a feeling that this is due to WUD blindly reporting "current version = 7" vs "latest version = 7.0.15" in the MQTT message. Is it not possible for WUD to figure out the actual version that is currently installed using the image ID? I was hoping that would be handled with the "wud.watch.digest=true" configuration, as that flag is supposed to look up all images from the repository.

@cryptogeek13
Copy link

Are you sure Home Assistant shows an update? I do have the same issue sometimes, but so far that was gone after destroying HA browser cache and reloading.

@adorobis
Copy link

adorobis commented Mar 19, 2025

I have the same problem for some images. Clearing cache does not resolve the problem. It is visible not only in HA but also in the WUD web interface, at the same time portainer shows that there is no updated version available.
Good example is https://hub.docker.com/layers/minimworld/minimserver/latest/images/sha256-48de01ed32dbce6507b24aa63a737c8dbda17274511add41cbf8345f75787f6f
Last push to Docker Hub was 2 years ago and still WUD shows that update is available for it.

@cryptogeek13
Copy link

It is visible not only in HA but also in the WUD web interface.

That's a different issue, not the same. I'd suggest opening a separate issue, after checking, if there might be already an issue for your problem.

More info about your setup and used labels would also help.

@adorobis
Copy link

That's a different issue, not the same. I'd suggest opening a separate issue, after checking, if there might be already an issue for your problem.

True. Actually I have opened it earlier: #518

@LorenKeagle
Copy link
Author

Yes, Home Assistant is definitely still showing the update. Since creating this ticket, I've updated that container twice, and the change is reflected in the HA entity:

Image

The WUD UI still correctly shows the entity as having no update:

Image

To be fair, this may be an issue with the logic in HA doing a simple string comparison between the installed/latest versions. However, this data is coming from WUD so I believe WUD should be sending the actual detected full version string as the 'current' version, rather than the "7" label. You could make the case that HA could fix this on their end by doing better semantic comparison between "7" and "7.0.17" in their Update entities, but I don't think that's a good approach. WUD has the logic configured to recognize that the container is up to date, and the data it's sending to HA should be cognizant of whatever logic HA is operating with so that the states are consistent.

@cryptogeek13
Copy link

What I meant by that is: If you go into developer tools in Home Assistant and search for the update entity, what does it show there? Can you provide that? My guess was, that your browser is showing you an old entity that does not exist anymore. Atleast that's what happened to me a few times already and was fixed by clearing browser cache.

If you can provide the actual state of the update sensor in home assistant, that would help nonetheless.

@LorenKeagle
Copy link
Author

It's definitely a real entity:

Image

@cryptogeek13
Copy link

cryptogeek13 commented Mar 20, 2025

Okay, so first thing you can try: click the manual trigger button for that container in wud web UI. That should send a fresh sensor update to homeassistant. I doubt that it will fix this, but who knows.

Second thing: what goal are you trying to achieve with you wud.tag.include regex? Do you just want version 7 and use digest watching on that? Then the regex you need would be simply ^7$. Right now you are only matching tags, that are full semver down to patch level and start with one or more sevens. E.g. 7.0.17 or 77.99.99, but it won't match your current version 7.

Possible that WUD is confused because your wud.tag.include does not match your installed version? But I'm just guessing right now tbh. Sounds definetly like bug, that it's reporting something else to home assistant than showing in it's own UI. But maybe there is atleast a workaround.

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

No branches or pull requests

3 participants