audica radio
A stream player/recorder with a Textstar Serial LCD, Web UI and REST UI. Developed to use a raspberrypi as a standalone streaming radio. VLC is needed for playing. Streamripper is needed for recording. It allows to display the current songs of a radio stream if a playlist url and a regular expression is configured for parsing it out.
REST UI
POST | http://raspberripy:3141/add?url=<url>[&name=<name>&playlistUrl=<stream playlist url>&playlistRegexp=<regular expression with group(s)>] | Add a radio station and a optional name for it. Optional is also the a parameter for the stream playlist and a parameter with a regular expression that defines what do parse out from the content of the playlist url |
POST | http://raspberripy:3141/update?old=<stream entry as json>&<new url value>&name=<new name value>&playlistUrl=<new stream playlist url value>&playlistRegexp=<new regular expression with group(s) value> | Update a radio station. |
POST | http://raspberripy:3141/delete?old=<stream entry as json> | Deletes the first station that matches the stream properties |
GET | http://raspberrypi:3141/next | Switch to the next radio station |
GET | http://raspberrypi:3141/prev | Switch to the previous radio station |
GET | http://raspberrypi:3141/play | Start playing the current radio station |
GET | http://raspberrypi:3141/stop | Stop playing the current radio station |
GET | http://raspberrypi:3141/record | Start recording the current radio station |
GET | http://raspberrypi:3141/recordStop | Stop recording the current radio station |
GET | http://raspberrypi:3141/stations | Gives a list of all added stations back. The format is as json. |
GET | http://raspberrypi:3141/currentSong | Gives the current song of the current stream back. |
LCD UI
Key A (upper left) | Switch to the previous radio station |
Key C (upper right) | Switch to the next radio station |
Key B short <2s (bottom left) | Start/Stop playing the current radio station |
Key B long >2s (bottom left) | Show ip's of eth0 and/or wlan0 if available |
Key D (bottom right) | Start/Stop recording the current radio station |
Web UI
Open the following url http://raspberrypi:3141/ in a web browser.
Examples
Complete values for the "kexp" radio station:
url | http://kexp-mp3-2.cac.washington.edu:8000/listen.pls |
name | kexp |
playlistUrl | http://kexp.org/playlist/miniplaylist |
playlistRegexp | <title>([^]*)</title> |
Complete values for the "radio eins" radio station:
url | http://www.radioeins.de/live.m3u |
name | radio eins |
playlistUrl | http://www.radioeins.de/include/rad/nowonair/now_on_air.html |
playlistRegexp | <p class="artist">(.*?)</p>[^]*<p class="songtitle">(.*?)</p> |
There can be multiple groups. Every group is displayed.