joshbenner / esphome-daikin-s21

ESPHome Component for Daikin Mini-Splits using the S21 serial port.
GNU General Public License v3.0
52 stars 18 forks source link

Help #19

Closed amzaldua closed 2 months ago

amzaldua commented 2 months ago

Im using the next code for a ESP32-C3 directly connected to RX and TX ports.

esphome:
  name: esp32-c3-daikin1
  friendly_name: ESP32-C3-DAIKIN1

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

external_components:
  - source: github://joshbenner/esphome-daikin-s21@main
    components: [ daikin_s21 ]

# Enable logging
logger:
#  baud_rate: 0  # Disable UART logger if using UART0 (pins 1,3)

# Enable Home Assistant API
api:
  encryption:
    key: XXXX

ota:
  password: XXXX

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Optional manual IP
  manual_ip:
    static_ip: 192.168.0.168
    gateway: 192.168.0.1
    subnet: 255.255.255.0
  #  DNS1: 192.168.0.100
  #  DNS2: 8.8.8.8

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-C3-Daikin1"
    password: XXXX

captive_portal:

## Información general y de conectividad
text_sensor:
  - platform: version
    name: "Version"

  - platform: wifi_info
    ip_address:
      name: IP Address
    ssid:
      name: Connected SSID
#    bssid:
#      name: Connected BSSID
    mac_address:
      name: Mac Wifi Address

sensor:
#  - platform: esp32_hall
#    name: "Hall Sensor"
#    update_interval: 60s

  - platform: internal_temperature
    name: "Internal Temperature"
    entity_category: "diagnostic"

  - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

  # Sensor tiempo encendido
  - platform: uptime
    name: Uptime Sensor

  # ESP32 DAIKIN S21
  # Optional additional sensors.
  #- platform: daikin_s21
  #  inside_temperature:
  #    name: My Daikin Inside Temperature
  #  outside_temperature:
  #    name: My Daikin Outside Temperature
  #  coil_temperature:
  #    name: My Daikin Coil Temperature
  #  fan_speed:
  #    name: My Daikin Fan Speed
  - platform: homeassistant
    id: room_temp
    entity_id: sensor.shellyplusht_441793d0daa4_temperature
    unit_of_measurement: °C

button:
  - platform: restart
    name: "Restart"
    entity_category: "diagnostic"

  - platform: shutdown
    name: "Shutdown"
    entity_category: "diagnostic"

time:
  - platform: homeassistant
    id: homeassistant_time

  # ESP32 DAIKIN S21
uart:
  - id: s21_tx
    tx_pin: 21
    baud_rate: 2400
    data_bits: 8
    parity: EVEN
    stop_bits: 2

  - id: s21_rx
    rx_pin:
      number: 20
      inverted: true
    baud_rate: 2400
    data_bits: 8
    parity: EVEN
    stop_bits: 2

daikin_s21:
  tx_uart: s21_tx
  rx_uart: s21_rx

  # ESP32 DAIKIN S21
climate:
  - name: My Daikin
    platform: daikin_s21
    visual:
      temperature_step: 1.0
    # Optional HA sensor used to alter setpoint.
    room_temperature_sensor: room_temp  # See Optional additional sensors.

The log is showing this errors:

[23:17:43][D][api:102]: Accepted 192.168.0.100
[23:17:43][D][api.connection:1159]: Home Assistant 2024.4.3 (192.168.0.100): Connected successfully
[23:17:43][D][time:049]: Synchronized time: 2024-04-16 23:17:43
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for F1 response
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for F5 response
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for RH response
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for RI response
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for Ra response
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for RL response
[23:17:44][E][uart:015]: Reading from UART timed out at byte 0!
[23:17:44][W][daikin_s21:257]: Timeout waiting for Rd response
[23:17:44][W][component:232]: Component daikin_s21 took a long time for an operation (896 ms).
[23:17:44][W][component:233]: Components should block for at most 30 ms.
[23:17:44][D][uart_debug:114]: >>> 02:46:31:77:03:02:46:35:7B:03:02:52:48:9A:03:02:52:49:9B:03:02:52:61:B3:03:02:52:4C:9E:03:02:52:64:B6:03

What Im doing wrong?

amzaldua commented 2 months ago

Ok, I obtain now the following message: Target Temperature: nan°C

[08:29:20][D][daikin_s21.climate:313]:   Offset: 0.8
[08:29:20][D][climate:396]: 'My Daikin' - Sending state:
[08:29:20][D][climate:399]:   Mode: HEAT
[08:29:20][D][climate:401]:   Action: IDLE
[08:29:20][D][climate:407]:   Custom Fan Mode: Automatic
[08:29:20][D][climate:416]:   Swing Mode: HORIZONTAL
[08:29:20][D][climate:419]:   Current Temperature: 24.20°C
[08:29:20][D][climate:425]:   Target Temperature: nan°C
[08:29:21][W][component:237]: Component daikin_s21 took a long time for an operation (608 ms).
[08:29:21][W][component:238]: Components should block for at most 30 ms.
[08:29:23][W][component:237]: Component daikin_s21 took a long time for an operation (611 ms).
[08:29:23][W][component:238]: Components should block for at most 30 ms.
[08:29:25][W][component:237]: Component daikin_s21 took a long time for an operation (608 ms).
[08:29:25][W][component:238]: Components should block for at most 30 ms.
[08:29:25][D][daikin_s21.climate:312]: Room temp from external sensor: 24.2 °C (24.2 °C)