File lennox.c runs on a pi and listens for IR commands directed at a Lennox minisplit air conditioner. It decodes them as info on-screen, prints the hex code packet, and sends the hex code packet to my home automation controller where it is fully decoded and used to keep track of the current internal state of the air conditioner. (lennox.c uses a python program to capture the IR bits and their timings. The python code is embedded in lennox.c so all you need is python2 to execute it) The home automation system also accepts commands for air conditioner control, from various sources - the linux command line, a web page, or Alexa voice control. It assembles a remote control packet from the data in the command plus the knowlege of the airco internal state, and sends the 5-byte control packet to a raspberry pi located in the same room as the air conditioner, which in turn sends that packet over IR to the airco, using send-lennox-code.c The code in the home automation program that is relevant to the air condition has been extracted and saved in encoder_decoder.c (but is not something you should expect to use verbatim, it's just there as reference material for decoding and encoding IR packets) The IR receiver hardware I'm using is an off-the-shelf module bought at Amazon: https://www.amazon.com/gp/product/B08X2MFS6S/ The IR transmitter is breadboarded from components: PN2222 transistor Vishay IR LED 2xresistors - basically, the same as this: https://tasmota.github.io/docs/IR-Remote/ (home-made because the IR transmitter in the product via Amazon above was useless) Any questions to gtoal@gtoal.com