Aiyima remote control codes

I "upgraded" my old Technics SU-VX700 amplifier a couple weeks ago. After 15 years of loyal service I wanted to switch to something that had digital inputs, was more energy efficient, and had a remote control. After some digging I found the Aiyima D03. It checked all the boxes + was tiny, had bluetooth and was and only 150 euros. I call it "upgraded" because the Technics was a beast of a Class AA (whatever that means) amplifier and probably very Hifi worthy, the D03 might be considered a downgrade by audiophiles, but I'm not sophisticated enough to be able to tell the difference. Mind you, I am sophisticated enough to be very annoyed by TVs without external speakers. I think both amps sound great on my Linn Keilidh speakers.

The remote control was nice, but it's a separate one from my tv. Using the optical toslink output the volume buttons on my TV do nothing. Annoying for me and my family and very confusing for guests who wonder why the TV has no sound.

I started using some esphome microcontrollers for various home automation tasks, and I got an idea. Why don't I listen on IR to my TV remote and if the volume buttons are pressed, mimic the Aiyima remote and send the volume signals there too. I actually ordered some IR Transmitter and IR Receiver break-out boards some time ago but never used them before.

On a Saturday night I hooked everything up and started debugging the signals from the Philips and Aiyima remote controls. I took a quick look with my oscilloscope but then found how to come to a conclusion quicker using this blog.

The Philips one was easy enough and showed up right away. The Aiyima uses some custom prefix and codes, or at least one not known to the esphome libraries. Many manufacturers use overlapping protocols (even though the keys might not overlap, not all the address space is used) so it recognized JVC, Pronto, Pioneer and some other codes.

Through trial and error I got it to work by using transmit_pioneer 0x4d80 through 0x4dff.

So if you ever want to accomplish the same, here are all the buttons on the remote mapped out.

Action - #nr - pioneer equivalent hex code

bas- 0 0x4d80

tre- 1 0x4d81 

mode 2 0x4d82

bas+ 8 0x4d88

previous 25 0x4d99

next 65 0x4dc1

tre+ 69 0x4dc5

vol+ 74 0x4dca

mute 78 0x4dce

vol- 82 0x4dd2

off 92 0x4ddc

Having examined how similar the different protocols are, I feel like there might be a better way of doing this than emulating pioneer but I'm happy with this solution for now.

I was hoping that there would be secret codes on the amp that were not present on the remote control, to idempotently switch off the amp, switch to a specific input or go to a pre-set volume. That would be great for some more automation. I tried all 256 codes from 0x4d00 to 0x4dff but did not get any results. It's possible that an idempotent "switch on" is present but I didn't want to try all codes twice. I thought of Shenzen IO and realized that of course no one had time for this. That's what I deserve for always saying YAGNI to my engineers.

If you want to plug this into esphome, you can do it like so. This contains just one action but the rest can be extrapolated from the table above:

- platform: template 
    name: amp mute toggle
      - remote_transmitter.transmit_pioneer:
          rc_code_1: 0x4dce # amp mute tuggle


Popular posts from this blog

AI programming tools should be added to the Joel Test

The unreasonable effectiveness of i3, or: ten years of a boring desktop environment

The long long tail of AI applications