Rendered at 20:24:17 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
MatthiasWandel 1 days ago [-]
I actually did this too, with a lot of different remotes, in micropython on a plain pi pico -- quite fast enough.
Different remotes use different formats, a lot of them repeat the actual data twice.
Most interesting were the remotes for our minisplits, which tranmit the whole state for the minisplit, followed by a second message indicating half degrees -- presumably, older minisplits could only do whole degrees so they added a second message.
Transmitting the words is more challenging, the IR LED needs to be pulsed (modulated) around around 38 khz, and there are potentially different wavelengths. So far have not been able to get our mini splits to accept a code I send to them, I suspect my LED wavelength is wrong.
rahimnathwani 1 days ago [-]
"Most interesting were the remotes for our minisplits, which tranmit the whole state for the minisplit"
I think this is necessary because A/C remotes often have a screen showing the state. If you transmit the whole state then, as long as the most recent button press made the unit beep, you can be sure that the state on the remote screen is correct. If you were to transmit deltas only (e.g. temperature up/down) you could eat out of sync and have no easy way to get back in sync.
matheusmoreira 1 days ago [-]
True! Used to have an A/C unit with this problem. Covering the IR emitter with a finger would desync the remote's state and that of the actual unit. Temperature was the easiest to sync back: just keep lowering it until both systems reach the temperature floor.
This problem still shows up today in limited forms. I have several A/C units of the same model and the same remote. Sometimes the remotes get mixed up and I end up trying to use a remote in the A/C off state to control an A/C that's on, and it does nothing because the remote ignores most button inputs if it thinks the A/C is off. I have cover the IR emitter and "turn it on" first.
rahimnathwani 1 days ago [-]
On the last sentence, I don't know if you have to cover the emitter
danielmeskin 12 hours ago [-]
If the on command is the same as the off command then turning the remote “on” would turn off the AC
bitbank 23 hours ago [-]
On the ESP32 I was able to successfully send codes using the PWM feature with the frequency set to 38KHz. Here's that code:
//
// IR transmit
// Project started 10/12/2026
// written by Larry Bank
//
// Nano C6 IR LED on GPIO3
#define IR_LED 3
#define MARK 1
#define SPACE 0
//
// Send pulse
//
void SendPulse(int iCount, int iType) {
ledcWrite(IR_LED, (iType == MARK) ? 128 : 0); // 50% duty cycle when the signal is "on"
delayMicroseconds(562 * iCount); // continue this mark or space for N 562.5us periods
} /* SendPulse() /
//
// Transmit a 32-bit NEC IR code
//
void SendCode(uint32_t code) {
SendPulse(12, MARK); // start Mark
SendPulse(6, SPACE); // start space
// 562 on, 562 off = logical 0
// 562 on, 1687 off = logical 1
for (int iBit=0; iBit < 32; iBit++) {
SendPulse(1, MARK); // 562.5us mark
SendPulse((code & 0x80000000) ? 1 : 3, SPACE); // 562.5 or 1687.5us space for 1 or 0
code <<= 1;
}
SendPulse(1, MARK); // end of code
SendPulse(1, SPACE); // turn off the LED
} / SendCode() */
void setup() {
pinMode(IR_LED, OUTPUT);
ledcAttach(IR_LED, 38000, 8);
ledcWrite(IR_LED, 0); // start with it off
while (1) {
SendCode(0xc03fe01f);
delay(1000);
}
}
void loop() {
}
cf100clunk 1 days ago [-]
I was a happy user of Harmony IR all-in-one remotes for many years, but alas some time after the takeover by Logitech they gave warning that they would end their IR remote control product line. Open source projects like Concordance and Congruity that had popped up soon died off.
I implored Harmony/Logitech many times over to open source their vast database of IR codes, or at least make it available. Now it seems to have been squandered, meaning that a project like this OP one has to use a learning-mode per device and cannot select from almost every known consumer electronic IR code that Harmony enjoyed. Does such a publicly available database exist? Many cheap all-in-one IR remote controls came with printed tables of numeric codes, but those were not the actual IR codes themselves and were not universally applied across brands.
Nowadays a Sofa Baton (IR & Bluetooth) remote does the job.
xp84 21 hours ago [-]
I really enjoyed my Harmony Hub and remote for years. Honestly the software had been clunky from day 1, but it was one of those things that you just suffer through for 1-2 hours to get everything just right and then don't touch for 5 years until you buy a new component. What I loved that nothing since replicates, is the way the Hub be used over IP, so Home Assistant could operate it, making all IR devices "smart" without any of the privacy problems of giving them internet access, and without having to have up-to-date hardware. Like, a receiver from 2011 sounds just as good today as a $1200 2026 one with wi-fi, but costs like $40 with speakers at Goodwill. And the new one probably is only IP controllable with some shitty cloud-connected phone app.
The last device I pulled was a TCL 75Q77K which might have been released around March 2025 which was 2 months before Logitech announced the discontinuation of Logitech Harmony Remote Software so they might be done adding new devices. I dunno.
cf100clunk 1 days ago [-]
Wow, that is superb work! The OP's work might allow identifying obscure or poorly labeled IR remotes by characteristics found in your database.
Onavo 1 days ago [-]
Here's a challenge for the author: QAM256 and error correction. You can easily reinvent LiFi at home.
Different remotes use different formats, a lot of them repeat the actual data twice. Most interesting were the remotes for our minisplits, which tranmit the whole state for the minisplit, followed by a second message indicating half degrees -- presumably, older minisplits could only do whole degrees so they added a second message.
Transmitting the words is more challenging, the IR LED needs to be pulsed (modulated) around around 38 khz, and there are potentially different wavelengths. So far have not been able to get our mini splits to accept a code I send to them, I suspect my LED wavelength is wrong.
I think this is necessary because A/C remotes often have a screen showing the state. If you transmit the whole state then, as long as the most recent button press made the unit beep, you can be sure that the state on the remote screen is correct. If you were to transmit deltas only (e.g. temperature up/down) you could eat out of sync and have no easy way to get back in sync.
This problem still shows up today in limited forms. I have several A/C units of the same model and the same remote. Sometimes the remotes get mixed up and I end up trying to use a remote in the A/C off state to control an A/C that's on, and it does nothing because the remote ignores most button inputs if it thinks the A/C is off. I have cover the IR emitter and "turn it on" first.
// // IR transmit // Project started 10/12/2026 // written by Larry Bank // // Nano C6 IR LED on GPIO3 #define IR_LED 3 #define MARK 1 #define SPACE 0 // // Send pulse // void SendPulse(int iCount, int iType) { ledcWrite(IR_LED, (iType == MARK) ? 128 : 0); // 50% duty cycle when the signal is "on" delayMicroseconds(562 * iCount); // continue this mark or space for N 562.5us periods } /* SendPulse() / // // Transmit a 32-bit NEC IR code // void SendCode(uint32_t code) { SendPulse(12, MARK); // start Mark SendPulse(6, SPACE); // start space // 562 on, 562 off = logical 0 // 562 on, 1687 off = logical 1 for (int iBit=0; iBit < 32; iBit++) { SendPulse(1, MARK); // 562.5us mark SendPulse((code & 0x80000000) ? 1 : 3, SPACE); // 562.5 or 1687.5us space for 1 or 0 code <<= 1; } SendPulse(1, MARK); // end of code SendPulse(1, SPACE); // turn off the LED } / SendCode() */
void setup() { pinMode(IR_LED, OUTPUT); ledcAttach(IR_LED, 38000, 8); ledcWrite(IR_LED, 0); // start with it off
}void loop() { }
https://members.harmonyremote.com/EasyZapper/
I implored Harmony/Logitech many times over to open source their vast database of IR codes, or at least make it available. Now it seems to have been squandered, meaning that a project like this OP one has to use a learning-mode per device and cannot select from almost every known consumer electronic IR code that Harmony enjoyed. Does such a publicly available database exist? Many cheap all-in-one IR remote controls came with printed tables of numeric codes, but those were not the actual IR codes themselves and were not universally applied across brands.
Nowadays a Sofa Baton (IR & Bluetooth) remote does the job.
The last device I pulled was a TCL 75Q77K which might have been released around March 2025 which was 2 months before Logitech announced the discontinuation of Logitech Harmony Remote Software so they might be done adding new devices. I dunno.