-
Notifications
You must be signed in to change notification settings - Fork 303
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!: Improved adapter discovery. #1197
Conversation
@kirovilya Can you provide a fingerprint for the nordic adapter? I'll clean up the matching/tests with it. import {SerialPort} from 'zigbee-herdsman/dist/adapter/serialPort.js';
const list = await SerialPort.list();
console.log(list); |
|
Whatever comes out of the bit of code I mentioned above should have it all; mostly the path. This PR improves upon the discovery a bit, more refined using regex matching against the paths. See the |
and in windows
|
edb7e2f
to
113a7f0
Compare
there is also a proposal to extract the serial port from the adapters and transfer the ready-made connection inside. |
It would require adding more variables to |
d8bf2b7
to
c16b7f1
Compare
350a9d7
to
d39ff99
Compare
d39ff99
to
057d5e3
Compare
Could you target this against the |
…more coverage. Cleanup.
efd4fc6
to
ecbbe12
Compare
* feat: Improved adapter discovery. * Fix. * Update + tests. * Add alt regex matching on `pnpId`. * Feedback. * Lower log level on specified config matching fail. * Improve matching logic to avoid false positive. * Restrict search by config as much as possible. Reorganize tests, add more coverage. Cleanup. * More fingerprints * Add fingerprint for SMLight slzb-07mg24 * Add additional fingerprints + tests * Better matching with scoring. * Remove `auto` from Adapter type. --------- Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
TODO:
Adapter.create
(should remove most of the logic)adapter.autoDetectPath
,adapter.isValidPath
and definitions in all drivers