Discovery ignore

As HA continues to grow and evolve, and the IoT expands into new areas, we will inevitably end up with HA discovery finding devices on our networks we didn’t know about. This is both good and bad. The good side of this is obvious and the reason the discovery feature is part of HA. The bad side is that it contributes to bloated systems as we have to add in support for devices we have no intention of using just because discovery keeps finding them after every reboot.
I would like the following.

The capability to place discovered devices either by type or name into an “ignore” state that would tell the discovery process to ignore any devices it found matching this criteria. Discovery should still say it found the device and give it’s name but include in the log that it is ignoring it based on the ignore criteria it triggered. This way if someone is looking for their new TV but had excluded all Media Players at an earlier date, they would see it in the log and be able to adjust their ignore criteria accordingly.

1 Like

You do not need to use discovery, but can manually add the devices you want to use.

True, but this becomes an all or nothing solution.

I’m more inclined to agree with Chip on this one with all due respect (and I do mean respect).

1 Like

There have been times when discovery really came in handy. The other day I was working with the GE door hinge sensors, and discovery went right out and found it without me having to do anything. That was wonderful. But today, it kept giving the box on the screen telling me that my apple tv control wasn’t configured properly. We only have one apple TV and I don’t plan to use it for any automation. But to get it to stop complaining my choices were to turn off discovery which is kind of a drastic measure, or install pyatv and configure it in my configuration file. While this is a small example, it took about 30 minutes to finally get the right package installed and the right login information captured, before I could get a component configured properly that I wasn’t planning on using. It also takes up a small amount of disk space and memory which isn’t a big deal today, but in the future it could be as more and more devices are introduced into the IoT and HA.
Thanks

1 Like

I can offer another example; I am currently testing out the plexdevices client, an alternative to the native Plex client.

Testing this was a bit of a pain becuase even though I have the standard plex client commented out of my configs and the plexdevices client uses platform: plexdevices I’m still ending up with a second instance because of discovery.

(Actually, three instances, because it’s a ShieldTV, so there’s the two for Plex and one for Chromecast - also part of discovery.)

Great idea. It would make sense to be treat this a bit like the device tracker… That has a known_devices.yaml file that you can edit and change the behavior with attirbutes like track: false

It would make sense to be treat this a bit like the device tracker
[/quote]

A bit like it yes, but part of the key is to not have to load the software to support it.  With devices you have the software loaded.  But as another example, I might have bluetooth enabled for one purpose, but every time someone comes into my house, their phone shows up as a new device.  It would be nice to be able to use this feature to ignore devices so that you still have discovery active, but the new phones wouldn't get added in.

Yes this would be a good addition, as my humax freesat box is always trying to be ‘discovered’. I do tend to comment discovery out until it is needed though

True. I like having things sandboxed, so devices get discovered and at least get listed so that you can decide what to do later. Better yet, you can have a default behavior (i.e. list and do nothing, or list and add the new device), then you can choose to use or hide new devices as they come in.

The Bluetooth tracking is a decent model. My best example is a neighbor’s ipad showed up one day when she parked on the street and walked by the house. I set it to not track later. But I could see people wanting to use nothing by discovered by default and then selecting only itmes they want.

Just want to give you some heads-up, I pushed this earlier today:

https://github.com/home-assistant/home-assistant/pull/6048

6 Likes

You are my hero, @postlund!! Bless you!

1 Like

Nice! I guess I would have to use trial and error to comment out each & every platform until I no longer get the errors due to the discovery process thinking my humax freesat box is something that can be set up in home assistant! Or could there be a way to ignore individual items by mac address or ip?

I have the same issue with a Humax Freesat box that looks to be mis identified as Roku platform but can’t actually get ignore to work. Try ignoring Roku and let me know how you do it. That said the Humax box is returning some xml so may later dig into what if any control Home Assistant can exert over it.

@Matt_Smallman - since this feature request has been satisfied, I would am going to close this thread.

If you have an issue with Discovery, please open a new post. Thanks!