Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emoriarty/pi-radio
https://github.com/emoriarty/pi-radio
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/emoriarty/pi-radio
- Owner: emoriarty
- Created: 2020-12-05T18:25:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-28T23:33:41.000Z (over 3 years ago)
- Last Synced: 2023-02-28T04:12:12.451Z (over 1 year ago)
- Language: Python
- Size: 166 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Radiopi is a personal project meant to transform a raspberry into an Internet radio.
It can also be used on any Linux or Mac OS.## System resources
* python 3.7
* vlc (system)
* ycast## Internet Radio List
* https://www.radio-browser.info/#!/
## Running Ycast server with systemd
Run Ycast server with systemd. The service file mjust be created at path `/etc/systemd/system`. The file must end with `.service` suffix.
```
# /etc/systemd/system/ycast.service[Unit]
Description=YCast internet radio service
After=network.target[Service]
Type=simple
User=pi
Group=pi
ExecStart=/usr/bin/python3 -m ycast -l 0.0.0.0 -p 9876 -c /home/pi/.config/radiopi/stations.yml[Install]
WantedBy=multi-user.target
```* [Manging systemd](https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units)
## Settings
### ENV variables
Create a `.env` in the project root folder to set environment variables decribed below.
* `YCAST_HOST`: ycast url set in systemd service
### PYTHONPATH
Append project's path to `$PYTHONPATH` varibale to make radiopi module available for python.
Once restarted the terminal, radiopi can be executed from anywhere.
```shell
$ python3 -m radiopi
```### Executable
In order to run the executable `radiopi`, append in the `$PATH` variable the project directory path.
After restarting the terminal, radiopi command will be available.
```shell
$ radiopi
```### My stations
Stations list are stored in a file named `stations.yml`. This file must reside in config folder placed in `$HOME/.config/radiopi`.
To prevent losing saved stations, the file is kept in `config/stations.yml` in project folder. This file can be symlinked in config folder.
```shell
$ cd path/to/project
$ ln -s config/stations.yml ~/.config/radiopi
```