I began developing an IR remote for my air‑to‑air heat pump, because the stock remote offers only an on/off timer and no temperature scheduling. While my Pokitto-based IR remote also lacks timer features (for now), it lets me control the heat pump from anywhere via the Internet!
Above is an overview of the system architecture. Pokitto talks to a local computer using serial over USB. The local computer runs local.html in a web browser and employs Web Serial API for serial communication. A remote computer runs remote.html, which writes commands to a ‘command’-file on the web server and continuously polls a ‘status’-file for responses from Pokitto. Likewise, the local computer polls the ‘command’-file for new instructions and writes status updates from Pokitto to the ‘status’-file.
IR protocol for the heat pump uses 38 kHz square‑wave bursts separated by short gaps for logical 0 and longer gaps for logical 1. While there are easier ways to implement an IR transmitter on Pokitto, I wanted to try Pokitto’s State Configurable Timer (SCT). The SCT can be split into two independent 16-bit timers: one generates the 38 kHz carrier square-wave, and the other toggles between ‘pause’ (carrier off) and ‘burst’ (carrier on) states to encode the data bits.
I used Raspberry Pi Pico -based logic analyzer (GitHub - gusmanb/logicanalyzer: 24 channel, 100Msps logic analyzer hardware and software) to study the IR protocol and capture transmissions from the original remote. It was also invaluable when debugging the Pokitto IR transmitter code. In the images above, there is an IR receiver module attached to the Pico and an IR LED attached to the Pokitto. IR receiver’s output and two Pokitto pins are connected to logic analyzer input channels on the Pico.
Pokitto C++ source code and the web pages are on github: github.com/jpfli/HeatPumpWebIRBridge


