Coder Social home page Coder Social logo

rc2dev / pifi-radio Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 10.0 11.61 MB

MPD web client to listen to radio, written in React and Sinatra.

Home Page: https://rubygems.org/gems/pifi

License: GNU General Public License v3.0

Ruby 20.91% JavaScript 68.45% HTML 3.26% SCSS 7.38%
mpd radio raspberry-pi react ruby sinatra streaming

pifi-radio's People

Contributors

cedege avatar dependabot[bot] avatar fsegouin avatar jmp49152 avatar rc2dev avatar rimeno avatar struart88 avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pifi-radio's Issues

Add support for a radio logo

It would be nice to have the radio logo shown instead of the default icon underneath the radio name in the player. Not sure how this would be pulled from? Probably using an optional field in the streams.json file?

Play random music from the MPD library

Hi,

In your previous version, it was possible to add a random button to play local MPD library shuffled, and it was a really cool bonus :) Do you think it's possible to add it again ?

`start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError) on boot using systemd

Hi,

Thank you for developing pifi radio! I have similar needs and found pifi radio from musicpd.org. I have followed your installation instructions and added pifi to systemd. but i encountered this error after rebooting my raspberry pi 3

Sep 30 01:23:47 raspberrypi systemd[1]: Started A MPD web client to listen to radio. Sep 30 01:23:52 raspberrypi pifi[446]: Config found at /etc/pifi/config.json. Sep 30 01:23:54 raspberrypi pifi[446]: /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:instart_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in start_server' Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/thin-1.7.2/lib/thin/backends/tcp_server.rb:16:in connect'
Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/thin-1.7.2/lib/thin/backends/base.rb:63:in block in start' Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in run_machine'
Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in run' Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in start'
Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/thin-1.7.2/lib/thin/server.rb:162:in start' Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/rack-2.2.3/lib/rack/handler/thin.rb:22:in run'
Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:327:in start' Sep 30 01:23:54 raspberrypi pifi[446]: from /var/lib/gems/2.5.0/gems/pifi-0.4.9/bin/pifi:28:in <top (required)>'
Sep 30 01:23:54 raspberrypi pifi[446]: from /usr/local/bin/pifi:23:in load' Sep 30 01:23:54 raspberrypi pifi[446]: from /usr/local/bin/pifi:23:in

'
Sep 30 01:23:54 raspberrypi pifi[446]: Thin web server (v1.7.2 codename Bachmanity)
Sep 30 01:23:54 raspberrypi pifi[446]: Maximum connections set to 1024
Sep 30 01:23:54 raspberrypi pifi[446]: Listening on 0.0.0.0:3000, CTRL+C to stop
Sep 30 01:23:54 raspberrypi systemd[1]: pifi.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 01:23:54 raspberrypi systemd[1]: pifi.service: Failed with result 'exit-code'.
`

I have been souring the web and raking my brains but cannot find the solution. Pifi starts fine from commandline but i want it to start on boot. Next step I also want Pifi Radio to start playing the first station on the list on boot, but thats for the future.
Could you help shed some light on the above error?

TIA
neal

no such file or directory

Hi,
thanks for your INSTALL.md !

But I can't start application on a fresh (re)installed raspbian.

When I run bundle exec rackup --host 0.0.0.0 :

/home/pi/pifi-radio/app/utils.rb:17:in `read': No such file or directory @ rb_sysopen -  (Errno::ENOENT)
        from /home/pi/pifi-radio/app/utils.rb:17:in `file_to_hash'
        from /home/pi/pifi-radio/app/utils.rb:10:in `get_streams'
        from /home/pi/pifi-radio/app/app.rb:17:in `<top (required)>'
        from /home/pi/pifi-radio/config.ru:1:in `require'
        from /home/pi/pifi-radio/config.ru:1:in `block in <main>'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
        from /home/pi/pifi-radio/config.ru:in `new'
        from /home/pi/pifi-radio/config.ru:in `<main>'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:49:in `eval'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:49:in `new_from_string'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:40:in `parse_file'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:319:in `build_app_and_options_from_config'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:219:in `app'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:354:in `wrapped_app'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:283:in `start'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:148:in `start'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/bin/rackup:4:in `<top (required)>'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/bin/rackup:22:in `load'
        from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/bin/rackup:22:in `<main>'

I don't understand, because everything looks good :

$ pwd
/home/pi/pifi-radio
$ cat /etc/pifi-radio.conf
{
        "cache_max_age": 120,
        "serve_static": true,
        "host": "127.0.0.1",
        "port": 6600,
        "streams_file": "/home/pi/streams.json",
        "streamsp_file": "",
        "special_ips": "",
        "play_local": false
}
$ ls -l /home/pi/streams.json
-rw-r--r-- 1 pi pi 55 mars  25 22:33 /home/pi/streams.json

Thanks for your help

How to run your program

Hi,

Your project fit perfectly my needs, and look promising, but I don't know how to start with it !

Thanks for your help.

Enable volume buttons

(Hi, thanks for this awesome piece of software !)

I wonder how enable the volume buttons ? I guess it is MPD related, maybe something with the mixer configuration, but my knowledge is somehow limited.

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.