Everytime I restart HA it discovers my PC as a media player
.
I don’t want to use my PC as a media server for HA or anything (it’s just an old box that works well enough to provide me with a browser window!) As far as I can tell all the media sharing options in windows and windows media player are switched off.
I just tell HA to ignore this media player which is fine apart from the fact that my core.config_entries file now has over 1500 lines of code relating to this now (and about 100 of useful stuff):
Looks like your media server is generating a completely different unique ID every time it restarts or something.
If you don’t want this to continue, the best course of action I think would be to firewall off any packets coming from that machine’s IP address (note you can’t firewall by destination because it’s going to be a multicast address) to Home Assistant. This should prevent the machine’s DLNA server from becoming discoverable.
Yah and that might be useful too. However, sometimes you just want to quiet down that one piece of **** machine, while keeping everything else just fine.
I think that’s a good plan. I can read how to add autodiscovery but not how to disable it for one topic. Can you give me a hint?
Also can I remove the redundat lines from core_config.entries?
Yeah, if the IP address of the problematic Windows Media Player machine is 1.2.3.4, you should add an iptables rule to this effect:
iptables -I INPUT 1 -s 1.2.3.4 -j REJECT
The gist of the matter is that you must reject traffic coming from 1.2.3.4. This may vary depending on how your Home Assistant instance is setup. Are you running Core, Supervised, or HASS OS?