Skip to content

Invalid update notification #59

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
basrieter opened this issue Mar 19, 2025 · 11 comments
Open

Invalid update notification #59

basrieter opened this issue Mar 19, 2025 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@basrieter
Copy link

basrieter commented Mar 19, 2025

Describe the bug
The HA integration shows available updates for Pi-Hole, however, Pi-Hole it self does not show any updates:

Expected behavior
The update notification should be in line with Pi-Hole itself.

Screenshots

Image

Image

The latest version also appears empty?
Image

Home Assistant version:
HA Core 2025.3.3 and web 20250306.0
Image

Latest v1.8.0 of the integration
Image

Additional context
Dunno of this is important, but I have 2 Pi-Hole instances configured in Home Assistant.

@bastgau
Copy link
Owner

bastgau commented Mar 19, 2025

Not the same issue on my both instances.

Can you tell me if the API provide an information on your side ?

Screenshot_2025-03-19-14-35-21-85_c3a231c25ed346e59462e84656a70e50.jpg

@basrieter
Copy link
Author

How can I check what the API is returning?

@bastgau
Copy link
Owner

bastgau commented Mar 19, 2025

You have to navigate into this page on your Pi-hole instance.

http://<url>:<port>/api/docs

The information is provided by the route GET /padd.

@basrieter
Copy link
Author

It returns:

{
  "recent_blocked": "xxxxx",
  "active_clients": 24,
  "gravity_size": 594370,
  "top_domain": "xxxxx",
  "top_blocked": "xxxxx",
  "top_client": "xxxxx",
  "blocking": "enabled",
  "queries": {
    "total": 10285,
    "blocked": 342,
    "percent_blocked": 3.325230836868286
  },
  "cache": {
    "size": 10000,
    "inserted": 5724,
    "evicted": 0
  },
  "system": {
    "uptime": 12407,
    "memory": {
      "ram": {
        "total": 16233196,
        "free": 12733068,
        "used": 2022640,
        "available": 13893100,
        "%used": 12.45990007143387
      },
      "swap": {
        "total": 4194300,
        "free": 4194300,
        "used": 0,
        "%used": 0
      }
    },
    "procs": 593,
    "cpu": {
      "nprocs": 4,
      "load": {
        "raw": [
          0.04638671875,
          0.11328125,
          0.162109375
        ],
        "percent": [
          1.15966796875,
          2.83203125,
          4.052734375
        ]
      }
    }
  },
  "node_name": "xxxxx",
  "host_model": null,
  "iface": {
    "v4": {
      "addr": "192.168.x.x",
      "rx_bytes": {
        "value": 315.896,
        "unit": "K"
      },
      "tx_bytes": {
        "value": 96.455,
        "unit": "K"
      },
      "num_addrs": 1,
      "name": "eth0",
      "gw_addr": "192.168.x.x"
    },
    "v6": {
      "addr": null,
      "num_addrs": 0,
      "name": "eth0",
      "gw_addr": null
    }
  },
  "version": {
    "core": {
      "local": {
        "version": "v6.0.5",
        "branch": "master",
        "hash": "9fe687bd"
      },
      "remote": {
        "version": "",
        "hash": ""
      }
    },
    "web": {
      "local": {
        "version": "v6.0.2",
        "branch": "master",
        "hash": "25441178"
      },
      "remote": {
        "version": "",
        "hash": ""
      }
    },
    "ftl": {
      "local": {
        "hash": "b7eb53bf",
        "branch": "master",
        "version": "v6.0.4",
        "date": "2025-03-04 17:22:10 +0000"
      },
      "remote": {
        "version": "",
        "hash": ""
      }
    },
    "docker": {
      "local": "2025.03.0",
      "remote": ""
    }
  },
  "config": {
    "dhcp_active": false,
    "dhcp_start": "",
    "dhcp_end": "",
    "dhcp_ipv6": false,
    "dns_domain": "xxxxx",
    "dns_port": 53,
    "dns_num_upstreams": 2,
    "dns_dnssec": false,
    "dns_revServer_active": false
  },
  "%mem": 0.24759142100811005,
  "%cpu": 9.310455322265625,
  "pid": 49,
  "sensors": {
    "cpu_temp": 28,
    "hot_limit": 60,
    "unit": "C"
  },
  "took": 0.04741621017456055
}

@bastgau
Copy link
Owner

bastgau commented Mar 19, 2025

Thanks for your help.

I cannot explain why the remote versions are empty.

I compare the local version and remote version to determinate if a new version is available.

"version": {
    "core": {
      "local": {
        "version": "v6.0.5",
        "branch": "master",
        "hash": "9fe687bd"
      },
      "remote": {
        "version": "",
        "hash": ""
      }
    },
    "web": {
      "local": {
        "version": "v6.0.2",
        "branch": "master",
        "hash": "25441178"
      },
      "remote": {
        "version": "",
        "hash": ""
      }
    },
    "ftl": {
      "local": {
        "hash": "b7eb53bf",
        "branch": "master",
        "version": "v6.0.4",
        "date": "2025-03-04 17:22:10 +0000"
      },
      "remote": {
        "version": "",
        "hash": ""
      }
    },
    "docker": {
      "local": "2025.03.0",
      "remote": ""
    }
  },

I could consider treating the empty value as null and displaying 'unknown' instead. I'm not sure which option would be better.

Maybe you could open an issue on the Pi-hole github repository : https://github.com/pi-hole/pi-hole/issues

@basrieter
Copy link
Author

I guess, the issues is at their side, but it would be nice to ignore these empty values and not show them as updates?

@basrieter
Copy link
Author

Please see: pi-hole/pi-hole#6099 (comment)

If Pi-Hole runs in a docker instance, only the docker tag should be considered.

@rdwebdesign
Copy link

@basrieter @bastgau

Please, check my answer on the linked issue.

I'm not sure why the versions were empty, but in future Pi-hole versions this condition will return null instead of empty strings (fixed in development, but not released yet).

Also, I recommend you to check only for docker tags inside containers. If you check the individual components, there will be false positives when there is a new release for a component, but not a new docker image. Users will try to update, but nothing will change and the update message will still be there.

@bastgau
Copy link
Owner

bastgau commented Mar 20, 2025

@basrieter @bastgau

Please, check my answer on the linked issue.

I'm not sure why the versions were empty, but in future Pi-hole versions this condition will return null instead of empty strings (fixed in development, but not released yet).

Also, I recommend you to check only for docker tags inside containers. If you check the individual components, there will be false positives when there is a new release for a component, but not a new docker image. Users will try to update, but nothing will change and the update message will still be there.

Thanks for the information.

With null value, the update availability status will be "unknown".

@bastgau
Copy link
Owner

bastgau commented Mar 20, 2025

Please see: pi-hole/pi-hole#6099 (comment)

If Pi-Hole runs in a docker instance, only the docker tag should be considered.

The user can disable the sensors which are not relevant for him.

@bastgau
Copy link
Owner

bastgau commented Mar 20, 2025

Thanks for the information.

With null value, the update availability status will be "unknown".

The user can disable the sensors which are not relevant for him.

@bastgau bastgau added the question Further information is requested label Mar 20, 2025
@bastgau bastgau self-assigned this Mar 30, 2025
@bastgau bastgau added enhancement New feature or request priority - low Low priority and removed question Further information is requested labels Mar 30, 2025
@bastgau bastgau removed the priority - low Low priority label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants