Giter VIP home page Giter VIP logo

lunar.music.raspberrypi's Introduction

Lunar.Music.RaspberryPi

Go Build Go Report Card License: GPL v3 Donate

This is a backend of Lunar Music project on Raspberry Pi to play music according to command sent from the Lunar.Music.Web.

This Golang application is designed as a music player hosted on a Raspberry Pi. It has a listener which will receive message from RabbitMQ server and perform the following actions.

  • Play a music
    • The music needs to be in MP3 format;
    • The music file needs to be stored online Since this project is designed to work together with Lunar.Music.Web which is using Microsoft OneDrive as the storage, the music files are originally all stored on the Microsoft OneDrive Music folder. Before playing a music, this program will download the MP3 file from Microsoft OneDrive and then keep it locally so that subsequent plays of the same music file can be loaded locally at /home/pi/audio on the Raspberry Pi without downloading it again.
  • Play all music
    • This will play all the MP3 files which are stored in the /home/pi/audio.

How to use?

  1. Install Golang on the Raspberry Pi;

  2. Clone this project to Raspberry Pi;

  3. Install necessary Golang packages;

  4. Create a .env file in the app directory with the following content;

    RABBITMQ_SERVER_CONNECTION_STRING=
    RABBITMQ_CHANNEL_NAME=
    

    If you are using this project together with Lunar.Music.Web, then the RabbitMQ part above must be same as the ones defined in the .env file in Lunar.Music.Web so that the communication between the Raspberry Pi and the web app can work;

  5. Build the go web project in the root directory of this project;

  6. Run the output program. Optionally, you can set this program to be run automatically when Raspberry Pi is connected so that you don't have to manually run the program to make the music player work.

Contributing

First and foremost, thank you! I appreciate that you want to contribute to this project which is my personal project. Your time is valuable, and your contributions mean a lot to me. You are welcomed to contribute to this project development and make it more awesome every day.

Don't hasitate to contact me, open issue, or even submit a PR if you are intrested to contribute to the project.

Together, we learn better.

License

This library is distributed under the GPL-3.0 License found in the LICENSE file.

lunar.music.raspberrypi's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.