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

[hdpowerview] Firmware versions are fetched at every poll cycle #13154

Closed
jlaur opened this issue Jul 21, 2022 · 0 comments · Fixed by #13155
Closed

[hdpowerview] Firmware versions are fetched at every poll cycle #13154

jlaur opened this issue Jul 21, 2022 · 0 comments · Fixed by #13155
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@jlaur
Copy link
Contributor

jlaur commented Jul 21, 2022

Expected Behavior

Firmware versions should be fetched when binding is initialized, and optionally with low frequency after that.

Current Behavior

Version information is fetched at every poll cycle, i.e. once per minute with default settings.

Possible Solution

Root cause is that method updateFirmwareProperties does not cache the firmware information instance variable firmwareVersions, but only in local variable of same name. The reason why the instance variable was introduced was having the ability to check cached firmware version in logic which needed to know whether on V1 or V2 hub because of #11856. However, the final fix didn't need this information after all, so it should be dropped and replaced by a timestamp instead, so it could be invalidated after some time.

Steps to Reproduce

Enable debug logging and observe that GET /api/fwversion requests are made every minute:

2022-07-21 11:42:52.649 [DEBUG] [ternal.handler.HDPowerViewHubHandler] - Main processor firmware version received: PV Hub2.0, 2.0.1056
2022-07-21 11:42:52.660 [DEBUG] [ternal.handler.HDPowerViewHubHandler] - Radio firmware version received: 2.0.2610

Context

This is a regression of #11979.

@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Jul 21, 2022
@jlaur jlaur self-assigned this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant