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

feat: pass user agent to firmware update service #5031

Merged
merged 4 commits into from
Sep 9, 2022
Merged

Conversation

AlCalzone
Copy link
Member

@AlCalzone AlCalzone commented Sep 9, 2022

With this PR, we pass a user agent containing the driver version to the firmware update service.

For this reason, a few new options to configure the user-agent are added:

  1. An optional driver option userAgent. This will become mandatory in future releases.
  2. The method updateUserAgent.

Both accept a Record<string, string> where the key is the application/component/module name and the value is the version. In updateUserAgent the version can be explicitly set to null/undefined to remove a component.

If no user agent is configured, but the application has enabled statistics, the application name and version will be taken from there.

fixes: #5002
/cc @balloob

@AlCalzone
Copy link
Member Author

PR updated. User agent can now be passed as a driver option and updated later. It also matches the usual format app1/ver1 app2/ver2 ... now.

@AlCalzone AlCalzone changed the title feat: pass user agent to firmware update service, including application name and version when enabled feat: pass user agent to firmware update service Sep 9, 2022
@AlCalzone AlCalzone merged commit 34f7072 into master Sep 9, 2022
@AlCalzone AlCalzone deleted the user-agent branch September 9, 2022 17:53
AlCalzone added a commit that referenced this pull request Sep 9, 2022
### Features
* Cache responses from firmware update service and queue requests (#5030)
* Make user agent configurable and pass it to firmware update service (#5031)

### Bugfixes
* Fixed an issue where `ThermostatModeCC` would save its values twice (#5019)
* Ensure value ID received from outside code is valid and normalized before passing through (#5036)
* Merge notification metadata for variables with multiple states (#5037)

### Changes under the hood
* Added a test to ensure that `SupervisionCCReport` with status `Success` is always final, even if `more updates follow` is incorrectly set to `true` (#4963)
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

Successfully merging this pull request may close these issues.

Allow passing user agent to retrieve available firmware updates
2 participants