Hey y’all
I have a sensor running esphome and each time home assistant restarts, the sensor fails to connect to the esphome integration. I’m having to manually delete the sensor and re-add it on esphome using the correct IP. It seems to me as though the integration is checking the wrong IP.
Here’s my yaml for the sensor:
substitutions:
name: "mmwave1"
friendly_name: "mmwave1"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
name_add_mac_suffix: true
project:
name: "mmwave.1"
version: "3.0"
platformio_options:
board_build.flash_mode: dio
board_build.mcu: esp32c3
# external_components:
# - source: github://limengdu/mmwave-kit-external-components@main
# refresh: 0s
esp32:
board: esp32-c3-devkitm-1
variant: esp32c3
framework:
type: esp-idf
api:
reboot_timeout: 5s
# Enable logging
logger:
hardware_uart: USB_SERIAL_JTAG
level: DEBUG
ota:
- platform: esphome
wifi:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "mmwave1"
reboot_timeout: 10s
use_address: 192.168.0.243
captive_portal:
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
# Sets up the improv via serial client for Wi-Fi provisioning.
# Handy if your device has a usb port for the user to add credentials when they first get it.
# improv_serial: # Commented until improv works with usb-jtag on idf
uart:
id: uart_bus
baud_rate: 115200
rx_pin: 4
tx_pin: 5
parity: NONE
stop_bits: 1
seeed_mr24hpc1:
id: my_seeed_mr24hpc1
text_sensor:
- platform: seeed_mr24hpc1
heart_beat:
name: "Heartbeat"
product_model:
name: "Product Model"
product_id:
name: "Product ID"
hardware_model:
name: "Hardware Model"
hardware_version:
name: "Hardware Version"
keep_away:
name: "Active Reporting Of Proximity"
motion_status:
name: "Motion Information"
custom_mode_end:
name: "Custom Mode Status"
binary_sensor:
- platform: seeed_mr24hpc1
has_target:
name: "Presence Information"
sensor:
- platform: seeed_mr24hpc1
custom_presence_of_detection:
name: "Static Distance"
movement_signs:
name: "Body Movement Parameter"
custom_motion_distance:
name: "Motion Distance"
custom_spatial_static_value:
name: "Existence Energy"
id: eval
custom_spatial_motion_value:
name: "Motion Energy"
id: mval
custom_motion_speed:
name: "Motion Speed"
custom_mode_num:
name: "Current Custom Mode"
switch:
- platform: seeed_mr24hpc1
underlying_open_function:
name: Underlying Open Function Info Output Switch
button:
- platform: seeed_mr24hpc1
restart:
name: "Module Restart"
custom_set_end:
name: "End Of Custom Mode Settings"
select:
- platform: seeed_mr24hpc1
scene_mode:
name: "Scene"
unman_time:
name: "Time For Entering No Person State (Standard Function)"
existence_boundary:
name: "Existence Boundary"
motion_boundary:
name: "Motion Boundary"
number:
- platform: seeed_mr24hpc1
sensitivity:
name: "Sensitivity"
custom_mode:
name: "Custom Mode"
existence_threshold:
name: "Existence Energy Threshold"
motion_threshold:
name: "Motion Energy Threshold"
motion_trigger:
name: "Motion Trigger Time"
motion_to_rest:
name: "Motion To Rest Time"
custom_unman_time:
name: "Time For Entering No Person State (Underlying Open Function)"
Here’s the error log after the restart:
Logger: aioesphomeapi.reconnect_logic
Source: runner.py:154
First occurred: 3:14:52 PM (2 occurrences)
Last logged: 3:14:52 PM
Can't connect to ESPHome API for mmwave1-c9a120 @ 192.168.0.243: Error while starting connection: Starting connection cancelled (APIConnectionCancelledError)
Can't connect to ESPHome API for mmwave1-c9a120 @ 192.168.0.205: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.0.205', port=6053))]: [Errno 111] Connect call failed ('192.168.0.205', 6053) (SocketAPIError)
The sensor is connected with IP 192.168.0.243 on my router [which is a access point router with dhcp disabled - so the main parent router to which my access point router is connected assigns the ip]. After HA restarts - it fails to reconnect. So I delete the device. It then shows up under discovered devices. I click on Add - it throws me the error that you see in the picture.
Why on earth is it checking 192.168.0.205??
When I replace the host with the correct ip ie. 192.168.0.243, it connects right away. Also, on the esphome builder add-on, the sensor shows as Online after HA restarts - which is correct. It’s weird the integration’s failing.
Thanks for your help.