All Projects → rc2dev → pifi-radio

rc2dev / pifi-radio

Licence: GPL-3.0 license
MPD web client to listen to radio, written in React and Sinatra.

Programming Languages

javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
SCSS
7915 projects
HTML
75241 projects

Projects that are alternatives of or similar to pifi-radio

gr-eventstream
gr-eventstream is a set of GNU Radio blocks for creating precisely timed events and either inserting them into, or extracting them from normal data-streams precisely. It allows for the definition of high speed time-synchronous c++ burst event handlers, as well as bridging to standard GNU Radio Async PDU messages with precise timing easily.
Stars: ✭ 38 (+5.56%)
Mutual labels:  radio
ashuffle
Automatic library-wide shuffle for mpd.
Stars: ✭ 64 (+77.78%)
Mutual labels:  mpd
RFM-Radio
Real FM radio for Android.
Stars: ✭ 50 (+38.89%)
Mutual labels:  radio
api
Tendrl API
Stars: ✭ 16 (-55.56%)
Mutual labels:  sinatra
ymuse
GTK client for Music Player Daemon (MPD) written in Go
Stars: ✭ 193 (+436.11%)
Mutual labels:  mpd
SW-Chinese-received-frequency
主流国际中文电台短波接收频率
Stars: ✭ 46 (+27.78%)
Mutual labels:  radio
aprscot
aprscot - APRS to Cursor On Target Gateway.
Stars: ✭ 25 (-30.56%)
Mutual labels:  radio
gitron
A web game using GitHub APIs based on Tron 🥏
Stars: ✭ 20 (-44.44%)
Mutual labels:  sinatra
urh
Universal Radio Hacker: Investigate Wireless Protocols Like A Boss
Stars: ✭ 9,060 (+25066.67%)
Mutual labels:  radio
gitlab-live
Interactive online shell for GitLab API
Stars: ✭ 21 (-41.67%)
Mutual labels:  sinatra
go-dmr
Digital Mobile Radio
Stars: ✭ 53 (+47.22%)
Mutual labels:  radio
rack-cargo
🚚 Batch requests for Rack apps (works with Rails, Sinatra, etc)
Stars: ✭ 17 (-52.78%)
Mutual labels:  sinatra
radiopush
Create communities and share songs with Spotify users (https://radiopush.app)
Stars: ✭ 89 (+147.22%)
Mutual labels:  radio
rubynepal.github.io
Official website of Ruby Nepal
Stars: ✭ 21 (-41.67%)
Mutual labels:  sinatra
vcvrack-rtlsdr
📻 FM radio for rtl-sdr USB dongles in the VCVRack environment
Stars: ✭ 20 (-44.44%)
Mutual labels:  radio
mothership
A music player interface
Stars: ✭ 25 (-30.56%)
Mutual labels:  mpd
yolo-mpd
Various music-related tweaks/tips/scripts. Includes fuzzy selection of artist/genre/album script and albumart in the console script
Stars: ✭ 50 (+38.89%)
Mutual labels:  mpd
veterinary-list-api
Veterinary List REST API
Stars: ✭ 18 (-50%)
Mutual labels:  sinatra
sinatra-dev-cheatsheet
A quick-and-dirty cheat sheet for creating HTML/CSS websites, and developing using Sinatra and ActiveRecord.
Stars: ✭ 44 (+22.22%)
Mutual labels:  sinatra
hdradio
HD Radio SDR Receiver
Stars: ✭ 15 (-58.33%)
Mutual labels:  radio

PiFi Radio

PiFi Radio: A MPD web client to listen to radio.

Notice: This project was archived in July 2021 and shouldn't receive updates in the foreseeable future.

Table of contents

Meet PiFi Radio

PiFi Radio is a MPD web client to listen to radio.

If you have no idea what this means... You install it on a device such as the Raspberry Pi or anything with a speaker. Then, you open your browser from anywhere (e.g. your phone) to control it and listen to your favorite radio stations.

PiFi is an interface for MPD, so it has some advantages compared to other solutions, e.g. bluetooth or AirPlay. One of them is that the playback is completely independent from your phone. So you can continue to use it normally, play a video, lose connection or even turn it off, and your Pi will still continue to play the radio.

I started this project in early 2017. At that time, I wanted to configure Raspbian so my parents could listen to radio with ease, but couldn't find any good solution to it.

Some features

  • Responsive interface for phones, tablets and desktops.
  • Display stations clearly. No URLs or weird names.
  • Dark and light themes.
  • Easily search your radios.
  • Centralized list of stations. You get the same radios on every device.
  • Make some radios to be offered only to certain IPs. A use case for this is if there are tons of stations that only you listen and you don't want to pollute everyone else's list.
  • Organize your radios by categories.
  • Streaming URLs can be pasted directly from your web browser. Useful if you want to listen to a radio that was not previously added to the list.
  • Multi-language.
  • Usable by multiple people at the same time.

Demo

On phone:

Demo on mobile

On desktop:

Demo on desktop

Demo on desktop

Installation

While PiFi was imagined for the Pi, it should run on any computer with Ruby and MPD.

Check the installation guide.

Updating

Run:

$ sudo gem update pifi --no-document

Restart PiFi. If you are using the systemd service, this is done by:

$ sudo systemctl restart pifi

Configuration

List of streams

PiFi needs a list of the radios you want to listen. A example is available here.

The list is read by default from /etc/pifi/streams.json. You can change this path creating a configuration file.

To keep it simple, the list of streams is just a JSON file with key-value pairs, where the key is the station name, and the value is the streaming URL. For example:

{
     "Radio 1": "https://example.com/radio1",
     "Radio 2": "https://example.com/radio"
}

If you want to arrange the stations in categories, add a pair with the category name as the key and empty value, as shown below. This will add the headers "Talk radio" and "Classical" above each group of stations, such as "Spain" and "Christmas" in the demo.

{
     "Talk radio": "",
     "Radio 1": "https://example.com/radio1",
     "Radio 2": "https://example.com/radio2"

     "Classical": "",
     "Radio 3": "https://example.com/radio3",
     "Radio 4": "https://example.com/radio4"
}

PiFi configuration

It's now completely optional to have a configuration file for PiFi. You only need one if you want something different from the defaults.

The path is /etc/pifi/config.json and these are the options:

Key Default Description
mpd_host "127.0.0.1" MPD host.
mpd_port 6600 MPD port.
mpd_password "" (none) MPD password.
streams_path "/etc/pifi/streams.json" Path to the JSON file containing the streams.
streams_path_priv "" (none) Path to JSON file containing additional streams. These will be shown only to the devices listed on special_ips.
special_ips [] (none) The IPs of the devices to show additional streams. Example: ["10.0.0.1", "10.0.0.2"]
serve_static true If we should serve static resources. Set it to false if your web server is already doing it.

If you want to change any of these options, download the sample file and edit it to your needs:

$ sudo mkdir -p /etc/pifi
$ sudo wget https://raw.githubusercontent.com/rc2dev/pifi-radio/master/docs/config.json.sample -O /etc/pifi/config.json
$ sudo -e /etc/pifi/config.json

Usage

PiFi can be run:

  • With the pifi command. Check pifi -h for the options available.
  • If you installed the systemd service, with sudo systemctl start pifi.
  • At boot enabling the systemd service with sudo systemctl enable pifi.

On your mobile browser, I suggest you add PiFi Radio to your home screen, for easier access.

Help me translate

You can help me adding a new language to PiFi or improving an existing translation. The translation files are placed here.

Improving an existing translation

The default language for PiFi is English, so you should use it as a reference.

  1. Open the translation file and the English file.
  2. Fill empty strings and fix any bad translations.
  3. Send a pull request.

Adding a new language

  1. Copy the en folder, renaming it to the new language code (e.g. es-ES).
  2. On translation.json, translate the strings. If you aren't sure of some, please make them empty.
  3. Send a pull request.

Some projects using PiFi Radio

Credits

Buy me a coffee

If you find PiFi useful, you can show your support here:

Buy Me A Coffee

License

Licensed under GPLv3

Copyright (C) 2017-2021 Rafael Cavalcanti

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].