-
Notifications
You must be signed in to change notification settings - Fork 298
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
base: master
Are you sure you want to change the base?
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 |
1590249
to
5c86de2
Compare
d8bf2b7
to
c16b7f1
Compare
pathRegex: '.*SLZB-07p7.*', | ||
}, | ||
{ | ||
// TubesZB ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tube0013 Can you take a look at the TubesZB fingerprints and confirm the data? If you can also provide the fingerprints for your other devices, that'd be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to be adopting the generic zeroconf/mdns discovery coming to HA/ZHA: home-assistant/core#126294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are for USB. You don't have any USB device? I found a couple of fingerprints in zigpy code, but maybe they are no longer relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad I should read, this info is still valid: https://github.com/home-assistant/core/blob/dcb6c9a13375d5db73211f250a52c5342d36307d/homeassistant/components/zha/manifest.json#L51
through L57.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you set the manufacturer
property as well? (that would add an extra bit of info to match against).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set product string to "TubesZB" and serial is set as 971207DO or 971229NY
At least on the ch340b I'm not aware how to write a manufacturer string.
TODO:
Adapter.create
(should remove most of the logic)adapter.autoDetectPath
,adapter.isValidPath
and definitions in all drivers