DHCP discovery only works on the first interface
The problem
Hi, I noticed that new fancy tool for browsing discoveries (DHCP) shows only devices from single subnet (My HA instance is connected to multiple VLANS). So, I tried to peak a little into the aiodhcpwatcher and it looks like it only ever listens on single interface.
What version of Home Assistant Core has the issue?
core-2025.5.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
DHCP discovery
Link to integration documentation on our website
https://www.home-assistant.io/integrations/dhcp/
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (dhcp) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of dhcp can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign dhcpRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
dhcp documentation dhcp source (message by IssueLinks)
So I was able to find what's going on. aiodhcpwatcher is using only conf.iface from scapy.config therefore it cannot capture packets anywhere else. So it "should" proly create multiple sockets using conf.ifaces.
You're right — the dhcp discovery integration currently isn't aware of the full network configuration. At the moment, only Zeroconf and SSDP use the network integration to configure sockets.
If you're interested, we'd definitely consider a PR that extends DHCP discovery to use the network settings as well. That said, it's unlikely we'll add support for this ourselves unless a contributor steps up, since we typically don't go out of our way to support non-default network setups without community involvement.
Hey @bdraco, technical question.. Should I do aiodhcpwatcher bump and changes in single PR or separately?