Sorry for resurrecting this old(ish) thread, but Iām stumbling into a very similar issueā¦
Iāve just finished moving some devices from one subnet to another and the recently moved devices arenāt being recognised by HA.
To elaborate: I have several other devices which I moved a few weeks ago, all on the same Wifi SSID, same subnet, etc - and they are being recognised by HA, so it canāt be an mDNS issueā¦ (maybe )
The ESPHome GUI can see them, I can update their configuration, show logs, etc, but HA canāt see themā¦
Looking at packet captures, it appears that āHAā (running on a PI, so this could be ESPHome tooā¦) is ARPing for the old IP address, so IMO something is stuck with the old addressā¦
Iāve restarted HA, rebooted the entire device, etc, but Iām still seeing the old addresses in the logs:
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.34: Connecting to 192.168.7.34:6053 (('192.168.7.34', 6053))
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.234: Connecting to 192.168.7.234:6053 (('192.168.7.234', 6053))
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.39: Connecting to 192.168.7.39:6053 (('192.168.7.39', 6053))
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.106: Connecting to 192.168.7.106:6053 (('192.168.7.106', 6053))
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.234: Error connecting to ('192.168.7.234', 6053): [Errno 113] Connect call failed ('192.168.7.234', 6053)
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Trying to reconnect in 60 seconds
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.34: Error connecting to ('192.168.7.34', 6053): [Errno 113] Connect call failed ('192.168.7.34', 6053)
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.106: Error connecting to ('192.168.7.106', 6053): [Errno 113] Connect call failed ('192.168.7.106', 6053)
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.39: Error connecting to ('192.168.7.39', 6053): [Errno 113] Connect call failed ('192.168.7.39', 6053)
Iām seeing no attempts to reach those old addresses on :6053, just ARPs (which makes sense).
So, in my mind, I think that āESPHomeā is working, but āHAā is still using the old addressesā¦???
Working config:
# Sonoff S26 Socket
# MAC Address: cc:50:e3:1b:ec:1e
esphome:
name: dehumidifier
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret iot_wifi_ssid
password: !secret iot_wifi_pass
manual_ip:
static_ip: 192.168.4.25
gateway: 192.168.4.1
subnet: 255.255.255.0
dns1: 192.168.4.1
domain: .home
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dehumidifier Fallback Hotspot"
password: "wTuI9eoMXvYo"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
ota:
password: !secret ota_password
time:
- platform: sntp
id: sntp_time
timezone: Europe/London
servers: 192.168.4.1
sensor:
- platform: wifi_signal
name: "Dehumidifier WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Dehumidifier Uptime"
text_sensor:
- platform: version
name: "Dehumidifier ESPHome Version"
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Dehumidifier Button"
on_press:
- switch.toggle: relayandled
output:
- platform: esp8266_pwm
id: sonoff_green_led
pin:
number: GPIO13
inverted: True
light:
- platform: monochromatic
name: "Dehumidifier Status LED"
output: sonoff_green_led
id: led
switch:
- platform: gpio
pin: GPIO12
id: relay
- platform: template
name: "Dehumidifier Relay"
optimistic: true
id: relayandled
turn_on_action:
- switch.turn_on: relay
- light.turn_on: led
turn_off_action:
- switch.turn_off: relay
- light.turn_off: led
Not working config:
# Sonoff S26 Socket
# MAC Address: cc:50:e3:18:92:60
esphome:
name: officefan
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret iot_wifi_ssid
password: !secret iot_wifi_pass
manual_ip:
static_ip: 192.168.4.26
gateway: 192.168.4.1
subnet: 255.255.255.0
dns1: 192.168.4.1
domain: .home
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Officefan Fallback Hotspot"
password: "mTfIDWXze9Bs"
time:
- platform: sntp
id: sntp_time
timezone: Europe/London
servers: 192.168.4.1
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
ota:
password: !secret ota_password
sensor:
- platform: wifi_signal
name: "Office Fan WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Office Fan Uptime"
text_sensor:
- platform: version
name: "Office Fan ESPHome Version"
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Office Fan Button"
on_press:
- switch.toggle: relayandled
output:
- platform: esp8266_pwm
id: sonoff_green_led
pin:
number: GPIO13
inverted: True
light:
- platform: monochromatic
name: "Office Fan Status LED"
output: sonoff_green_led
id: led
switch:
- platform: gpio
pin: GPIO12
id: relay
- platform: template
name: "Office Fan Relay"
optimistic: true
id: relayandled
turn_on_action:
- switch.turn_on: relay
- light.turn_on: led
turn_off_action:
- switch.turn_off: relay
- light.turn_off: led
Iāve tried using use_address
with the same address as static_ip
, but that made no change.
I tried removing the manual_ip
section, and returning to DHCP (which has a static mapping to the same address) - thinking that might need to update something, but still no change.
Nothing obvious in HAās /config
folder as I grepād for the old addresses (grep -lir "192.168.7." /config/*
)
Any more ideas / pointers?