Esp Home API disconnects

Hi Please assist

I and constantly getting api disconnected, it is not WiFi, and the not is right next to the AP and connection good at 0 dB

Log entry

WARNING Disconnected from API: Timeout while waiting for message response!
INFO Connecting to irrigation2.local:6053 (192.168.11.57)
INFO Successfully connected to irrigation2.local
[14:05:23][VV][scheduler:131]: Running interval 'update' with interval=60000 last_execution=160274 (now=220274)
[14:05:23][VV][scheduler:025]: set_timeout(name='0xD50316002C9DFF28', timeout=750)
[14:05:25][VV][scheduler:131]: Running timeout '0xD50316002C9DFF28' with interval=750 last_execution=220283 (now=221033)
[14:05:25][VV][dallas.sensor:249]: Scratch pad: 0E.02.4B.46.7F.FF.7F.10.E8 (E8)
[14:05:25][D][dallas.sensor:148]: 'Outside Temperature': Got Temperature=32.9°C
[14:05:25][V][sensor:013]: 'Outside Temperature': Received new state 32.875000
[14:05:25][D][sensor:092]: 'Outside Temperature': Sending state 32.87500 °C with 1 decimals of accuracy
[14:05:25][VV][api.service:120]: send_sensor_state_response: SensorStateResponse {
  key: 2259435129
  state: 32.875
  missing_state: NO
}
[14:05:26][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:26][VV][api.service:035]: send_ping_response: PingResponse {}
[14:05:30][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:30][VV][api.service:035]: send_ping_response: PingResponse {}
[14:05:31][VV][scheduler:131]: Running interval 'update' with interval=60000 last_execution=168075 (now=228076)
[14:05:31][D][adc:056]: 'Irrigation 2 VCC Voltage': Got voltage=2.86V
[14:05:31][V][sensor:013]: 'Irrigation 2 VCC Voltage': Received new state 2.861328
[14:05:31][VV][sensor.filter:013]: Filter(0x3fff1e2c)::input(2.861328)
[14:05:31][VV][sensor.filter:020]: Filter(0x3fff1e2c)::output(3.147461) -> SENSOR
[14:05:31][D][sensor:092]: 'Irrigation 2 VCC Voltage': Sending state 3.14746 V with 2 decimals of accuracy
[14:05:31][VV][api.service:120]: send_sensor_state_response: SensorStateResponse {
  key: 1294262228
  state: 3.14746
  missing_state: NO
}
[14:05:31][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:31][VV][api.service:035]: send_ping_response: PingResponse {}
[14:05:32][VV][scheduler:131]: Running interval 'update' with interval=60000 last_execution=169589 (now=229589)
[14:05:32][V][sensor:013]: 'uptime_sec': Received new state 229.593994
[14:05:32][D][sensor:092]: 'uptime_sec': Sending state 229.59399 s with 0 decimals of accuracy
[14:05:36][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:36][VV][api.service:035]: send_ping_response: PingResponse {}
[14:05:41][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:41][VV][api.service:035]: send_ping_response: PingResponse {}
[14:05:45][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:45][VV][api.service:035]: send_ping_response: PingResponse {}
[14:05:46][VV][api.service:250]: on_ping_request: PingRequest {}
[14:05:46][VV][api.service:035]: send_ping

Yaml

esphome:
  name: irrigation2
  platform: ESP8266
  board: nodemcuv2

wifi:
  power_save_mode: none
#  reboot_timeout: 45min
  networks:
  - ssid: 'IOT'
    password: ''
    hidden: true
#  - ssid: 'Pumphouse'
#    password: ''
    
  - manual_ip:
      static_ip: 192.168.11.57
      gateway: 192.168.11.1
      subnet: 255.255.255.0
      dns1: 192.168.11.1
      dns2: 8.8.8.8

# Enable logging
logger:
  level: VERY_VERBOSE
#  level: VERBOSE
# Enable Home Assistant API
api:
 reboot_timeout: 45min

ota:


sensor:
  - platform: wifi_signal
    name: "Irrigation 2 WiFi Signal Sensor"
    update_interval: 60s

  - platform: adc
    pin: VCC
    name: "Irrigation 2 VCC Voltage"
    filters:
      - multiply: 1.1

  - platform: uptime
    id: uptime_sec


  - platform: dallas
    address: 0xD50316002C9DFF28
    name: "Outside Temperature"

    
dallas:
  - pin: D3

