Skip to content

Add opt-in toggle for zwave-js telemetry to config panel#8958

Merged
bramkragten merged 3 commits into
home-assistant:devfrom
cgarwood:zwjs_third_party_telemetry
Apr 26, 2021
Merged

Add opt-in toggle for zwave-js telemetry to config panel#8958
bramkragten merged 3 commits into
home-assistant:devfrom
cgarwood:zwjs_third_party_telemetry

Conversation

@cgarwood
Copy link
Copy Markdown
Member

Proposed change

Add a card with toggle switch for opting into the Z-Wave JS data collection/telemetry. Open to suggestions on better wording for the card. There was some talk on Discord in #devs_zwave about not making it translatable, so I haven't done translations, but happy to change that if desired.

Backend PR has been merged.

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@AlCalzone
Copy link
Copy Markdown
Contributor

Open to suggestions on better wording for the card.

Our "template" text is probably a bit long: https://zwave-js.github.io/node-zwave-js/#/data-collection/user-disclosure
Nonetheless, I'd add two things:

  1. We only collect software versions and device identifiers
  2. The information is important to focus our development efforts and improve the user experience

@raman325
Copy link
Copy Markdown
Contributor

Posting here for visibility - there's three states: no preference specified (parameter value of null), opted out (false), and opted in (true). I think we wanted those to be distinct in the UI

@cgarwood
Copy link
Copy Markdown
Member Author

Currently, the toggle switch will always show the current state (if telemetry is no-preference or disabled in HA, but someone uses zwjs2mqtt and enabled it there, the toggle will show on).

Toggling the switch on or off in HA will always set the setting in HA to the state of the switch and enable or disable on the server.

@raman325
Copy link
Copy Markdown
Contributor

Currently, the toggle switch will always show the current state (if telemetry is no-preference or disabled in HA, but someone uses zwjs2mqtt and enabled it there, the toggle will show on).

Toggling the switch on or off in HA will always set the setting in HA to the state of the switch and enable or disable on the server.

@MartinHjelmare FYI ^

@MartinHjelmare
Copy link
Copy Markdown
Member

MartinHjelmare commented Apr 26, 2021

That sounds good and in accordance to what we've discussed I think. Right, @raman325?

Ie, the three states are still working as planned in the backend, even if the user will only see two states.

@raman325
Copy link
Copy Markdown
Contributor

raman325 commented Apr 26, 2021

It's slightly different, but arguably better. In the case of using zwavejs2mqtt, I can opt in on the server side and then never provide a preference in HA, and it will always show as enabled because z2m will enable statistics on startup (so the only thing a user can do within HA in this scenario is opt out). The downside to this approach is that for those users, we will not be able to share the HA version being used

@raman325
Copy link
Copy Markdown
Contributor

Currently, the toggle switch will always show the current state (if telemetry is no-preference or disabled in HA, but someone uses zwjs2mqtt and enabled it there, the toggle will show on).

Toggling the switch on or off in HA will always set the setting in HA to the state of the switch and enable or disable on the server.

BTW just rereading this - if the user explicitly opts out, HA will disable statistics on startup, so the flag will show as off.

@MartinHjelmare
Copy link
Copy Markdown
Member

If the user opts out and then opts in again, it will activate Home Assistant version reporting, right?

All in all, it's ok I think. Any other thoughts or change suggestions?

@raman325
Copy link
Copy Markdown
Contributor

If the user opts out and then opts in again, it will activate Home Assistant version reporting, right?

All in all, it's ok I think. Any other thoughts or change suggestions?

That's correct, and I agree. Just wanted to make sure you saw it since we were discussing it

@MartinHjelmare
Copy link
Copy Markdown
Member

MartinHjelmare commented Apr 26, 2021

Open to suggestions on better wording for the card.

Our "template" text is probably a bit long: zwave-js.github.io/node-zwave-js/#/data-collection/user-disclosure
Nonetheless, I'd add two things:

1. We only collect software versions and device identifiers

2. The information is important to focus our development efforts and improve the user experience

We want to avoid having to keep track of the details of the data collection metrics here in the Home Assistant frontend, so we won't add 1. at this time. We have added 2.

@bramkragten bramkragten merged commit b7a4f97 into home-assistant:dev Apr 26, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants