How can I manually set up UPnP and DLNA devices?

I’m using HA in docker in bridge mode.

How can I manually connect UPNP and DLNA devices ? I know they are automatically discovered in host mode. But I found no way to manually add them. For Upnp, no way found, and for DLNA it asks for a “DLNA DMR Descriptor XML”, which I have no idea where to find. I know the IP address of the device (an Onkyo NR636) but I don’t know where to find that descriptor.

As for Upnp, I didn’t find any way.

Could someone help me ?
Thanks in advance for your help
Have a great day

There is no way. The chief reason is that DLNA endpoints frequently change the ports on which they listen, and these port changes are announced by the endpoints only via UPnP discovery (~effectively local network broadcast). In some implementations you can fix the port and then, in theory, you should be able to just add an IP address plus a port somewhere, then bam — but Home Assistant does not let you add by IP because you’d have to know the port in advance, and 99.9% of people won’t be able to figure that one out.

Incidentally I have two devices where the ports can be fixed. That’s how I got it rolling — but that was when HA was in the same LAN (it’s moved to a different LAN since).

Thanks a lot for the explaination, it’s much more clear now.
Then, would there be a way to have a interface container, that would be in host mode and would do the link between dlna devices and HA ?
I could put my HA is host mode of course but that’s not ideal for my setup, I’m using a caddy reverse proxy and I block all ports so that everything is on a local docker network. That way the only way to access HA is through the reverse proxy. I would prefer to keep this behavior. But I have no problem with having only a container that does DLNA on host mode, it wouldn’t impact the rest of the networking.
Do you know if there is ways of doing that ?
Thanks in advance for any answer

Technically you need to be running something like mrouted on both sides of the nexus between LANs. I do this but not for home assistant (I don’t run HA as a container).

Sorry for digging up an old thread but I can see the port the dlna server is using. I can even change them. What port is HA listening to for the dlna server?

I am trying to get the dlna servers for booksonic or airsonic into home assistant. Turned on the dlna servers within the containers but home assistant just doesn’t see them.

You can configure the port on the integration Configure screen. Go to Settings, Devices, and then click on the DLNA integration. A list with one or more devices should appear, each with a blue Configure button. You can fix the port there.

I think i have somewhat figured out my problem. I installed the windows version and turned on the dlna server. It actually showed up to be configured on home assistant. Problem must be in the way I have it all configured. Booksonic and airsonic both run in containers on my unraid server.

… Now that I think about it I wonder if it’s because I have only tried with them on a custom network or bridged. Haven’t tried host yet. Plex is run on host and that’s all that shows up with dlna servers on home assistant.

Thank you for the reply.


Yeah you need --network=host.