text_sensor:
  - platform: template
    name: Irrigation Uptime
    lambda: |-
      int seconds = (id(uptime_sec).state);
      int days = seconds / (24 * 3600);
      seconds = seconds % (24 * 3600); 
      int hours = seconds / 3600;
      seconds = seconds % 3600;
      int minutes = seconds /  60;
      seconds = seconds % 60;
      return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
    icon: mdi:clock-start
    update_interval: 113s


status_led:
  pin: GPIO2

binary_sensor:
  - platform: gpio
    pin: 3
    name: "Outside box Door"
    device_class: door
    filters:
      - delayed_on_off: 50ms
  - platform: status
    name: "Irrigation 2 Status"

switch:
  - platform: restart
    name: "Irrigation 2"
    
  - platform: gpio
    pin:
      number: D1
      inverted: yes
    name: "Irrigation 2 - Zone 1"
    id: irrigation2_zone1
    interlock: [irrigation2_zone2, irrigation2_zone3, irrigation2_zone4, irrigation2_zone5]
  - platform: gpio
    pin:
      number: D2
      inverted: yes
    name: "Irrigation 2 - Zone 2"
    id: irrigation2_zone2
    interlock: [irrigation2_zone1, irrigation2_zone3, irrigation2_zone4, irrigation2_zone5, irrigation2_zone6]
  - platform: gpio
    pin:
      number: D5
      inverted: yes
    name: "Irrigation 2 - Zone 3"
    id: irrigation2_zone3
    interlock: [irrigation2_zone1, irrigation2_zone2, irrigation2_zone4, irrigation2_zone5, irrigation2_zone6]
  - platform: gpio
    pin:
      number: D6
      inverted: yes
    name: "Irrigation 2 - Zone 4"
    id: irrigation2_zone4
    interlock: [irrigation2_zone1, irrigation2_zone2, irrigation2_zone3, irrigation2_zone5, irrigation2_zone6]
  - platform: gpio
    pin:
      number: D7
      inverted: yes
    name: "Irrigation 2 - Zone 5"
    id: irrigation2_zone5
    interlock: [irrigation2_zone1, irrigation2_zone2, irrigation2_zone3, irrigation2_zone4, irrigation2_zone6]
  - platform: gpio
    pin:
      number: D0
      inverted: yes
    name: "Irrigation 2 - Zone 6"
    id: irrigation2_zone6
    interlock: [irrigation2_zone1, irrigation2_zone2, irrigation2_zone3, irrigation2_zone4, irrigation2_zone5]

Anyone got any idea?

I know I’m not being the most helpful here but I really like the forum search function… (it also happens to be the first point here)

https://community.home-assistant.io/search?q=esphome%20disconnects

My point being that there are many threads about ESPhome disconnection. I personally don’t have issues with my nodes dropping off at all, ever.

yeah im in the same boat.

i recently started flashing devices, first with tasmota, had a terrible experience with it. ,mqtt lagging my whole network of 4 routers.

changed over to esphome first day seemed ok, then everything started disconnecting,

im frustrated, the wifes pissed cause ‘ok google’ turn on the fish tanks (7 differnet ones) isnt working…

ahh… im about to move out to the garage.

I was hoping someone might be able to shed some light.

Sensor is plugged into the usb and these are the serial logs.
I can see that the logs indicate that the api disconnected (09:35.20), but I cannot figure the reason, could anyone tell anything else.

