New to HA and ESPHome

Hi All, I am new to HA and have been trying to set up an ESP32 using ESPHome. Initially i had this working but not the way i would like and now i am having issues. I cannot connect to network config and if i manage to be able to see the ESP32 it says offline and i cannot reconnect.

I would not worry about this. Esphome use mdns for status and for several reason this may not work. You can setup esphome to use ping but again, no important and HA doesn’t use this

Same here. Esphome will try to connect to name.domain

Name is device name in config
Domain is domain defined in config or default (.local)

You may set use_address to ensure it tries to connect to the device using an ip

This is also what you do if device has changed ip or when changing the ip, name or domain

In the end you should verify the ip address or name.domain esphome is using to send confip

Also post error message or logs if above doesn’t help

Thanks for the reply. i have set my settings based on the example but get this error.
INFO ESPHome 2024.5.5
INFO Reading configuration /config/esphome/reef.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing reef (board: esp32dev; framework: arduino; platform: platformio/[email protected])

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    Dependency Graph
    |-- AsyncTCP-esphome @ 2.1.3
    |-- WiFi @ 2.0.0
    |-- FS @ 2.0.0
    |-- Update @ 2.0.0
    |-- ESPAsyncWebServer-esphome @ 3.2.2
    |-- DNSServer @ 2.0.0
    |-- ESPmDNS @ 2.0.0
    |-- noise-c @ 0.1.4
    RAM: [= ] 12.4% (used 40616 bytes from 327680 bytes)
    Flash: [===== ] 49.2% (used 903473 bytes from 1835008 bytes)
    ========================= [SUCCESS] Took 2.83 seconds =========================
    INFO Successfully compiled program.
    INFO Connecting to 192.168.1.150
    ERROR Connecting to 192.168.1.150:3232 failed: [Errno 111] Connection refused
    yaml file
    esphome:
    name: reef
    friendly_name: Reef

esp32:
board: esp32dev
framework:
type: arduino

Enable logging

logger:

Enable Home Assistant API

api:
encryption:
key: “Phkhapq6o6vwNVePGxxYW6Z2cO1cPnlhAd22WPGAhmk=”

ota:
password: “944b260952b01e86b8032720658bc1e1”

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Optional manual IP

manual_ip:
static_ip: 192.168.1.150
gateway: 192.168.1.1
subnet: 255.255.255.0

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Reef Fallback Hotspot”
password: “SzyqocLZZ3DJ”

captive_portal:

Are you sure that IP is correct?

Also
I always install the installer then install the yaml code in esphome. Just wanna make sure you used installer first? I presume you did if it’s connected to WiFi with IP

Yes i used the installer. I got the IP address from the router.

Please format your code (config and logs) correctly.

In short, paste the code / logs between three backticks:

```
PASTE CODE HERE
```

or use the </> button.

Sorry as of the the post i am very new to the whole HA and indeed the forum.

1 Like