Can't integrate esphome with homeassistant

I’m running homeassistant in a virtual environment (venv) on my PC.
I followed the getting started guide on esphome, and after creating a basic yaml file with the wizard, it outputs: “Check your Home Assistant “integrations” screen. If all goes well, you should see your ESP being discovered automatically.”, but nothing is discovered in homeassistant.

I did open an issue on github but I’m wondering if there is something basic I should have done in homeassistant for the integration to be discovered.

Thanks!

I should add that I didn’t plug the esp8266 yet… as I said, I followed the guide.

You have to add the device by entering in the IP address of the esp8266 running esphome in the integrations screen. The esp8266 needs to be connected to the wifi.

Did you flash the esp?

Did you then restart it?

It sometimes takes a long time to be discovered by home assistant. You can add it manually by going to

Configuration|Integrations|Click the +|Choose esphome|follow your nose.

Thanks. It took me a while to get it connected to wifi because it didn’t connect before I flashed a firmware (for some reason I could create a hotspot but not connect to wifi before I flashed the firmware). Now I can connect to the home wifi.
However, once I ran the wizard with the esp8266 connected by USB to my laptop, it seems like the wizard flashed some code (that I guess can connect to wifi). But then nothing happens in homeassistant, and in addition, I can’t upload a different code with the ArduinoIDE unless I reflash the firmware.

-Do you mean flashed it with esphome code? I guess I did while running the wizard. I’m not sure what the wizard really does, but I did see it reset the esp8266 so I figure it flashed something. If I understand correctly there is a difference between flashing firmware and uploading a sketch/program. Because the unit now prevents me from uploading normally to it, I guess the wizard flashed something.

-I’ll try running the wizard, restart, and then give it some time.

-If I add esphome manually as an integration, what does the integration mean by “host”? The esp8266 ip? and if so is there a way to see it easily or do I need to scan my network?

host is the esp8266 IP address.

to scan your network download the app called “Fing” in google playstore.

or hostname. IP addresses change.

No

Do you see anything in the esphome window about the device starting? If not, what happens when you click “show logs”.

EDIT Also have you actually read the instructions, it’ll probably help Getting Started with ESPHome and Home Assistant — ESPHome and Getting Started with the ESPHome Command Line — ESPHome

I’m using the terminal (linux) and I was following the command line getting started guide.
Thus I don’t have any window or buttons to click.
I didn’t find any documentation on the command line and some things are not so clear - what the commands does, when should the esp8266 be connected by USB (always I guess), what directory to be running the wizard in (I tried the directory with homeassistant’s configuration.yaml), what python version to use(I use the same python3.7 as for homeassistant)… So I’m trying to figure it out from esphome --help, but it didn’t get me very far.

I actually progressed a little. I just can’t seem to upload to the esp8266, I don’t have the permissions, I’ll try chmod or chown on /dev/ttyUSB0 and see if it helps.

Ok, I’m pretty embarrassed. The port was occupied by arduinoIDE and that’s why the flashing didn’t work… now it works! Thank you so much for your help!

1 Like