Ikea Dragan Speaker Box
Description
This is basically a frame to connect the two halves of an IKEA Dragan box (the bigger one) with a magnetic door latch: https://www.ikea.com/de/de/catalog/products/40222607/ (The magnet mount is called "flap" in the SCAD file, current size is 12x38mm with a hole distance of 27mm, feel free to customize this for your own magnets ... ) My speaker cover I used for this project can be found here: https://www.thingiverse.com/thing:3268837 I put a Raspberry Pi Zero W with Pimoroni's Phat Beat in it, https://shop.pimoroni.com/products/phat-beat added a chinese RFID reader (less than 4 Eur), https://www.aliexpress.com/item/USB-port-EM4001-125khz-RFID-ID-Contactless-sensitivity-Smart-Card-Reader-support-window-system/32743649284.html a membrane button pad (less than 1 Eur), https://www.aliexpress.com/item/1-2-3-4-Key-Button-Membrane-Switch-Matrix-Array-Keyboard-Keypad-Control-Panel-Pad-DIY/32915945543.html a Visaton FRS8 M speaker (about 10 Eur) and made use of the wonderful piCorePlayer (with some home-grown Python scripts...): https://picoreplayer.org/ Voilá, a small Squeezebox with RFID-card-selectable playlists! Feel free to take the OpenSCAD file and modify as needed! ### Python Scripts Now you're entering the experimental section - the uploaded scripts are made up of some hacked-together stuff that was extracted from another project ... and I am currently not able to setup the whole thing from scratch (without breaking the current installation). The "backend" is a python script which connects to the Squeezeserver and sends "play", "pause", etc. commands to it. On top there are two scripts, one is responsible to detect button activity and the other reads input from the USB RFID reader to change the playlist. RFID reader source code is based on this: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/scripts/Reader.py ** Squeezeserver ** Your Squeezeserver needs to have playlists prepared to have a matching ID in angle brackets. For example if you have an RFID card with ID "1234567890", you should create a playlist named "My cool playlist <12345678990>". Available playlists are read by the scripts only at startup - or when a specific "service" ID is read. This ID needs to be defined as "SERVICETAG" in the beginning of script "squeezy.py". You also need to modify /usr/share/squeezeboxserver/IR/Default.map (adapt for your installation...) on the Squeezeserver to let "pause" switch to play mode when off: In section [off] change from `pause.* = dead` to `pause.* = modefunction_off->play` Basically, these are the steps to get everything up and running (I assume that you have the Logitech Media Server aka Squeezeserver already running on your local network): ** Base Install ** - install picoreplayer on SD card - resize filesystem via web gui - configure picoreplayer audio output via webgui (select Hifiberry DAC Zero and then sysdefault:CARD=sndrpihifiberry as output setting) ** Prepare System ** - install tiny core extensions (via web gui or from commandline tce-ab) : - python3.6 - python3.6-dev - python-RPi.GPIO - compiletc ** "Install" Scripts ** - Create (as root / via sudo) a workspace directory on /mnt/mmcblk0p2 - Change workspace owner to tc:staff - create (as user tc) a folder "radio" in /mnt/mmcblk0p2/workspace - copy my Python scripts to /mnt/mmcblk0p2/workspace/radio ** Build evdev module (to access the RFID reader) ** - download (and unzip) python-evdev from https://github.com/gvalkov/python-evdev to /mnt/mmcblk0p2/workspace - run "python3.6 setup.py build" in the unzipped directory - copy new module folder evdev from "build" to /mnt/mmcblk0p2/workspace/radio ** Test it ... ** - try to run everything manually -> go to /mnt/mmcblk0p2/workspace/radio and run startme.sh - very likely to fix a lot at this point... there might be further Python module dependencies I've forgotten. Or worse... ** Autostart ** - Add startup command to /opt/bootlocal.sh: cd /mnt/mmcblk0p2/workspace/radio && ./startme.sh > /home/tc/squeeze.log & - Run "sudo filetool.sh -b" to backup this file to SD. - Reboot the Pi
Statistics
Likes
27
Downloads
0