ESPHome iPod Controller
September 13, 2023Video
Intro
I’ve been sitting on this project for a while. I had the basic commands (play / pause / next / previous / vol + / vol - ) complete for about 3 years. I had previously purchased the ipod breakout board in 2018 😅
With the help of some folks on Discord, I was finally able to push this project over the finish line. I had a major breakthrough with the serial commands.
There were a lot of legacy resources to sift through on the Wayback Machine along the way. A lot of these resources from iPod Linux, Make Magazine, and the arduino forums were from 2004 - 2011 – most of these websites aren’t functional anymore due to redesigns.
I had also made the ESPHome based iPod Dock IR Remote. It’s useful but different. With this you can scroll through playlists and in theory automate selecting different playlists. I’m sure someone will think of something cool!
Hardware:
-
ESP32
-
500k ohm resistor
Please note: while doing the research a while ago, I learned that using an ESP32 instead of ESP8266 was necessary due to the ESP32 being better at issuing the serial commands at a higher baud rate. I haven’t tried it since, let me know if you find otherwise.
Connecting it up:
ESP32 | connection | iPod 30 pin Breakout Board |
---|---|---|
Ground | jumper wire | Pin 15 |
RX2 [GPIO16] | jumper wire | Pin 10 |
TX2 [GPIO17] | jumper wire | Pin 13 |
x | 500k ohm Resistor | Pin 11 to Pin 21 with resistor in between |
Between Pin 11 and Pin 21 on the iPod breakout board, you need to add one 500k ohm resistor. I used two 250k ohm resistors in a series since it was hard to find one 500k ohm resistor.
Baud Rate:
19200
ESPHome YAML:
esphome:
name: ipod_dock
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: 'name'
password: 'password'
api:
# Enable logging
logger:
ota:
uart:
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 19200
switch:
- platform: uart
name: "iPod Play/Pause Toggle"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x01, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB] # from https://git.cbps.xyz/yuno/Open_Dock/src/branch/wifi-control/main.py
- platform: uart
name: "iPod Volume Up"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x02, 0xF9, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB] # from https://git.cbps.xyz/yuno/Open_Dock/src/branch/master/opendock.py
- platform: uart
name: "iPod Volume Down"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x04, 0xF7, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB] # from https://git.cbps.xyz/yuno/Open_Dock/src/branch/master/opendock.py
- platform: uart
name: "iPod Next Track"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x08, 0xF3, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB] # from https://git.cbps.xyz/yuno/Open_Dock/src/branch/master/opendock.py
- platform: uart
name: "iPod Prev Track"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x10, 0xEB, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB] # from https://git.cbps.xyz/yuno/Open_Dock/src/branch/master/opendock.py
#### not working now
- platform: uart
name: "iPod - Turn Off"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB]
#### not working now
- platform: uart
name: "iPod - Turn On"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB]
# iPod Navigation Control
- platform: uart
name: "iPod Menu Button"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x5, 0x02, 0x00, 0x00, 0x00, 0x40, 0xB9, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB]
- platform: uart
name: "iPod Select Button"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x5, 0x02, 0x00, 0x00, 0x00, 0x80, 0x79, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB]
- platform: uart
name: "iPod Scroll Up"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x6, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF7, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB]
- platform: uart
name: "iPod Scroll Down"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x02, 0xFA, 0xFF, 0x55, 0x6, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF6, 0xFF, 0x55, 0x03, 0x02, 0x00, 0x00, 0xFB]
## voice recording ... only supported on certain iPods
- platform: uart
name: "iPod Voice Record 1"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x01, 0xFB]
- platform: uart
name: "iPod Voice Record 2"
data: [0xFF, 0x55, 0x03, 0x00, 0x01, 0x01, 0xFB]
Next Steps:
- Design and 3D print a dock
- add a camera on top of it to view the screen remotely
- design a great Home Assistant dashboard interface
- There is an Advanced iPod Remote – like when you plug an iPod into a car and you can control it from a car stereo headunit. That is an interesting next step because you can pull all the data from the device to see what playlists are available or the currently playing song and pass the data into Home Assistant. It’d be cool to see this as a Media Player source in HA.
- Also In theory you could recreate the iPod interface in a web interface.
Inspiration & Research Sources:
https://www.instructables.com/Simple-Ipod-Controller/
https://github.com/finsprings/arduinaap/blob/e7e750573aaae81be38dfac5c0a54a7f98e0458b/iPodSerial.cpp
https://makezine.com/article/technology/arduino/control-your-ipod-with-ease-using-t/
https://finsprings.org/iPodSerial.pdf
https://forum.arduino.cc/t/connecting-arduino-to-iphone-ipod-serial/21815
http://www.ipodlinux.org/Apple_Accessory_Protocol/
https://git.cbps.xyz/yuno/Open_Dock/src/branch/wifi-control/main.py