geoffdavis / esphome-mitsubishiheatpump

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

Unable to build after update to ESPhome 2022.3.2 #62

Closed JanJoh closed 2 years ago

JanJoh commented 2 years ago

Previously I was on 2022.2.0 where it worked as expected

Updating /config/heatpump-etage.yaml
------------------------------------------------------------

INFO Reading configuration /config/heatpump-etage.yaml...
INFO Updating https://github.com/geoffdavis/esphome-mitsubishiheatpump.git@None
INFO Generating C++ source...
INFO Compiling app...
Processing heatpump-etage (board: huzzah; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|-- <ArduinoJson> 6.18.5
|-- <HeatPump> 1.0.0+sha.4c3e51f
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/api/user_services.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/climate/climate.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/climate/climate_mode.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/climate/climate_traits.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/esp8266/core.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/esp8266/gpio.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/esp8266/preferences.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/homeassistant/sensor/homeassistant_sensor.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/homeassistant/time/homeassistant_time.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/mdns/mdns_esp_idf.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/mitsubishi_heatpump/espmhp.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/ota/ota_component.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/sensor/automation.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/sensor/filter.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/sensor/sensor.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/socket/socket.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/text_sensor/filter.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/text_sensor/text_sensor.cpp.o
src/esphome/components/mitsubishi_heatpump/espmhp.cpp: In member function 'virtual void MitsubishiHeatPump::setup()':
src/esphome/components/mitsubishi_heatpump/espmhp.cpp:459:64: error: no matching function for call to 'HeatPump::connect(HardwareSerial*, int&, int, int)'
  459 |     if (hp->connect(this->get_hw_serial_(), this->baud_, -1, -1)) {
      |                                                                ^
In file included from src/esphome/components/mitsubishi_heatpump/espmhp.h:23,
                 from src/esphome.h:30,
                 from src/esphome/components/mitsubishi_heatpump/espmhp.h:20,
                 from src/esphome/components/mitsubishi_heatpump/espmhp.cpp:20:
.piolibdeps/heatpump-etage/HeatPump/src/HeatPump.h:191:10: note: candidate: 'bool HeatPump::connect(HardwareSerial*)'
  191 |     bool connect(HardwareSerial *serial);
      |          ^~~~~~~
.piolibdeps/heatpump-etage/HeatPump/src/HeatPump.h:191:10: note:   candidate expects 1 argument, 4 provided
.piolibdeps/heatpump-etage/HeatPump/src/HeatPump.h:192:10: note: candidate: 'bool HeatPump::connect(HardwareSerial*, int)'
  192 |     bool connect(HardwareSerial *serial, int bitrate);
      |          ^~~~~~~
.piolibdeps/heatpump-etage/HeatPump/src/HeatPump.h:192:10: note:   candidate expects 2 arguments, 4 provided
Compiling .pioenvs/heatpump-etage/src/esphome/components/time/automation.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/time/real_time_clock.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/uptime/uptime_sensor.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/version/version_text_sensor.cpp.o
Compiling .pioenvs/heatpump-etage/src/esphome/components/web_server/list_entities.cpp.o
*** [.pioenvs/heatpump-etage/src/esphome/components/mitsubishi_heatpump/espmhp.cpp.o] Error 1
========================= [FAILED] Took 12.86 seconds =========================
=========== [ERROR] /config/heatpump-etage.yaml ===========

substitutions:
  devicename: heatpump-etage
  friendly_name: Värmepump

external_components:
  - source: github://geoffdavis/esphome-mitsubishiheatpump

esphome:
  name: ${devicename}
  platform: ESP8266
  board: huzzah
  # Boards tested: ESP-01S (ESP8266), Wemos D1 Mini (ESP8266); ESP32 Wifi-DevKit2

<<: !include templates/wifi-settings-1.yaml

# Note: if upgrading from 1.x releases of esphome-mitsubishiheatpump, be sure
# to remove any old entries from the `libraries` and `includes` section.
#libraries:
  # Remove reference to SwiCago/HeatPump

#includes:
  # Remove reference to src/esphome-mitsubishiheatpump

captive_portal:

# 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:
  services:
    - service: set_remote_temperature
      variables:
        temperature: float
      then:
        - lambda: 'id(heatpump_etage).set_remote_temperature(temperature);'

    - service: use_internal_temperature
      then:
        - lambda: 'id(heatpump_etage).set_remote_temperature(0);'

ota:

# Enable Web server.
web_server:
  port: 80

  # Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time
    timezone: Europe/Stockholm

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: ${devicename} ESPHome Version
  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: ${devicename} IP
    ssid:
      name: ${devicename} SSID
    bssid:
      name: ${devicename} BSSID

# Sensors with general information.
sensor:
  # Uptime sensor.
  - platform: uptime
    name: ${devicename} Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: ${devicename} WiFi Signal
    update_interval: 60s

  - platform: homeassistant
    name: "Temperature Sensor From Home Assistant"
    entity_id: sensor.klimatsensorng_etage_bme280_temperatur
    on_value:
      then:
        - lambda: 'id(heatpump_etage).set_remote_temperature(x);'
        - logger.log:
            format: "The temperature sensor reports value %.1f"
            args: [ x ]

climate:
  - platform: mitsubishi_heatpump
    name: "${friendly_name}"
    id: "heatpump_etage"

    # 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
takthetank commented 2 years ago

Same error occurs in version 2022.4.0.

JanJoh commented 2 years ago

Works in 2022.4.6 after clean of files

takthetank commented 2 years ago

Works in 2022.4.6 after clean of files

How do we clean files?

JanJoh commented 2 years ago

You really haven't looked very closely of the options you are presented when hitting the "..." icon in ESPHome, have you? ;)

takthetank commented 2 years ago

Wasn't sure what it does exactly, thanks!