[09:34:52][VV][api.service:250]: on_ping_request: PingRequest {}
[09:34:52][VV][api.service:035]: send_ping_response: PingResponse {}
[09:35:05][VV][scheduler:131]: Running interval 'update' with interval=60000 last_execution=179730 (now=239734)
[09:35:05][V][sensor:013]: 'uptime_sec': Received new state 239.733994
[09:35:05][D][sensor:092]: 'uptime_sec': Sending state 239.73399 s with 0 decimals of accuracy
[09:35:15][VV][scheduler:131]: Running interval 'update' with interval=60000 last_execution=189048 (now=249050)
[09:35:15][V][sensor:013]: 'Irrigation 2 WiFi Signal Sensor': Received new state -76.000000
[09:35:15][D][sensor:092]: 'Irrigation 2 WiFi Signal Sensor': Sending state -76.00000 dB with 0 decimals of accuracy
[09:35:15][VV][api.service:120]: send_sensor_state_response: SensorStateResponse {
[09:35:15]  key: 1541241102
[09:35:15]  state: -76
[09:35:15]  missing_state: NO
[09:35:15]}
[09:35:20][V][api.connection:672]: Error: Disconnecting Home Assistant 0.106.2 (192.168.1.4)
[09:35:20][D][api:067]: Disconnecting Home Assistant 0.106.2 (192.168.1.4)
[09:35:20][D][binary_sensor:036]: 'Irrigation 2 Status': Sending state OFF
[09:35:20][D][binary_sensor:036]: 'Irrigation 2 Status': Sending state ON
[09:35:20][VV][api.service:222]: on_hello_request: HelloRequest {
[09:35:20]  client_info: 'Home Assistant 0.106.2'
[09:35:20]}
[09:35:20][V][api.connection:567]: Hello from client: 'Home Assistant 0.106.2 (192.168.1.4)'
[09:35:20][VV][api.service:010]: send_hello_response: HelloResponse {
[09:35:20]  api_version_major: 1
[09:35:20]  api_version_minor: 3
[09:35:20]  server_info: 'irrigation2 (esphome v1.14.3)'
[09:35:20]}
[09:35:20][VV][api.service:229]: on_connect_request: ConnectRequest {
[09:35:20]  password: ''
[09:35:20]}
[09:35:20][D][api.connection:583]: Client 'Home Assistant 0.106.2 (192.168.1.4)' connected successfully!
[09:35:20][VV][api.service:015]: send_connect_response: ConnectResponse {
[09:35:20]  invalid_password: NO
[09:35:20]}
[09:35:21][VV][api.service:264]: on_device_info_request: DeviceInfoRequest {}
[09:35:21][VV][api.service:040]: send_device_info_response: DeviceInfoResponse {
[09:35:21]  uses_password: NO
[09:35:21]  name: 'irrigation2'
[09:35:21]  mac_address: '80:7D:3A:3C:5B:4B'
[09:35:21]  esphome_version: '1.14.3'
[09:35:21]  compilation_time: 'Mar  4 2020, 09:30:36'
[09:35:21]  model: 'PLATFORMIO_NODEMCUV2'
[09:35:21]  has_deep_sleep: NO
[09:35:21]}
[09:35:21][VV][api.service:271]: on_list_entities_request: ListEntitiesRequest {}
[09:35:21][VV][api.service:051]: send_list_entities_binary_sensor_response: ListEntitiesBinarySensorResponse {
[09:35:21]  object_id: 'outside_box_door'
[09:35:21]  key: 1204846219
[09:35:21]  name: 'Outside box Door'
[09:35:21]  unique_id: 'irrigation2binary_sensoroutside_box_door'
[09:35:21]  device_class: 'door'
[09:35:21]  is_status_binary_sensor: NO
[09:35:21]}
[09:35:21][VV][api.service:051]: send_list_entities_binary_sensor_response: ListEntitiesBinarySensorResponse {
[09:35:21]  object_id: 'irrigation_2_status'
[09:35:21]  key: 2311610255
[09:35:21]  name: 'Irrigation 2 Status'
[09:35:21]  unique_id: 'irrigation2binary_sensorirrigation_2_status'
[09:35:21]  device_class: 'connectivity'
[09:35:21]  is_status_binary_sensor: YES
[09:35:21]}
[09:35:21][VV][api.service:113]: send_list_entities_sensor_response: ListEntitiesSensorResponse {
[09:35:21]  object_id: 'irrigation_2_wifi_signal_sensor'
[09:35:21]  key: 1541241102
[09:35:21]  name: 'Irrigation 2 WiFi Signal Sensor'
[09:35:21]  unique_id: '807d3a3c5b4b-wifisignal'
[09:35:21]  icon: 'mdi:wifi'
[09:35:21]  unit_of_measurement: 'dB'
[09:35:21]  accuracy_decimals: 0
[09:35:21]  force_update: NO
[09:35:21]}
[09:35:21][VV][api.service:113]: send_list_entities_sensor_response: ListEntitiesSensorResponse {
[09:35:21]  object_id: 'irrigation_2_vcc_voltage'
[09:35:21]  key: 1294262228
[09:35:21]  name: 'Irrigation 2 VCC Voltage'
[09:35:21]  unique_id: '807d3a3c5b4b-adc'
[09:35:21]  icon: 'mdi:flash'
[09:35:21]  unit_of_measurement: 'V'
[09:35:21]  accuracy_decimals: 2
[09:35:21]  force_update: NO
[09:35:21]}
[09:35:21][VV][api.service:113]: send_list_entities_sensor_response: ListEntitiesSensorResponse {
[09:35:21]  object_id: 'outside_temperature'
[09:35:21]  key: 2259435129
[09:35:21]  name: 'Outside Temperature'
[09:35:21]  unique_id: 'dallas-D50316002C9DFF28'
[09:35:21]  icon: 'mdi:thermometer'
[09:35:21]  unit_of_measurement: '°C'
[09:35:21]  accuracy_decimals: 1
[09:35:21]  force_update: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2'
[09:35:21]  key: 1709438994
[09:35:21]  name: 'Irrigation 2'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2'
[09:35:21]  icon: 'mdi:restart'
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2_-_zone_1'
[09:35:21]  key: 1682762415
[09:35:21]  name: 'Irrigation 2 - Zone 1'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2_-_zone_1'
[09:35:21]  icon: ''
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2_-_zone_2'
[09:35:21]  key: 1682762412
[09:35:21]  name: 'Irrigation 2 - Zone 2'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2_-_zone_2'
[09:35:21]  icon: ''
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2_-_zone_3'
[09:35:21]  key: 1682762413
[09:35:21]  name: 'Irrigation 2 - Zone 3'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2_-_zone_3'
[09:35:21]  icon: ''
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2_-_zone_4'
[09:35:21]  key: 1682762410
[09:35:21]  name: 'Irrigation 2 - Zone 4'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2_-_zone_4'
[09:35:21]  icon: ''
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2_-_zone_5'
[09:35:21]  key: 1682762411
[09:35:21]  name: 'Irrigation 2 - Zone 5'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2_-_zone_5'
[09:35:21]  icon: ''
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:127]: send_list_entities_switch_response: ListEntitiesSwitchResponse {
[09:35:21]  object_id: 'irrigation_2_-_zone_6'
[09:35:21]  key: 1682762408
[09:35:21]  name: 'Irrigation 2 - Zone 6'
[09:35:21]  unique_id: 'irrigation2switchirrigation_2_-_zone_6'
[09:35:21]  icon: ''
[09:35:21]  assumed_state: NO
[09:35:21]}
[09:35:21][VV][api.service:143]: send_list_entities_text_sensor_response: ListEntitiesTextSensorResponse {
[09:35:21]  object_id: 'irrigation_uptime'
[09:35:21]  key: 1890756196
[09:35:21]  name: 'Irrigation Uptime'
[09:35:21]  unique_id: 'irrigation2text_sensorirrigation_uptime'
[09:35:21]  icon: 'mdi:clock-start'
[09:35:21]}
[09:35:21][VV][api.service:045]: send_list_entities_done_response: ListEntitiesDoneResponse {}
[09:35:21][VV][api.service:278]: on_subscribe_states_request: SubscribeStatesRequest {}
[09:35:21][VV][api.service:328]: on_subscribe_homeassistant_services_request: SubscribeHomeassistantServicesRequest {}
[09:35:21][VV][api.service:058]: send_binary_sensor_state_response: BinarySensorStateResponse {
[09:35:21]  key: 1204846219
[09:35:21]  state: YES
[09:35:21]  missing_state: NO
[09:35:21]}
[09:35:21][VV][api.service:058]: send_binary_sensor_state_response: BinarySensorStateResponse {
[09:35:21]  key: 2311610255
[09:35:21]  state: YES
[09:35:21]  missing_state: NO
[09:35:21]}
[09:35:21][VV][api.service:120]: send_sensor_state_response: SensorStateResponse {
[09:35:21]  key: 1541241102
[09:35:21]  state: -76
[09:35:21]  missing_state: NO
[09:35:21]}
[09:35:21][VV][api.service:120]: send_sensor_state_response: SensorStateResponse {
[09:35:21]  key: 1294262228
[09:35:21]  state: 3.19992
[09:35:21]  missing_state: NO
[09:35:21]}
[09:35:21][VV][api.service:120]: send_sensor_state_response: SensorStateResponse {
[09:35:21]  key: 2259435129
[09:35:21]  state: nan
[09:35:21]  missing_state: YES
[09:35:21]}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1709438994
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1682762415
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1682762412
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:349]: on_subscribe_home_assistant_states_request: SubscribeHomeAssistantStatesRequest {}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1682762413
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1682762410
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1682762411
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:134]: send_switch_state_response: SwitchStateResponse {
[09:35:22]  key: 1682762408
[09:35:22]  state: NO
[09:35:22]}
[09:35:22][VV][api.service:150]: send_text_sensor_state_response: TextSensorStateResponse {
[09:35:22]  key: 1890756196
[09:35:22]  state: '0d 0h 2m 59s'
[09:35:22]  missing_state: NO
[09:35:22]}
[09:35:35][VV][api.service:250]: on_ping_request: PingRequest {}