Zeroconf not working on raspberrypi

Hi

I am trying to configure zeroconf component in hass.

I have added zeroconf: in yaml configuration file

During Hass startup I am seeing in logs that component is starting up with success. But infortunately I am not able to see zeroconf service to be registered in my network. I also see a lot of avahi “packet from invalid interface” msgs

Logs:

Aug 20 11:27:41 raspberrypi hass[698]: INFO:homeassistant.loader:Loaded zeroconf from homeassistant.components.zeroconf
Aug 20 11:27:42 raspberrypi hass[698]: INFO:homeassistant.components.zeroconf:Zeroconf service information: ServiceInfo(type='_home-assistant._tcp.local.', name='Home._home-assistant._tcp.local.', address=b'\xc0\xa8\x01e', port=8123, weight=0, priority=0, server='Home._home-assistant._tcp.local.', properties={'requires_api_password': True, 'base_url': 'http://192.168.1.101:8123', 'version': '0.26.0.dev0'})
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Sending <zeroconf.DNSOutgoing object at 0x71240a70> as b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00'...
Aug 20 11:27:42 raspberrypi avahi-daemon[400]: Received packet from invalid interface.
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Received b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00' from '127.0.0.1':5353
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Received b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00' from '192.168.1.101':5353
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Sending <zeroconf.DNSOutgoing object at 0x71240bb0> as b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00'...
Aug 20 11:27:42 raspberrypi avahi-daemon[400]: Received packet from invalid interface.
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Received b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00' from '127.0.0.1':5353
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Received b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00' from '192.168.1.101':5353
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Sending <zeroconf.DNSOutgoing object at 0x71240d30> as b'\x00\x00\x04\x00\x00\x01\x00\x00\x00\x01\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\xc0\x0c\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00'...
Aug 20 11:27:42 raspberrypi avahi-daemon[400]: Received packet from invalid interface.
Aug 20 11:27:42 raspberrypi hass[698]: DEBUG:zeroconf:Sending <zeroconf.DNSOutgoing object at 0x71240a50> as b'\x00\x00\x84\x00\x00\x00\x00\x04\x00\x00\x00\x00\x0f_home-assistant\x04_tcp\x05local\x00\x00\x0c\x00\x01\x00\x00\x0e\x10\x00!\x04Home\x0f_home-assistant\x04_tcp\x05local\x00\xc02\x00!\x00\x01\x00\x00\x0e\x10\x00\x08\x00\x00\x00\x00\x1f\xbb\xc02\xc02\x00\x10\x00\x01\x00\x00\x0e\x10\x00R\x1arequires_api_password=true"base_url=http://192.168.1.101:8123\x13version=0.26.0.dev0\xc02\x00\x01\x00\x01\x00\x00\x0e\x10\x00\x04\xc0\xa8\x01e'...
Aug 20 11:27:42 raspberrypi avahi-daemon[400]: Received packet from invalid interface.
Aug 20 11:27:42 raspberrypi avahi-daemon[400]: Received packet from invalid interface.
Aug 20 11:27:42 raspberrypi avahi-daemon[400]: Received packet from invalid interface.

What is strange I have tried to run application written by balloob: python-zeroconf/examples/registration.py at master · balloob/python-zeroconf · GitHub

which is using exacly the same library. I have also used same arguments for service registration. And after running it I was able to see homeassistant service in BonjourBrowser.

Why it is not working with hass???

Works fine for me on 0.27.0.dev0

$ avahi-browse -alr
+ eth0 IPv4 Test room                              _home-assistant._tcp local
= veth0 IPv4 Test room                              _home-assistant._tcp local
   hostname = [Test\032room._home-assistant._tcp.local]
   address = [192.168.0.5]
   port = [8123]
   txt = ["version=0.27.0.dev0" "base_url=http://192.168.0.5:8123" "requires_api_password=true"]

The example you mentioned works too.

+ eth0 IPv4 Paul's Test Web Site                          Web Site             local
= eth0 IPv4 Paul's Test Web Site                          Web Site             local
   hostname = [ash-2.local]
   address = [127.0.0.1]
   port = [80]
   txt = ["path=/~paulsm/"]

Both are picked up by avahi on my system. Port 5353 is not used by Home Assistant and this seems to be source of your errors.