Auto discovery not working on ubuntu 18.04 installed on laptop

Hi Guys,

I need your help. My configuration is:
a. installed on ubuntu 18.04 32 bit on laptop.
b. Installed hassio using command “curl -sL “https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh” | bash -s” as instructed on https://www.home-assistant.io/hassio/installation/
c. using zigbee2mqtt with usb stick and mosquito addons.

I did multiple installations and formats of machine. at one point discovery was working as I could find my Samsung wifi printer and other devices but with the latest clear installation, my hassio setup cannot find any devices automatically.
I have also tried entering discovery: in configuration.yaml and restarted the server multiple times.
I can detect my ZigBee devices and chromecast devices but none that works on multicast e.g. my three yeelights, printer, etc. I can see zeelights broadcasting their ip address on multicast but not being detected on hassio.

I also read " Home Assistant must be on the same network as the devices for UPnP discovery to work. If running Home Assistant in a [Docker container] use switch --net=host to put it on the host’s network."
but not sure where to put this flag whilst running the docker as per step b above.

any help will be greatly appreciated.

Thanks in advance.
Sanyam

bump! anyone out here to help please… :slight_smile:

Can you show your configuration.yaml please?

Hi David

thanks for your response. This is the configuration of my configuration.yaml:

Configure a default setup of Home Assistant (frontend, api, etc)

default_config:

Uncomment this if you are using SSL/TLS, running in Docker container, etc.

http:

base_url: example.duckdns.org:8123

Text to speech

tts:

  • platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
discovery:
light:

  • platform: yeelight
    devices:
    192.168.1.34:
    name: stripe

shot just to make it more readable…

also to add, the ip address of my machine is 192.168.x.x whereas hassio in docker is running on 172.30.32.2… I have been able to find google cast devices though…

Did you make it? I’m with the same issue… different ip adress for docker and machine. I think that is the major cause to the discovery not working

As said above, you have to have your container network mode set to “host” so that the container is on the same network as everything else.

My docker-compose:

version: '2.1'
services:
    homeassistant:
        container_name: home-assistant
        volumes:
            - ./config:/config
            - /etc/localtime:/etc/localtime:ro
        restart: unless-stopped
        image: homeassistant/raspberrypi4-homeassistant:stable
        network_mode: host

The thing is: I just installed using the default configs. Linux, ubuntu 64 on a VM, done. I didn’t installed a docker (in fact I doesn’t even know what a docker is), but when I run “network info” on console, I can see this. Different IPs for docker and machine… I don’t know where can I find the docker-compose. In config folder doesn’t have this file :s