joshbenner / esphome-daikin-s21

ESPHome Component for Daikin Mini-Splits using the S21 serial port.
GNU General Public License v3.0
70 stars 22 forks source link
daikin esp32 esphome home-automation hvac

esphome-daikin-s21

ESPHome component to control Daikin indoor mini-split units with s21 ports.

Many thanks to the work by revk on the fantastic Faikin project, which was the primary inspiration and guide for building this ESPHome component.

Features

Sensors:

Limitations

Hardware

S21 Port

NOTE: The Daikin S21 port provides >5V, so if you intend to power your board on this pin, be sure to test its output and regulate voltage accordingly.

On my Daikin units, the S21 port has the following pins:

The S21 plug is JST EHR-5 and related header B5B-EH-A(LF)(SN), though the plug pins are at standard pin header widths.

PCB

I've been using the board designed by revk available here. Note that revk's design includes a FET that inverts the logic levels on the ESP's RX pin, which required using two separate UART devices to get around an ESPHome limit on having pins inverted differently.

Configuration Example

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

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

uart:
  - id: s21_uart
    tx_pin: GPIO1
    rx_pin: GPIO3
    baud_rate: 2400
    data_bits: 8
    parity: EVEN
    stop_bits: 2

# The base UART communication hub.
daikin_s21:
  tx_uart: s21_uart
  rx_uart: s21_uart

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 homeassistant sensor below

# Optional additional sensors.
sensor:
  - 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.office_temperature
    unit_of_measurement: °F

Here is an example of how daikin_s21 can be used with one inverted UART pin:

uart:
  - id: s21_tx
    tx_pin: 26
    baud_rate: 2400
    data_bits: 8
    parity: EVEN
    stop_bits: 2

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

daikin_s21:
  tx_uart: s21_tx
  rx_uart: s21_rx