我通过esphome集成了一个VL53L1X传感器进Homeassistant,刚开始都好好的,但是会随机变成不可用,这个时间不确定,可能是一个小时,可能是一天,可能是两天,但反正用不长,就会变成不可用,解决办法只能重新拔插一下esp8266
1、我通过路由器查看,并没有发现该设备有断开WiFi的记录,并且使用终端也能ping通该设备ip,该设备的连接信号-50db,也不高
2、查看homeassistant的日志记录显示如下
2023-01-15 12:43:12.215 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for cf @ 192.168.88.184: Hello timed out
2023-01-15 12:44:14.585 WARNING (MainThread) [homeassistant.components.esphome] Error getting initial data for 192.168.88.184:
2023-01-15 12:44:46.974 WARNING (MainThread) [homeassistant.components.esphome] Error getting initial data for 192.168.88.184:
2023-01-15 12:45:26.228 WARNING (MainThread) [homeassistant.components.esphome] Error getting initial data for 192.168.88.184:
2023-01-15 12:45:58.008 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for cf @ 192.168.88.184: Hello timed out
2023-01-15 12:47:22.232 WARNING (MainThread) [homeassistant.components.esphome] Error getting initial data for 192.168.88.184:
2023-01-15 12:47:39.923 WARNING (MainThread) [homeassistant.components.esphome] Error getting initial data for 192.168.88.184: Timeout waiting for response for <class 'api_pb2.DeviceInfoRequest'> after 10.0s
2023-01-15 12:48:06.928 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for cf @ 192.168.88.184: Timeout waiting for response for <class 'api_pb2.ConnectRequest'> after 10.0s
3、在集成页面进行该设备的重载无效,依旧不可用
4、哪怕是重启homeassistant,该设备依旧显示不可用
5、下面是我的esphome yaml文件,请大佬帮忙
esphome:
name: cf
esp8266:
board: esp01_1m
[b]# Enable logging
logger:
[b]# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxx"
ota:
password: "xxxxxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
[b] # Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Cufang Fallback Hotspot"
password: "xxxxxxx"
captive_portal:
external_components:
- source: github://Lyr3x/Roode@master
refresh: always
vl53l1x:
roode:
roi: auto
number:
- platform: roode
people_counter:
name: People Count
```