-
Notifications
You must be signed in to change notification settings - Fork 325
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
add mdns discovery for network coordinators #704
Conversation
rev 1 1 adapter support
Thanks for the PR, in order to get this merged:
|
|
Can you try to do a |
removed the timer in the detection function, improved messages in the log, added missing types
Unfortunately that didn't help so I'll look here sometimes. |
why line 107 is uncovered? |
After the PR to the documentation, I will update the code and add a links to the documentation in the error messages |
src/adapter/adapter.ts
Outdated
const mdnsDevice = serialPortOptions.path.substring(7); | ||
if(mdnsDevice.length == 0){ | ||
throw new Error( | ||
`You must specify the adapter type after mdns://`+ |
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.
Do I understand correctly that the adapter type has to be specified in the serial.port
? What about using the existing serial.adapter
?
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.
This is a misunderstanding, I meant MDNS service type. This error text really needs to be edited.
The user needs to specify only the MDNS service type of the device, all other configuration data will be received from the device via Zeroconf
Potentially, all Zeroconf devices listed here should work except tube
tube uses the esphomelib type, that is, if there are other esphome devices on the network, they will probably be found instead of the coordinator
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 see, this means that the config from the z2m configuration.yaml
is ignored?
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.
True, some parameters from the config will be ignored because they will be received from the coordinator
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 see, this should be clearly stated in the docs, could you make a pr for the docs? (https://www.zigbee2mqtt.io/guide/configuration/adapter-settings.html)
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.
yes, I'm currently working on PR for docs
So the links exceed the length limit, how should I shorten them? |
@Koenkk |
@Tarik2142 I made some updates, can you check if everything is still ok? If yes, I will merge this. |
@Koenkk Also tested handling of some errors, except the wrong packet, this requires changing the firmware of the coordinator |
Great, thanks for this cool feature! |
@Tarik2142 sorry for the ping; what functionalities this PR would bring to a user? I am just curious about it 👀 |
https://www.zigbee2mqtt.io/guide/configuration/adapter-settings.html#mdns-zeroconf-discovery |
I described everything in the request here #Koenkk/zigbee2mqtt#17430


I don't know much about typescript so improvements are welcome