Hacker News new | ask | show | jobs
by andix 3 days ago
OT: I'm looking for some way to control my AC via Infrared. I have a few pretty standard AC units with IR remotes. The ones with a display on it, that just transmit all the settings on the remote via IR on every button press.

Some device I can mount in proximity, that controls the AC, but preferably also has a temperature and humidity sensor included.

8 comments

The Broadlink Rm4 Pro IR blaster puck includes an optional "Sensor Cable" which measures temperature and humidity directly. The initial setup via the app is terrible and requires location services for Wi-Fi pairing, but once that's done it has worked fairly well.

I had better luck for my use cases with the Aqara M2 Hub. I believe that device is discontinued, but they seem to have other very similar models. No built in climate sensors on that one, but the UX and IR signal response time have been much better overall.

I don't know if there is a pre-made solution but it's easily doable using something like an ESP32 or a Pico W and a little soldering. Maybe ESPHome has IR support but I used a micropython library and a spreadsheet to decipher a Mitsubishi Heavy IR remote. You can then use the same library to play a string of bits through an IR LED[1]. You can get IR receivers and transmitters for cheap on Amazon. You can pair that with any commonly used sensor (DHT22, HTU21, etc... I prefer the BME280), for all of which you can find libraries on GitHub and breakout boards cheaply online. Then you could either implement a small web server to control it standalone or an MQTT client to control it from i.e. Home Assistant. If you use an I2C sensor, and something like this[2] you don't even need to solder anything you can just connect it all using those DuPont cables and stuff it in a box.

[1] https://github.com/peterhinch/micropython_ir/issues/46 [2] https://www.tindie.com/products/maxmixproject/power-bus/

I tried that with one once back in the pre-bot days. While someone could certainly have made it work, I couldn't make sense of the IR commands with available tools and this model wasn't something that others had already figured out (I tried all that ESPHome included).

I thought about building my own controls for it: After all, it's just a compressor and a fan that are each controlled by relays -- how hard could it be to have them controlled by my relays? Or to have its relays controlled by my logic?

But then I discovered that this particular aircon would resume, with a delay[1], after a power outage.

So I turned it on and left it on, and put it on a smart plug. It turned out that this was Good Enough, and there was no drama. It just worked.

Plus, because Home Assistant: I was able to use a temperature sensor that I found available in the Alexa speaker that I already had on the night stand to prove that the overall concept worked. (I added a Zigbee temperature sensor later on.)

[1]: The compressor likes to stay switched off for awhile after it has been recently run. People sometimes like to make it sound complicated or mysterious, but: It's just to help prevent the compressor from trying to restart while from a resting position that is in the middle of a compression stroke. Doing that is harder on things than it could be in the best case, and it stalls the compressor in the worst case (which can then extend to exercising thermal and/or overcurrent protection).

But as long as there's a bit of a gap between runs, then that provides time for the high-pressure side to leak down so there's not so much to compress, and the compressor can restart without too much fuss. That's all; that's the whole merit. My aircon's irrevocable power-up delay handled that problem well-enough, but the logic could be scripted in HA's YAML with a helper if that were necessary.

Some ACs have UART interfaces inside that can be fairly easily hooked up to an esp32.

You could also buy an IR transmitter module from AliExpress and add a temperature/humidity sensor chip on I2C like an SHT41.

If you are not averse to an off-the-shelf solution, Broadlink RM4 PRO universal remote will do both IR and 433MHz wireless (records and replays codes). The temperature and humidity sensor which you can plug-in if you need it is sold separately though (Broadlink HTS2).
I've successfully emulated remotes with ESPHome + xiao seeed + basic IR diode. Dozen lines of YAML can turn it into a thermostat in Home Assistant.

Flipper Zero can record IR remotes.

I use http://getmysa.com for this. they have their own app and scheduling, but i just automate mine via homeassistant
This doesn't look like it can control the AC unit via infrared. How did you solve that part?
They have a version for mini-splits that is an ir blaster.
I have been using Sensibo for years. Never had a problem.