{"id":21104989,"url":"https://github.com/p4cx/optaradio","last_synced_at":"2026-04-21T20:32:29.211Z","repository":{"id":43244275,"uuid":"202583543","full_name":"p4cx/optaradio","owner":"p4cx","description":"software and other stuff for my personal internet radio side project","archived":false,"fork":false,"pushed_at":"2022-11-22T05:47:06.000Z","size":1433,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T23:20:07.258Z","etag":null,"topics":["open-source","python","radio","raspberry-pi","side-project"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p4cx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T17:25:35.000Z","updated_at":"2021-12-20T11:21:27.000Z","dependencies_parsed_at":"2023-01-22T21:45:54.393Z","dependency_job_id":null,"html_url":"https://github.com/p4cx/optaradio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p4cx/optaradio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4cx%2Foptaradio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4cx%2Foptaradio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4cx%2Foptaradio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4cx%2Foptaradio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p4cx","download_url":"https://codeload.github.com/p4cx/optaradio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4cx%2Foptaradio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32108695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["open-source","python","radio","raspberry-pi","side-project"],"created_at":"2024-11-20T00:02:55.535Z","updated_at":"2026-04-21T20:32:29.165Z","avatar_url":"https://github.com/p4cx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![# optaradio](./web/static/radio_plash.png)   \n   \n---\n\n##### software and other stuff for my personal internet radio side project\n# WORK IN PROGRESS\n\n---\n\n### what have i done:\n\nMy father tidied up his basement and found a *Loewe Opta R115* radio. It worked but had an annoying noise in the background and along with the fact that UKW (FM), \"Ultrakurzwelle\" will be turned off in the future, I decided to rip out all of the stuff and turn it into an internet radio.   \nIt took quite a while. But now I reached a step in which the software and hardware is usable!\n\nI try to document everything, so if you want to recreate this (aka. wake up the dragon): Good luck 🍀    \nThis is no step to step instruction, so you should take your time and think yourself. \n\n---\n\n### hardware i used 🕹\n\n- Raspberry Pi 3 Model B V1.2\n- [1024x600px Display with HDMI](https://de.aliexpress.com/item/32700714288.html)\n- cheap USB Soundcard (3.5 plug on RPI is crap)\n- Amplifier with TPA3116D2 (have to check it out first, if it works fine)\n- Monacor SP-13/4 speaker\n- MeanWell RS-75-12 power supply (hope it delivers enough power for everything)\n\n---\n\n### how i use/make/run that:\n\nYou can run the radio software as standalone on your desktop, buts that a bit stupid, because there are way better tools to play internet radio on your pc.\n\n#### prepare 🥧\n[all commands in your user space: `/home/pi` unless its explicit declared]\n\n1. flash [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) on a micro sd card\n2. `touch ssh` in the root dir on the micro sd card\n3. connect via ssh and run `raspi-config`\n    - System Options \u003e Wireless LAN\n    - System Options \u003e Password\n    - System Options \u003e Boot / Auto Login \u003e Console Autologin\n3. remove boring booting stuff (optional)\n   - add `disable_splash=1` at the end of `/boot/config.txt` and save\n   - add `logo.nologo quiet` and change `console=tty1` to `console=tty3` in `/boot/cmdline.txt` and save\n4. install everything needed\n    - `apt update`\n    - `apt upgrade`\n    - `apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit`    \n      (i know, i could use framebuffer with pygame, but I want to grab the pygame window over ssh and therefore I need xserver)   \n    - `apt install git python3-pip vlc imagemagick pulseaudio libsdl-ttf2.0-0 python3-rpi.gpio`\n5. `dpkg-reconfigure tzdata` and set your correct location for time\n6. `git clone https://github.com/p4cx/optaradio.git` in your user directory `/home/pi`\n7. run `pip3 -r install requirements.txt` in the freshly cloned optaradio repo\n8. grab an api url from [openweathermap](https://openweathermap.org/) and paste it into `nano weater.cfg` - it should look like this: *http://api.openweathermap.org/data/2.5/weather?q=munich\u0026units=metric\u0026appid=1234567890abcdefghijklmnopqrstuv*   \nAttention: get sure, that units is metric: \"units=metric\". \n9. `./optaradio/build.sh` to get fonts and emojis from external repositorys\n\n-- have to test this   \n\n8. create a crontab for autostart\n\t- `sudo crontab -e`\n\t- insert ```@reboot sh /home/pi/optaradio/radio_startup.sh \u003e/home/pi/optaradio/logs/cronlog 2\u003e\u00261```\n9. test it and if it runs: be happy\n\n#### developing 💻\n\n- activate X11 fowarding on your host machine (sshd config)    \n`ssh pi@x.x.x.x -Y` on your machine and you will get the pygame window on your desktop\n- how do get radiothumbnails on the pi? Copy it manually with filezilla!\n\n#### gpio usage 💡\n\n| USAGE | PIN | PIN | USAGE |\n|:---|---:|:---|---:|\n| Power for all buttons | __3V3__ | __5V__ | -- |\n| Favourite button 1 | __2__ | __5V__ | Power for rotary encoder |\n| Favourite button 2 | __3__ | __GND__ | Ground for rotary encoder |\n| Favourite button 3 | __4__ | __14__ | Rotary encoder button |\n| -- | __GND__ | __15__ | Data channel rotary encoder |\n| Favourite button 4 | __17__ | __18__ | Clock rotary encoder |\n| Favourite button 5 | __27__ | __GND__ | Ground for relais |\n| Favourite button 6 | __22__ | __23__ | Channel 1 for relais |\n| -- | __3V3__ | __24__ | Channel 2 for relais |\n| -- | __10__ | __GND__ | -- |\n| Favourite button 7 | __9__ | __25__ | Setting button 1 |\n| -- | __11__ | __8__ | Setting button 2 |\n| -- | __GND__ | __7__ | Setting button 3 |\n| Update button | __0__ | __1__ | Setting button 4 |\n| -- | __5__ | __GND__ | -- |\n| -- | __6__ | __12__ | -- |\n| -- | __13__ | __GND__ | -- |\n| -- | __19__ | __16__ | -- |\n| -- | __26__ | __20__ | -- |\n| -- | __GND__ | __21__ | -- |\n\n#### run the 🐍 radio software \n1. `cd ./optaradio`\n2. `python3 ./init.py`\n\n#### control optaradio\nbasic idea of controlling the radio: Like iDrive from BMW, rotate the wheel (in my case the KY-040 rotary encoder) to go up and down und press it to activate menu entry.   \n\n**control on desktop:**    \n- `return`: input  \n- `up`: up   \n- `down`: down  \n- `1`-`7`: Favourite buttons  \n- `q`: go back   \n- `w`: audio on/off   \n- `e`: LED on/off (future project)   \n- `r`: settings   \n- `ESC`: exit   \n\n**control with real buttons:**    \n- look at gpio usage, it should be self explaining\n\n#### build 📻\n1. get an old radio\n2. get rid of all old crap inside\n3. put a nice lcd and other fancy electronic stuff inside\n4. jump in 🌙 light around the radio\n5. squeeze your Raspberry Pi in the housing\n6. turn it on and have fun\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4cx%2Foptaradio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4cx%2Foptaradio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4cx%2Foptaradio/lists"}