HomeKit controller intergration bypass zeroconf

I moved my home assistant from a docker installation on a raspberry to trueNAS scale (using the truecharts app). It runs on Kubernetes. Due to some limitation of Kubernetes (or of my understanding of Kubernetes), I cannot expose port lower than 9000. So zeroconf cannot bind the port 5353, and my device (a tahoma box) is not detected by the HomeKit controller integration of the new instance of home assistant.

My question: is it possible to bind a HomeKit device to home assistant without using zeroconf ?
I have some idea, but I don’t know if there are doable:

  • Use my old home assistant to connect to the tahoma box, and then copy the relevant part (which ones?) to the new instance of home assistant. I am not sure that it will work. I guess that the tahoma box will know that it speaks to a different computer.
  • Force the HomeKit integration to add a device by IP. It doesn’t seem possible to do so using the configuration file. Maybe by code ?

Thanks for any guidance you could provide.

Note:

  • I did unpaired the tahoma box from the previous instance of home assistant.
  • I can ping the tahoma box from the home assistant pod on trueNAS.

I did not succeed to bypass zeroconf. however, it is possible to use port below 9000. The error I saw was due to port 5353 being already bidden by avahi-daemon. So I killed the daemon, restarted home assistant using home networking, and let auto-discovery/zeroconf kick in.
step 1: find the PID of the process using the port 5353:
ssh to truenas, then run

sudo netstat -ntulp | grep 5353
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           6414/avahi-daemon

step 2: kill the daemon (change 6414 by what you found in step 1):

sudo kill -9 6414

step3: restart home assistant in home-networking mode.

Actually it seems like you don’t have to kill the process manually (which might be reverted once you reboot your system). You can turn off mDNS and maybe WS-Discovery in the Global Configuration Settings under the Network tab. I disabled both and zeroconf is working on HA.

1 Like

I found what @MarkusLa found, if you have mDNS turned on in network global settings it listens on port 5353 and also broadcasts on that port for things like using the NAS as a time machine backup. Since it’s in global section and not configurable other than on/off it uses all nics and Home Assistant needs to be able to bind to that port on a nic as well for discovery.

Same for me with TrueNAS Scale, I had to disable mDNS. We should be able to set a different port on zeroconf.

You can’t change the port as everything else on your network will be listening on port 5353