Make your dumb Air Conditioner smart 

Summers in Swizerland are usually not that hot, but this Summer was special and we even moved to a attic flat, where the temperature inside raised up to 30, during hot days. That’s why I decided to go for a Air Conditioner. For sure, I was looking for a smart one, but I couldn’t find one, which suits my needs and my budget. That’s why I went for the De’Longhi PAC N87. It offers a great price performance ratio, but unfortunately it’s dumb. But hey, it has a IR remote, which gives some possibilites!

How to make your dumb Air Conditioner smart

Air conditioners are really power hungry, the PAC N87 consumes around 1 kW/h, in Switzerland that would leed to monhtly cost of 172$  only for the power. That’s why it’s not an option for me, to run this thing 24h. However, if I come home from work, I want a comfortable temperature in my flat. This can be achieved in two ways, either I turn on the Air Conditioner remotely or I shedule it. Obviously turning it on remotely with the included IR remote is not possible. Shedule it with a standard timer switch is also not possible, as the PAC N87 doesn’t save it’s setting states. Therefore the only way to make it smart, was to hook it up with a ESP8266 12E and a IR LED, which takes over the role of the IR remote. 

There are a few options on how you can control a IR LED over Home Assistant, if you run Home Assistant on a RaspberryPi, you can directly hook up a IR LED to the RaspberryPI. But as I’m running Home Assistant in Docker on my virtualized Server setup this isn’t possible. In my Smart Home, I’m gathering a lot of sensor data, with ESP8266 12Es and RaspberryPis which stream the data to my self-hosted Mosquitto MQTT Broker. So I though, it might be the best way, to make my dumb Air Conditioner smart with the help of MQTT. However, I can imagine, that this could also be done in some kind of REST API manner.

Please take note, that until now, this solution only supports turning on / off the Air Conditioner. 

The Code

There are two places, where code or configuration is requiered. In Home Assistant we need to add some kind of switch, in this case it’s a MQTT switch, to turn on and off the Air Conditioner. These lines of configuration can be found in my Github Repo.

For the ESP8266 12E, there’s a bit more of code and adjustments on your side requiered. But here you go. 

How to sniff IR commands

The Hex Strings which are used in the irsend.sendNEC command, are only applicable and tested with the De’Longhi PAC N87 and might work for other De’Longhi Air Conditioners. If you don’t have a De’Longhi Air Conditioner, you first need to find out which codes are sent from the IR remote to the Air Conditioner to turn it on or off. Keep in mind, that for receiving IR signals, no the same IR LED can be used. I’ll link the requiered equipment below. To sniff IR communication, you need to hook up a IR receiver LED to your ESP8266 12E and run the IRrecvDUMPV2 or IRrecvDUMP sketch from the following library. Point your IR remote towards the ESP8266 12E and note the output in the serial monitor. In my case, it’s the NEC encoded hex string which is used to turn on and off the PAC N87.


Software ressources

Let me know in the comment section or at Twitter, what you think about this cool and cheap project.