geoffdavis / esphome-mitsubishiheatpump

ESPHome Climate Component for Mitsubishi Heatpumps using direct serial connection
BSD 2-Clause "Simplified" License
498 stars 143 forks source link

HVAC status updates take up to 25 seconds to appear in Home Assistant #114

Closed s0ftice closed 9 months ago

s0ftice commented 9 months ago

Hi all,

thanks for the fantastic work on the ESPHome integration! I got it to work with a WeMos D1 Mini v4 over 5V on a Mitsubishi MSY-GE18VA.

Bi-directional communication works fine (in principal).

It seems to me it's polling only every 25 seconds. If I change the temperature using the good ol' remote controller x seconds before the next 25 time mark, it will update the status in HA in x seconds. Meaning, it's not a constant delay of 25 seconds. Or in other words: on average I have to wait more than 10 seconds for changes to appear...

I thought this could be an issue between HA and ESPHome, however it's not. Status updates when compiling in the web server component appear at the same time there as in HA.

My update_interval is set to 500ms. I tried lower and higher values and does not have any impact on the 25 seconds polling.

Wifi ist stable (strong signal -51 dB, no packet loss).

Can anyone point me in the right direction? Thanks!!

EDIT: added my device's ESPHome yaml below.

Using the latest version as of time of posting

ESPHome yaml (click to expand) ``` substitutions: devicename: ac001 esphome: name: $devicename platform: ESP8266 board: d1_mini # Enable logging logger: # ESP8266 only - disable serial port logging, as the HeatPump component # needs the sole hardware UART on the ESP8266 baud_rate: 0 # Enable Home Assistant API api: encryption: key: "removed" ota: password: "removed" wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "$devicename Fallback Hotspot" password: "removed" captive_portal: # Enable Web server. #web_server: # port: 80 # Sync time with Home Assistant. time: - platform: homeassistant id: homeassistant_time sensor: - platform: wifi_signal name: "$devicename WiFi Signal" update_interval: 60s - platform: uptime name: "$devicename Uptime" external_components: - source: github://geoffdavis/esphome-mitsubishiheatpump climate: - platform: mitsubishi_heatpump name: "${devicename}" update_interval: 500ms # ESP32 only - change UART0 to UART1 or UART2 and remove the # logging:baud_rate above to allow the built-in UART0 to function for # logging. hardware_uart: UART0 text_sensor: - platform: version name: "$devicename ESPHome Version" - platform: wifi_info ip_address: name: ${devicename} IP ssid: name: ${devicename} SSID bssid: name: ${devicename} BSSID ```
geoffdavis commented 9 months ago

This is expected behavior. The underlying library takes a while for changes to get reflected, as it has to send the command, and then wait for the unit to acknowledge it. I haven't found a way to speed that process up.