ESPHome - can't get Native API to work

I’ve upgraded HA to 0.85, and I cannot get the native API to work.

I added the following to my yaml

api:
  password: 'my_password'

and when I do:

esphomeyaml tv_light.yaml run

It uploads to the Wemos D1 mini just fine, then I get this:

Uploading: [============================================================] 100% Done...

INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from tv_light.local using esphomelib API
INFO Connecting to tv_light.local:6053 (192.168.1.129)
WARNING Couldn't connect to API (Error connecting to 192.168.1.129: [Errno 61] Connection refused). Trying to reconnect in 4 seconds
INFO Connecting to tv_light.local:6053 (192.168.1.129)
WARNING Couldn't connect to API (Error connecting to 192.168.1.129: [Errno 61] Connection refused). Trying to reconnect in 8 seconds
INFO Connecting to tv_light.local:6053 (192.168.1.129)
WARNING Couldn't connect to API (Error connecting to 192.168.1.129: [Errno 61] Connection refused). Trying to reconnect in 16 seconds
INFO Connecting to tv_light.local:6053 (192.168.1.129)
WARNING Couldn't connect to API (Error connecting to 192.168.1.129: [Errno 61] Connection refused). Trying to reconnect in 32 seconds
INFO Connecting to tv_light.local:6053 (192.168.1.129)
WARNING Couldn't connect to API (Error connecting to 192.168.1.129: [Errno 61] Connection refused). Trying to reconnect in 64 seconds

…and so on.

I’m stuck… @OttoWinter, any ideas?

I would try it without the password, which is optional and see what happens…

I was getting those errors too; but after manually rebooted the device, everything went fine. Also if you have api password set, you won’t be able to get it done. Do not use password for now. Mine works once the password option is removed.

so I tried with / without / static_ip / dhcp many many combos. Randomly it just started to work with password and static_ip (both of which I had tried many many times).

Once it started working, I was able to go back through all the combos and they all worked. Something is definitely not quite right.

I did get it added in HA as well, and it seems to work just fine

Following up… It appears that having any fastled_clockless effects enabled causes the system to never boot fully, so it enters a ‘safe mode’ so you can upload new code. Here’s bug on GitHub:

https://github.com/OttoWinter/esphomelib/issues/367