How to test ssdp discovery on an integration under development?

I’m working on updating the integration for Sony Songpal, including making it discoverable via ssdp. I’ve set up my development environment according to the instructions here, and I’ve got an initial implementation.

However, I’m now stuck on testing. If I test using the development version running in the docker container, nothing comes back in discovery, including things that are currently discovered in my production Home Assistant environment. I’m pretty sure this is because docker keeps the network environment separate, but I can’t figure out how to override this. For example, I’ve tried passing --net=host in devcontainer.json's runArgs section, but that didn’t seem to work.

I’ve also tried using the component I’m developing as a custom component in my production Home Assistant environment. The integration works (e.g. I can manually enter the necessary information and it creates a Config Entry. However, ssdp discovery doesn’t work. I’m pretty sure this is because it isn’t generating an entry in /homeassistant/generated/, but not certain.

Any pointers here? How can I test ssdp discovery for this integration? Apologies if this is something obvious.

Same question here. Been working my way through the documentation and just noticed that the zeroconf discovery doesn’t find anything. Would be nice to have a solution for this since it’s part of the integration development process and should work in the recommended development envrionment.

I’ve also wondered if it is possible to setup a secondary HA instance with HassOS on the same machine (RPi4 in my case) however it’s hard to find documentation and resources on topics like this espacially if you have limited experience with docker.

Did you find a solution for this @jdoubledub?

Sadly, no. In the end I stalled out on this project and swapped over to other things.

For those trying to do this using Docker for Mac should note that it does not support --net=host, and you’re better off using a proper linux box or a VM (or run the dev environment on macOS natively and hope you won’t run into installation problems.)