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: support pre-filling the DSK and scanning DSK-only QRs #5309

Merged
merged 4 commits into from Jan 12, 2023

Conversation

AlCalzone
Copy link
Member

@raman325 @robertsLando

This is an attempt at supporting QR codes that only include the DSK (prefixed or unprefixed). I tried to add this functionality to the API without breaking changes - doing this as part of parseQRCodeString would require changes to the return type which in turn would require application-level checks to decide what to do with the info.

The downside is that after scanning, applications need to first check if the QR code string is a valid DSK (tryParseDSKFromQRCodeString) and if yes use the S2 inclusion strategy with pre-filled DSK.
If not, attempt to parse the encoded info from the QR code string as they do now.

Thoughts?

fixes: #5205

robertsLando
robertsLando previously approved these changes Jan 9, 2023
Copy link
Member

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for me 👍🏼

@raman325
Copy link
Contributor

raman325 commented Jan 10, 2023

so if I understand this correctly, the existing logic would not work for this type of QR code, both before and after the change. After this change, we'd have to add explicit support by adding a logic branch that checks the QR code against this new function and branches off to inclusion strategy with pre-filled DSK if it's this type of QR code?

If I got that right, this looks like a great way to solve this problem without breaking anything.

@AlCalzone
Copy link
Member Author

Correct

@robertsLando
Copy link
Member

@AlCalzone Could that function be 'safe' so I can use it directly on frontend?

@AlCalzone
Copy link
Member Author

done

@robertsLando
Copy link
Member

Perfect! That would make it even easier to integrate :)

@AlCalzone AlCalzone merged commit f112d3d into master Jan 12, 2023
@AlCalzone AlCalzone deleted the dsk-only-qrcode branch January 12, 2023 15:10
@AlCalzone
Copy link
Member Author

@zwave-js-bot pack this

@zwave-js-bot
Copy link
Collaborator

😥 Seems like this PR cannot be merged. Please fix the merge conflicts and try again.

AlCalzone added a commit that referenced this pull request Jan 16, 2023
### Features
* Support OTW firmware updates of 500 and 700+ series controllers (#5321, #5326)
* Parallel firmware updates and soft/hard reset during ongoing firmware updates is now prevented (#5220)
* Added a readonly `rfRegion` property to the `Controller` class (#5288)
* Added support for requesting region-specific firmware updates from the update service (#5296)
* Allow configuring the number of kept logfiles (#5294)
* Added support for the `Inclusion Controller CC` which allows secondary controllers in the network to include devices on behalf of Z-Wave JS (#4851)
* Added support for scanning QR codes that only contain the DSK, as well as pre-filling the DSK before the inclusion process (#5309)

### Bugfixes
* Known Wake Up CC version no longer gets overwritten with 1 (#5261)
* Surrounding whitespace in S2 or SmartStart QR codes now gets ignored (#5295)
* Always use S2 for endpoint communication if the node uses S2 (#5310)
* Distinguish between protocol and SDK version on 500 series (#5323)

### Config file changes
* Add metadata for Sensative strips (#5223)
* Add Ring Retrofit Alarm Kit (#5299)
* Correct value size for some Nortek/GoControl device params (#5297)
* Correct low temp threshold for Aeotec aërQ (#5286)
* Add fingerprint for Fibaro FGWP102 (#5280)
* Add metadata to Aeotec aërQ (#5224)
* Allow higher minimum dim level for Inovelli LZW31-SN, FW 1.57+ (#5181)
* Add Zooz 800 series controllers (#5324)

### Changes under the hood
* Removed a workaround for broken caching in the `got` library (#5090)
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.

Smart Start: QR Code inclusion
4 participants