Recently, I embarked on a project to integrate my vinyl record collection with my modern smart home system. The goal was to automate the playback of my turntable through my Sonos soundbar, which didn’t natively support Bluetooth or auxiliary inputs. This journey led me to explore innovative solutions using a Raspberry Pi and a door sensor, and I’m thrilled to share my experience and setup with the community. The Challenge: My Sonos soundbar lacked the necessary inputs to directly connect my turntable. While I could have used a traditional AUX cable, I wanted a seamless, automated experience that fit seamlessly into my smart home ecosystem. This led me to research alternative methods and stumbled upon the idea of using a Raspberry Pi with a USB sound card to stream audio over the network. The Solution: I installed Pi OS Lite on my Raspberry Pi and configured it with darkice and icecast2 to create a live audio stream from my turntable. This stream was then exposed locally on the Raspberry Pi. To automate the playback, I utilized Home Assistant’s scripting capabilities to send the audio stream to my Sonos speakers whenever the turntable was activated. Adding Automation: To make the system even more seamless, I integrated a door sensor from Aqara. This sensor was cleverly attached to the tonearm of my turntable. When the tonearm is lifted, indicating the start of playback, the door sensor triggers an automation in Home Assistant. This automation starts the audio stream, adjusts the volume, and ensures the Sonos speakers are grouped for optimal sound distribution. The Setup: - Raspberry Pi: Running Pi OS Lite with darkice and icecast2. - USB Sound Card: To capture audio from the turntable. - Sonos Speakers: Configured to play the audio stream. - Door Sensor: Attached to the turntable’s tonearm to detect playback initiation. - Home Assistant Script: Automates the entire process, including volume adjustment and speaker grouping. The Outcome: The result is a fully automated vinyl playback system that integrates effortlessly with my smart home. When I lift the tonearm to start playback, the system automatically switches to the audio stream, adjusts the volume to a preset level, and groups the Sonos speakers for an immersive listening experience. This setup has transformed my vinyl collection into a modern, automated entertainment system. Tips for Others: - Sensor Placement: Ensure the door sensor is securely attached to the tonearm for consistent detection. - Network Stability: Ensure the Raspberry Pi has a stable network connection to maintain uninterrupted audio streaming. - Script Customization: Tailor the Home Assistant script to your specific needs, such as adjusting volume levels or speaker groupings. This project has been a rewarding journey, combining my love for vinyl records with the convenience of modern smart home technology. I hope this detailed walkthrough inspires others to explore similar projects and further integrate their hobbies into their smart ecosystems. Happy spinning and happy automating!