Newb Question Regarding Installation and Use of Esphome

Okay, so this is really a newb question. I’m running my Home assistance on a Raspberry Pi which is tucked away in a cabinet and not easily accessible. Because of this, I installed esphome on a separate laptop and have been nearly successful in flashing a Sonoff Basic with a very generic yaml file that tests the device and allows it to show in my Home Assistant dashboard.

My questions I’m hoping someone can help are:

  1. Does esphome have to be ran on the same machine as the HomeAssistant installation, or can I compile and flash off of a separate machine?

  2. Is there a reason that after compiling, the esphome dashboard never seems to be able to get past the INFO Starting log output from /dev/ttyUSB0 with baud rate 115200 that’s shown in the image below? I’ve left it for nearly 30 minutes and it just hangs a that one step.

  1. Is there any reason that my Home Assistant is never able to find my esphome device even with the api line added in the code? Using my Google WiFi I’m able to see that it’s connected to the network, but I’m unable to detect it with either the laptop esphome dashboard, or the Home Assistant integrations page. Even trying to point to it manually be listing the device manually it’s unable to connect. I’ve tried using the IP address in the integrations page in addition to something like:

door_garage.local

Any help would be greatly appreciated.

They can be on separate machines.

Did you have to ground pin 0 to get it into programming mode? If so, unground it and reboot.

It should pop up in home assistant.

Perhaps .local addresses are not properly resolved on your network, you’ll need mDNS working I think.

Hi @diode

I’ll take a shot at helping.

On your first question, ESPHome can compile and flash off a separate machine. But here’s the thing: it’s really convenient to have it running as a plugin inside HomeAssistant. Remember, you only need a physical connection the very first time you flash a device with ESPHome; thereafter it will work via OTA.

What I do is this. I’m running ESPHome inside hassio, and similar you, it’s on a rpi3b+ inside a crawlspace I can’t easily get to. For a new device, I set up the yaml in the ESPHome Web UI, and then select Compile from the device’s dropdown menu on the right. When it’s done compiling on the pi, an option appears to download the binary.

I save it to a folder on my desktop, and then flash the hardware the usual way. In my case, that’s using the FLASHESP8266.EXE tool that comes with ESP_Easy. For a Sonoff Basic, I’d be using an FTDI dongle.

If the flash completes successfully, you need to manually reset the board once, and I do that by simply unplugging it from the FTDI and either powering it up via mains, or just installing it where it needs to go.

Now, if you’ve used the ESPHome web ui inside Home Assistant, you’ll see your new device’s status change from Offline to Online as it boots up. Very handy. From this point, you can edit the yaml right there, and select Upload to send the changes to the device. Nifty.

To answer your second question, I have no idea why that is happening. It could be a bad flash. I prefer to flash my devices manually using the methods I know work. I just use ESPHome to compile the initial binary, then use external tools to flash.

As to your third, devices are supposed to just pop up in the Integrations tab in Home Assistant, but in my experience they almost never do. So instead, I just manually add them. In the past, I would check my DHCP server to see what IP address they’d got, but these days I just manually assign an IP address to each Thing out of the gate. It saves a lot of hassles later.

Once you know the IP address (either manually or automatically assigned), simply go to Integrations and add a new ESPHome device. It’ll ask you for the IP address. Annnnnnnd done.

Hope that helps. Please update us if you’re still struggling.

Nonsense. One man’s convenience is another man’s inconvenience. It can run on any computer.

I agree that it’s a matter of personal choice. Single click install feels convenient to me.

At no point did I imply it couldn’t.

Check the IP address - you should ideally have the device with a static address/reserved by MAC address in router. Looks like it’s flashed it successfully.