python-wled icon indicating copy to clipboard operation
python-wled copied to clipboard

WLED latest version fetched on every update

Open Xitee1 opened this issue 1 year ago • 8 comments

Problem/Motivation

Related to: https://github.com/home-assistant/core/issues/93475 Every time the state gets updated, the update sensor in HA goes unavailable. It looks like this is caused by this library as every time this https://github.com/frenck/python-wled/blob/d2cdb35f63ebaf032c0d0dc50bbf3e30d0921598/src/wled/wled.py#L236 function is called, the version is fetched from GitHub.

Expected behavior

After the versions have been fetched, cache and re-use them (unless the full_update parameter is set to True).

Actual behavior

Version gets fetched again.

Steps to reproduce

  • Use the WLED integration in HomeAssistant and toggle a the light switch
  • Watch how the firmware update sensor goes to Unkown

Xitee1 avatar Dec 23 '23 15:12 Xitee1

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Jan 23 '24 08:01 github-actions[bot]

Still an issue.

Xitee1 avatar Jan 23 '24 17:01 Xitee1

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Feb 23 '24 08:02 github-actions[bot]

Still an issue.

Xitee1 avatar Feb 23 '24 08:02 Xitee1

Having the same issue image

DL099 avatar Mar 10 '24 15:03 DL099

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Apr 10 '24 08:04 github-actions[bot]

Still an issue.

Xitee1 avatar Apr 10 '24 08:04 Xitee1

I have no idea if this is related but today GitHub has massively throttled the download speed of a release file. After turning on my VPN (so changing my IP address), the down speed jumped from 200kb/s to so fast that the 150mb file was finished before I had time to look at the speed.. so about 50mb/s I think (max possible). This was not related to my GH account since it was also that slow without being signed in. It was limited by my IP address.

Nevertheless, this issue should really get addressed to reduce the API call amount on GH servers.

Xitee1 avatar Apr 23 '24 21:04 Xitee1

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar May 24 '24 08:05 github-actions[bot]

Still an issue.

Xitee1 avatar May 24 '24 08:05 Xitee1

I have some WLED controllers coming in and was taking a look at the integration and this library. I decided to dig into this out of curiosity.

If I am reading the code correctly the call to get_wled_versions_from_github() is in fact using a cache for both the stable and beta versions. What ended up convincing you it was python-wled that was making the calls?

DavidWhelan avatar Jun 03 '24 19:06 DavidWhelan

This will be addressed by #1334

In which, the WLED instance isn't doing any communication with GitHub anymore. Instead, I've separated the WLED & GitHub versioning checking, allowing Home Assistant to run a single, dedicated coordinator for getting update information without interfering with any WLED device communication.

frenck avatar Jun 19 '24 10:06 frenck

Fixed in this library by #1334

frenck avatar Jun 19 '24 18:06 frenck