[DHCP] add configuration options

Current issue

Currently, there’s one configuration choice for users: omitting the dhcp: key from your configuration.

In order to do so, you must stop using default_config:. Meaning you effectively “stop receiving updates” for every other entry in the default config.

Feature request

Offer a few configuration options for the DHCP discovery integration, such that:

  • Users don’t need to avoid default_config: to manage the DHCP behavior.
  • Users gain more granular control over it’s behavior as a nice bonus.

Examples

There is an active scanner, and passive listener part in the integration. (source)
These might have their own enable/disable option.

dhcp:
  passive_watcher: true
  active_watcher: true

The active scan also has a fixed interval of 1 hour (source).
This might be a good tuning parameter.

dhcp:
  # Daily, rather than hourly.
  scan_interval_minutes: 1440

Motivation for configuration

The active scan in particular is not very efficient compared to discovery methods that can leverage multicast. There are multiple reports of the DNS PTR “request spam”. A necessary evil for this discovery approach to work.

In many scenarios ~250 probes per hour with a high cache ratio may be a totally reasonable load. And for the out-of-box experience for new hass installs, it makes sense to include many discovery methods.

But in other scenarios it might not be justified. For instance when:

  • The load is noticeable for under-powered networking equipment.
    Like a small pi-hole, router-firewall appliance, etc.
  • Because of network segmentation this method won’t find anything.
  • The devices you care about also support other options like ssdp or zeroconf.
  • Your network is stable / you’re not actively adding devices.

Any of those could be valid reasons to disable dhcp: after an initial setup round.

In my case, I have found the additional load to be unnecessary and causing minor issues here and there, so I’d like to substantially reduce or disable the active scans.

Motivation for keeping default_config:

In my case, I would like to install hass for someone else who’s less of a tinkerer. So low maintenance matters to me. I would expect them to run multiple updates without me actively monitoring this.

The defaults may change over time. New integrations could be promoted to defaults. Existing settings could be superseded by better ones. Etc.

So for this low-maintenance installation I would like to leverage the community’s wisdom and keep default_config: with minimal overrides.

Voting for this as well - The DHCP component makes ~7k arpa queries a day to my DNS server, more than a google chromecast makes, with no current benefit for me other than being able to continue using default config instead of having to track and maintain updates manually.

1 Like

I continue to see people posting questions to the community related to the problems this DHCP browser discovery causes them. I too would like to see a native GUI option to disable this. The reality is that after initial system setup 99.9% of this hourly reverse lookup achieves nothing whatsoever for the betterment of HA’s operation.

I propose that an on/off toggle be added to the Settings/System/Network Network Discovery dialog area to allow users to disable this behavior. Can be defaulted On, but having a means to turn it off via the Settings GUI would be most welcomed by many.

Currently what people end up having to do use a HACS add-on to disable the behavior. Not ideal.

I have also noticed that the people who do run into this seem to be generally doing the following, or similar on their networks:

  1. They are running a local DNS server on their LAN instead of pointing to an external IP for their LAN’s DNS.
  2. Their HA gateway address and DNS server (by virtue of #1) are the same address.

In my case I have HA setup with a static IP (not DHCP server reserved IP).
The gateway address is the same as the DNS server address because I am running Unbound DNS as part of OPNsense router/firewall.

4 Likes

I also upvote this, especially the suggestion for a customizable interval.

After disabling Home Assistant’s hourly DHCP Discovery, I observed a ~90% reduction in x.x.x.192.in-addr.arpa DNS PTR calls.

For anyone looking for the HACS way to work around this deficiency in Home Assistant, the integration is in the HACS store as “Default Config Disabler” After installing and restarting you can disable DHCP Discovery only using a checkbox in the Settings Cog → popup menu. Restart again, and the overabundance of PTR DNS calls vanishes.