Climate component with support for Sinclair AC

I own an older AC split unit ASH-18AQ made by Sinclair. I wanted to control this AC unit with my HomeAssistant, so I made a simple ESP8826 device with a connected IR transmitter and receiver. Unfortunately, the Climate component in ESPHome does not support the Sinclair platform.

How to add support by myself? Or is there any other platform compatible with Sinclair units?

When I use the original remote control for my AC unit I receive these codes (taken from log messages of the ESPHome device):

Turn ON
Received LG: data=0x38A0000A, nbits=32

Turn OFF
Received LG: data=0x28A0000A, nbits=32

Set the temperature to 21C
Received LG: data=0x38A0000A, nbits=32

Set the temperature to 20C
Received LG: data=0x3820000A, nbits=32

Set the temperature to 19C
Received LG: data=0x38C0000A, nbits=32

So it seems Sinclair is using LG 32-bit codes. But when I try to use platform climate_ir_lg, I can see 28-bit codes to be sent. For example Received LG: data=0x0880C602, nbits=28 for setting up 21°C.

Is there anything else I can use or try? Or is it possible to set my own custom IR codes for climate component?

I did a little more research by myself and captured most of the IR codes sent by the Sinclair remote (the label on the remote control says Wireless remote controller Y512SB).

The picture below shows an oscilloscope screenshot of decoded data for a command HEAT ON, temperature 21°C, fan intensity low, no swing. The signal is inverted as I used a pull-up resistor on the open-collector output of my IR receiver.

The preamble of the data has a length of 9.0 and 4.5 ms which is standard for the NEC protocol. Then 43 bits of data are encoded as a 1.25 ms pulse for logical LOW and 2.25 ms for HIGH. Data are sent with the LSB first.

It seems like the NEC protocol (preamble and timing are as expected), just with 43 bits of data:

  • The last 15 bits (MSB) are always constant – 0x2515, this is probably the address part.
  • The first 12 bits (LSB) are mode (heating, cooling, dry, on/off), fan settings and temperature (16°C-30°C).
  • Bits in the middle contains swing modes, sleep, timer, purify and other modes. I didn’t try these, yet.

I think I should be able to make my own ESPHome component for this.

More progress update: I successfully made my own esphome component climate_ir_sinclair (Github) capable of transmitting and receiving commands for my Sinclair AC unit ASH-18AQ.

The component is still a work in progress as I tested only the working mode, temperature setting and fan speed settings. Swing, sleep, timer and other functions are not implemented, yet. I can receive a command from the original remote control and parse its state for Homeassistant.

esphome:
  name: climatebot
  friendly_name: ClimateBot

esp8266:
  board: d1_mini

external_components:
  - source: github://slintak/esphome@component_climate_sinclair
    components: [ climate_ir_sinclair ]

remote_receiver:
  pin: 
    number: GPIO5
    inverted: true
  id: ir_receiver

remote_transmitter:
  pin:
    number: GPIO4
  carrier_duty_percent: 50%

climate:
  - platform: climate_ir_sinclair
    name: "AC Sinclair"
    receiver_id: ir_receiver
    visual:
      min_temperature: 16
      max_temperature: 30
      temperature_step: 1.0

The transmit function is not working yet. I connected some IR LED to the GPIO 4 of my Wemos D1 mini board and I can see transmitted data on my oscilloscope. Unfortunately, the AC unit is not responding to it. Don’t know if the problem is in the data itself or if my IR LED has a wrong wavelength or power.

This oscilloscope screen shows transmitted data for the command HEAT ON, temperature 21°C, fan intensity low, no swing, it’s the same command as in my previous post. Both signals (the one sent by the original IR remote and the one sent by my esphome component) look the same. But Sinclair AC is responding only to the original IR remote.

More work is required, but so far I am happy about the “receive function” working.