Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 1.62 KB

SOFTWARE.md

File metadata and controls

47 lines (27 loc) · 1.62 KB

Software

The software runs on your Pi and observes the physical buttons. When the play button is pressed, it tries to read an RFID tag with the NFC module. The RFID is resolved against a locally stored MP3 file. If all of this succeeded, it will turn on the power supply of the amplifier and start playback of the MP3.

The stop button stops the active playback.

Ten minutes after the last song has stopped playing, the power supply to the amplifier is automatically cut.

A web frontend allows you to control the machine with virtual buttons (for testing and if the physical buttons should fail) and upload songs. It also allows you to inspect the playback history and to identify possible problems.

Architecture

The server component is written in TypeScript following the reactive paradigm using RxJs and inversify.

The GUI is written in React with Redux and Bootstrap.

Communication between client and server runs exclusively via WebSockets with socket.io.

Setup

Note that because of binary compatibility issues the server must run under node version 8. Not 7, not 9 but 8.

npm install

Development

Start server and GUI in development mode:

npm start

The server will run by default on port 3001 and the gui on port 3000.

Open http://localhost:3000/

Building

npm run build

Installing

See Installation Instructions.