Discovery not working

I have Hassio installed in a Docker on a Ubuntu host.
I have just discovered that the Discovery dosen’t work.
Have read that you need to use --net=host when you have installed Hassio in a Docker.
But I don’t really understand how to use it and it seems to be some others that have hade problem when they have been using that command.
Maybe someone knows if it should be like this?
Do I need to include the “device”?
If needed, what should the path be?

$ docker run --init -d \
--name="home-assistant" \
-v /PATH_TO_YOUR_CONFIG:/config \
-e "TZ=Europe/Stockholm" \ 
--device /dev/ttyUSB0:/dev/ttyUSB0 \
--net=host homeassistant/home-assistant:stable

This command is running Home Assistant in Docker, NOT Hassio.

There is no device to include. --net=host passes through the host networking.

Nothing is being discovered? Because discovery works on a default setup like you have provided.

flaming0e, Okay I have a default setup, Hassio in Docker. Meaning that I don’t have to run the commands that I specify above.
But the question remains why the dicovery dosen’t work.
Can I do test something to see what the problem is?

It works fine in debian/ - Does for me anyway and never heard of it not working

What specifically isn’t being discovered?

I can confirm with @DavidFW1960, running in docker on ubuntu 18.04 and discovery works fine.

Then what is the docker run command you provided above? The command you provided above is for running Home Assistant in Docker. Discovery works in that method.

If you are running HassIO, by using the installer script, then host mode is already being used. Discovery works in that method also.

No, the question remains why you think the discovery is broken.

1 Like

I try to add rfxtrx sensors in configuration.yaml.
But it don’t show up in HA frontend.

That’s not discovery… and that’s not how discovery works. Discovery automatically finds things on your network without you configuring it.

This component is not auto discovered either. You need to configure it.

The second sentence of the documentation states that you need to set up the hub:

First you have to set up your rfxtrx hub. The easiest way to find your sensors is to add this to your configuration.yaml :

This is what you are missing. Set up the hub then add that in sensor.

  device: PATH_TO_DEVICE

  platform: rfxtrx
  automatic_add: true

If you’re adding things to configuration yaml, that has nothing to do with discovery. That’s a manual configuration.

Discovery is not where things get automatically added to the frontend.

Discovery is where it scans your network and finds devices and adds them to HA. If it adds to the frontend depends on whether you have automatic lovelace mode or you are manually configuring your Lovelace.

Okay, but I don’t see it under Developer Tools/States either.
Should you don’t see all discovered devices there?

Petro, I have set up the hub allready. I have this code.
I didn’t include it in my first question, sorry

# Setup rfxtrx device, 433MHz
  device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0
  debug: True
  dummy: False

And the code for the rfxtrx

# 433MHz temp and humunity sensor outside & ind
  - platform: rfxtrx
    automatic_add: True

I know that the devices will not show up automatically in the frontend as flamingm0e wrote but where should it show up?
I thought that it should show up in Developer Tools/States, but it dosen’t.

You need to learn what a “discovered” item is.

Yes, all discovered items will show up there. So will all configured items and integrations.

If your device isn’t showing up in the dev tools/states page, then it’s not connecting to the device and seeing it. You probably had an error message in your log on startup if that’s the case, and you should do a little bit of troubleshooting to find the problem.

1 Like

Did you read the documentation ?

Not all protocols as advertised are enabled on initial setup of your transceiver. Enabling all protocols is not recommended either. Your 433.92 product not showing in the logs? Visit the RFXtrx website to download RFXmgmr and enable the required protocol.

Have been changing HW from a Raspberry Pi to a Ubuntu machine, Hassio in Docker.
I transfered my configuration from the Pi to the new plattform.
The RFXtrx where working on the Pi, meaning that I have enable the protocal before.
Do I need to that again?
Now when I have a new plattform but the same configuration of Hassio.

Are you sure this is the device name according to your HOST OS?

I thought it where but I can be wrong.
Is there a way to double check that?
I don’t remenber how to do that!

Somewhere in the Hassio “tab” you will see the hardware attached to your system.

I found this under Hassio tab.

Not that same!
I guess I need to change the path to the one I have in Hassio?

It’s a good bet :wink:

1 Like

I have now changed the RFXtrx path, restart the Home assistant but there is no different.
I still not see the devices in Developer Tools/States.