I want my Teufel e450 to automatically turn on when Echo dot starts playing music. With its capacitive touch buttons and glue sealed housing, there is no simple way to hack it direcly into the device. But luckily it comes with a remote control at least able to power on/off, select next audio source and volume control.
The Teufel Puck-Control uses a NRF51822. I first have tried to figure out the wireless protocol, but without success. So I ended up cloning the firmware (luckily there is no read out protection enabled) onto a cheap NRF51822 board and hooked it up to an ESP32, which then is controlling the "buttons" by setting the input levels. The rotary encoder is emulated by a simple state machine.
For audio level detection I use a coupling capacitor connected between the line-out and the ADC and used a high pass filter feeding a low-pass-filter which then triggers the turn-on-command when hitting a threshold value.
Details
Quick & dirty hardware. small pitch of NRF518022 module requires magnet wire
I just saw, the documentation of the pins is in the teufel.ino file.
Edit: Just finished to replicate the project. Works like a charm! I did'nt use the photoresistor to get the real current power state of the Teufel AVR, because the transmission of the commands is pretty reliable and there are separate commands for on and off. So now I finally again only have one (harmony) remote to control all of my devices. BTW: Instead of an ESP32, I used an Arduino Nano with an Ethernet Shield and had to add the pairing function (>15s input-keypress) to make it work. So last but not least, I want to thank you for your efforts! I also tried to analyse the protocol and therefore already had a 2G4M04S1D-Dev-Board laying around, but would never have had the idea to simply clone the binary from one NRF51822 to the other one. You saved me a ton of time! Thanks.
See comments in Arduino Code:
// Teufel remote functions
// P0.0 Source switch
// P0.04 Power/Mute/Encoder C
// P0.01 Encoder A
// P0.03 Encoder B
// P0.09 LED2
// P0.29 LED1
// P0.13 RX - (unused)
// P0.14 TX - (unused)
// All inputs are pulled up, so active LOW