Close

Have you tried turning it off and on agian

A project log for RC5 Madness

Controlling an old Philips Amplifier with IR, RC5 and Home Assistant via esphome

schlionschlion 10/20/2023 at 17:260 Comments

Or: getting the correct codes

I can send codes to the device, and they are recognized there ✅

Next, I need to find out what code I need to send to make the receiver go to standby. And to wake it up again. A nice bonus might be volume control.

I already know, sending command 16 (0x10) to address/device 16 (0x10) turns the volume up by two. Interestingly, the command for standby 12 (0x0C) sent to device 16 does exactly nothing. So I ran through all the commands on device 16 and got the following:

Command (DEC)
Command (HEX)
Function
00x00Surround off
10x01Dolby Pro logic
20x023 Stereo
130x0DMUTE (only when not in AUX mode)
160x10Volume Up
170x11Volume Down
380x26Sleep (10-min sleep timer)
460x2ENORMAL/WIDE (?center mode?)
880x58TEST--C/TEST--FR
1020x66CENT+
1020x76CENT-

All the other ones did nothing, although it is entirely possible, that combinations might so something. E.g. there must be a way to manipulate the sleep timer setting. But I'm not very interested in that, so I called it a day.

Cool, so I can do some wild stuff, but really I would like to send this whole thing to standby and wake it up again. Somewhere on the interwebs I read, that the receiver used to interpret the IR signal and relay it to other devices. So I tried different device numbers and lo and behold, using the standby code 12 (0x0C) with basically any other device/address worked. Nice! But I'm still not sure why this works. I would assume, if I'm sending the standby signal to the TV (device 0, 0x00), it would turn the TV off, but not my receiver?

Anyway, later I realized, that the tuner in the receiver is addressed by 17 (0x11) and it seemed right to turn the device off with (17=0x11, 12=0x0C).

Receiver goes to standby ✅

But how do I get it to turn back on? None of the commands on device 16 did anything to that effect. And sending the standby code again did not toggle standby mode on this device. However, pressing the physical source buttons on the device did end standby mode. Only I had no idea how to achieve the same thing via IR.

Side note: I checked, if the power outlet on the back would turn off in standby mode. And lucky me, it did :) Otherwise I could have stopped my project now. Without any possibility of controlling the Bluetooth dongle, I would have to resort to the smart switched outlet again, no need for fancy IR communication.

After a lot more digging and reading the documentation properly, I noticed command 63 (0x3F), which does some kind of source select. So I sent it to device 16 and nothing happened. Then I tried sending it to different devices and that actually worked:

Device/Address (DEC)
Device/Address (HEX)Source
00x00TV/AUX
40x00CD/V-CD/CD-i
50x05VCR 1
60x06VCR 2
170x11TUNER
180x12TAPE/DCC
200x14CD/V-CD/CD-i (again)
230x17TAPE

Now I can select the source ✅ and also get the receiver out of standby ✅



Finding the correct address/device and command was extremely tedious. At some point, I decided to make my life easier and install two buttons, one for repeating the transmission and one for incrementing either the address or the command. But any time you use buttons, you'll have to debounce :/ See my SimpleSenderTest.ino file in the project files.

Also, here's the schematic and breadboard:

Schematic: transmitter with buttons
Breadboard: transmitter with buttons

Discussions