Reverse engineered IR protocol for HomeFit Living / Alaska SAC9010QC
/ SAC12010QC
remote control based on an NEC 756504012
IC. It is apparently also known as the "Gree Y502 / Y512
" remote and the silkscreen on the PCB states "Gree 5I2
".
If you want to go straight to the juicy parts, go checkout protocol.md.
The documentation directory contains the SAC9010QC
/ SAC12010QC
manual and other resources used. The pics directory contains some photos of the remote control, it's PCB and my test setup. dumps contains a few PulseView dumps of the IR signal as captured by my DSLogic Plus.
Finally, src contains a simple webserver that can be used to control the AC unit by using a REST protocol. It uses the WiFiManager for initial WiFi setup (connect to it's accesspoint, enter your WiFi SSID and password) and after that you can go to it's IP and do a GET
on /state
to get the current state (as managed by the ESP, not the actual state of the AC unit, since that cannot be read). The response will look like:
{
"power": false,
"temperature": 20,
"fanspeed": 0,
"mode": "COOL",
"swing": false,
"sleep": false,
"humid": false,
"light": false,
"ionizer": false,
"save": false,
"timer": 0
}
The same JSON can be used to send a new state to the AC unit. Use the same /state
endpoint and use the PUT
method. The modes are: AUTO
, COOL
, DEHUMIDIFY
, FAN
and HEAT
and are case-insensitive. Fanspeed 0
is Auto
and can be 0
to 3
. Temperature can range from 16
to 30
. The timer is specified in half-hour increments and can range from 0
to 48
(24 hours). So if you want to set a timer for 13.5 hours use the value 27
(13.5hr / 0.5hr increments = 27
). The air1
and air2
values (see protocol, bits 24 and 25) are currently not exposed over REST. The webserver uses IRremoteESP8266 for sending the IR commands (using the Teco protocol).
This is the actual remote:
This works with any(?) Arduino compatible MCU like an ESP8266 (Wemos D1 Mini for example) or ESP32. Below are two setups I tested.
Recently I discovered these boards (labeled ESP_IR_TR_WIFI
) on AliExpress:
They appear to be an IR "repeater". Signals received will be broadcast over UDP to another module and be broadcasted as IR by the receiving module, in effect creating some sort of "repeater" or "extender".
You can find them here: seller 1, seller 2, seller 3, seller 4, seller 5, seller 6, seller 7, ...
These are cheap and work great for this application and require no soldering. You'll only need one of these boards. The IR LED is connected to GPIO4
, as is the default. All you need to do is connect a USB to Serial adapter to it and flash the firmware. The USB-C port is for power only unfortunately. To flash the module, ground GPIO0
and then power the board, flash the firmware and after that you can disconnect the wire from GND
to GPIO0
.
In the circuit directory you can find a circuit for a Wemos D1 Mini. You'll need:
- 1 resistor 100Ω
- 1 resistor 680Ω
- 1 2N3904 NPN BJT
- 1 IR LED
- A bit of solder and a soldering iron (and soldering skills)
- Optionally some wire / perfboard to mount the components (but you can deadbug the circuit like this)
Build the circuit, flash the Wemos D1 module and you're done.