Hi
I install ESP home add-on
how config the ESP ? which code can be good for me ?
I want turn on small led in D7 pin
No coding required at all with ESPHome, just some yaml configuration. You are probably looking for a combination of light and GPIO output:
Please do not post pictures of text. Copy/paste. It came out 40 years ago.
I try compile simple code and get always next error
How fix it? I have duckdns with ssl. I really don’t know how solve this problem
data/doorbell/.pioenvs/doorbell/firmware.elf"
======================== [SUCCESS] Took 139.38 seconds ========================
INFO Successfully compiled program.
INFO Connecting to 192.168.1.62
ERROR Connecting to 192.168.1.62:8266 failed: [Errno 113] No route to host
So, have you moved on from turning on a small LED to a whole door bell already?
That log snippets just tells me that the configuration was compiled successfully into a firmware file, but the OTA connection to the ESP fails. Have you configured that IP address in the yaml file (maybe as use_address
?) and are you sure that your ESP is actually available under that address?
Before this error message occurred the first time, had you been able to successfully upload an ESPHome firmware to that device?
Ok so this is my yaml frpm ESP home dashboard ;
---
esphome:
name: doorbell
platform: ESP8266
board: d1_mini
# WiFi connection, correct these
# with values for your WiFi.
wifi:
ssid: "MyHome"
password: "123123mm!"
# manual_ip:
# static_ip: 192.168.1.69
# gateway: 192.168.1.1
# subnet: 255.255.255.0
# dns1: 192.168.1.1
# dns2: 8.8.8.8
# Enable logging.
logger:
# Enable Home Assistant API.
api:
# Enable over-the-air updates.
ota:
# Enable Web server.
web_server:
port: 80
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
-
the ESP8266 connected with cable to the PC
-
I success to connect to WIFI after the flash (i know because I see the MAC in my network)
if I try static IP is for sure available ( i check it)
when I try “upload” via dashborad i get the error :
Compiling /data/doorbell/.pioenvs/doorbell/src/main.cpp.o
Linking /data/doorbell/.pioenvs/doorbell/firmware.elf
Retrieving maximum program size /data/doorbell/.pioenvs/doorbell/firmware.elf
Building /data/doorbell/.pioenvs/doorbell/firmware.bin
Checking size /data/doorbell/.pioenvs/doorbell/firmware.elf
DATA: [===== ] 48.7% (used 39884 bytes from 81920 bytes)
PROGRAM: [==== ] 43.0% (used 448840 bytes from 1044464 bytes)
Creating BIN file "/data/doorbell/.pioenvs/doorbell/firmware.bin" using "/data/doorbell/.pioenvs/doorbell/firmware.elf"
========================= [SUCCESS] Took 29.19 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of doorbell.local
ERROR Error resolving IP address of doorbell.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname
I not have the the bin file to flash with that the ESP8266 because the process not finish
so the firmware not flash
what i need to do ?
Alright, so just to recap: When the ESP is connected via USB cable you can upload new firmware. And you have successfully checked that the ESP is working - did you do that by accessing the ESP’s webserver?
Now, when you try to upload a new firmware OTA then you run into the error message that you have posted.
This means that the system is trying to find the ESP via its hostname and using mDNS, but fails to do so. Maybe mDNS is not working properly in your network, or the ESP is not responding to mDNS requests as expected.
One way around this is to assign a static IP address (assuming that your router supports that) to the ESP, and configure that IP address as use_address
under the wifi
section.