All Projects → mariolukas → HydraPlay

mariolukas / HydraPlay

Licence: AGPL-3.0 license
A multiroom audio player setup, based on snapcast and mopidy.

Programming Languages

typescript
32286 projects
python
139335 projects - #7 most used programming language
HTML
75241 projects
SCSS
7915 projects
Jinja
831 projects
shell
77523 projects

Projects that are alternatives of or similar to HydraPlay

ioBroker.sonos
Control and monitor SONOS player from ioBroker
Stars: ✭ 33 (-67.65%)
Mutual labels:  smarthome, sonos, multiroom
snapdroid
Snapcast client for Android
Stars: ✭ 84 (-17.65%)
Mutual labels:  sonos, snapcast, multiroom-audio
Snapcast
Synchronous multiroom audio player
Stars: ✭ 4,028 (+3849.02%)
Mutual labels:  sonos, multiroom-audio
mopidy-scrobbler
Mopidy extension for scrobbling played tracks to Last.fm
Stars: ✭ 60 (-41.18%)
Mutual labels:  mopidy, mopidy-frontend
sonos-controller
Java API for controlling SONOS players
Stars: ✭ 40 (-60.78%)
Mutual labels:  sonos, multiroom-audio
airtunes2mqtt
Multi-Room Audio based on Airplay/Airtunes with MQTT support 🔈
Stars: ✭ 47 (-53.92%)
Mutual labels:  smarthome, multiroom-audio
bco.bcozy
BCozy - A location based smart home user interface.
Stars: ✭ 21 (-79.41%)
Mutual labels:  smarthome, user-interface
homebridge-konnected
A Homebridge plugin for Konnected Alarm Panel devices
Stars: ✭ 25 (-75.49%)
Mutual labels:  smarthome, zones
Smarthome
Device integration platform for your smart home
Stars: ✭ 92 (-9.8%)
Mutual labels:  smarthome, sonos
spotifypiHome
"Install and go" multiroom music playback solution, with support for spotify, airplay and bluetooth.
Stars: ✭ 32 (-68.63%)
Mutual labels:  snapcast, multiroom
asysbus
Arduino System Bus
Stars: ✭ 23 (-77.45%)
Mutual labels:  smarthome
ioBroker.daswetter
weather forecast data from DasWetter.com
Stars: ✭ 16 (-84.31%)
Mutual labels:  smarthome
React-Express-JWT-UserPortal
React.js & Express.js User portal Using Core UI, JWT, JWT Token, Refresh Token, Role & Permission management, User manamgenet, Event Log.
Stars: ✭ 22 (-78.43%)
Mutual labels:  user-interface
vsm-box
Web-component for creating & showing VSM-sentences — Visual Syntax Method
Stars: ✭ 25 (-75.49%)
Mutual labels:  user-interface
hm2mqtt.js
Node.js based Interface between Homematic and MQTT
Stars: ✭ 20 (-80.39%)
Mutual labels:  smarthome
MeteorCandy-meteor-admin-dashboard-devtool
The Fast, Secure and Scalable Admin Panel / Dashboard for Meteor.js
Stars: ✭ 50 (-50.98%)
Mutual labels:  user-interface
binrpc
HomeMatic xmlrpc_bin:// protocol server and client
Stars: ✭ 15 (-85.29%)
Mutual labels:  smarthome
Make-Eufy-Smart-Again
Make an web controlled esp8266 remote control for Eufy (v11 or v11+) vacuum cleaners
Stars: ✭ 54 (-47.06%)
Mutual labels:  smarthome
smart-webcomponents-community
Material & Bootstrap Web Components built with Smart
Stars: ✭ 30 (-70.59%)
Mutual labels:  user-interface
SimpleFox
🦊 A Userstyle theme for Firefox minimalist and Keyboard centered.
Stars: ✭ 1,403 (+1275.49%)
Mutual labels:  user-interface

About HydraPlay

HydraPlay is an easy to use multiroom audio player. HydraPlay provides an integrated web interface to multiple Mopidy instances and one Snapcast server. It generates all the complex configurations under the hood. Only one configuration file is needed to define what the user needs.

The server part is written in Python and provides a webserver for the frontend delivery. Besides that the server generates all configurations and cares about starting Mopidies and Snapcast.

The Frontend is written in TypeScript with the usage of Angular. It connects to the Mopidy and Snapcast web API's to combine all the fancy functions in one user interface.

HydraPlay was inspired by a project i have found on Youtube by Ryan Detzel.

This project is still under development, some things might be unstable

Screenshots

The scnreenshots below show two connected players and a configuration with two (default value) Mopidy instances.

Player controls



Stream/Zone controls



Playlist controls



Getting Started

The following steps require Docker and Docker Compose to be installed on your system.

Guide to install Docker

Guide for Docker Compose

1. Configure Hydraplay

Make a copy of the file hydra.example.json and rename it to hydra.private.json. This file contains all needed configurations for the setup.

Open the file in an editor and make your changes. If you want to enable Spotify you need a client_id and client_secret. Just follow the instructions of the Mopidy Spotify extension. Add the cliendId, client secret and your Spotify login credentials to the config. Enable Spotify and save all changes.

2. Start the Docker container

Now you are able to start the server with:

⚠️ Using this on a Mac with Apple silicon requires Rosetta, additionally you need to enable platform: linux/amd64 in the docker-compose.yml file.

docker-compose up

3. Connect a SnapClient to HydraPlay

Connect a SnapClient to the server.

Integrated Webclient (Snapweb)

The fastest way is by using the integrated webclient. Open a browser and go to

http://<your_server_ip>:<port_in_configuration>/client/

Click on the play button on the top right corner in the window.



Your client should be connected to the server ( you can proceed with the next step)



Connect with SnapClient

Alternatively use a more stable generic client on your client-side systems (e.g Raspberry Pi)

snapclient -h <server_ip>

Detailed information can be found on the offical Snapcast GitHub project documentation.

Use SnapCasts Android Client

Or even install the official android client on your mobile phone

https://github.com/badaix/snapdroid/releases/tag/v0.24.0

4. Open HydraPlay and use it!

Finally open a Browser and goto:

http://<your_server_ip>:<port_in_configuration>

Donations

If you like my work and want to support it, feel free to leave a donation.

Donate with PayPal

Configuration

This section describes the HydraPlay cofiguration file hydra.example.conf

Hydraplay Section

port: defines the web port on which hydraplay will be available in the browser. Defaults is 8080

source_type: Defines which type of audio source should be used between mopidy and snapcast. Possible values are fifo and tcp. Defaults is tcp.

Snapcast Section

config_path: Defines the path to the generated Snapserver config file. Default for Docker usage is /tmp/,

server_port: Default is 1704

remote_port: Default is 1705

additional_fifos: Will be used for additional sources but is not implemented yet. Default is [],

codec: Defines Snapcsats audio codec. Possible values are flac, opus, ogg, pcm Default is flac

Mopidy Section

mpd_base_port: Default is 6600

web_base_port: Defines the web API port for Mopidy. This port is used by HydraPlay for connecting to the Mopidy web API. The first instance equals to this port. For all further instances the port is increased by a count of one. Default is6680

instances: Defines the number of stated Mopidy instances. Each instance represents one stream in HydraPlay. A good starting point would be number of instances equals number of clients. Defualt is 2

config_path: Defines the folder where HydraPlay generates the Mopidy configurations. Default is /tmp/,

Extensions

TODO

Development

Running a dev container locally

If you want to do some development on the ui you can use a local docker dev image for keeping things easy. The dev image is almost the same as the production image but it does not contain a pre-compiled version of the ui. Therefore the image build process is much faster. Just run

docker-compose -f docker-compose.dev.yml build

⚠️ Using this on a Mac with Apple silicon requires Rosetta, additionally you need to enable platform: linux/amd64 in the docker-compose.yml file.

Afterwards you can fire up the development environment by

docker-compose -f docker-compse.dev.yml up

Now you can proceed whit "Build the Angular Frontend"

Build the Angular Frontend

nodejs is required before you can proceed. After you've installed nodejs you can build the ui by using:

cd src/ui
npm install -g @angular/cli -g
npm install
ng build

You can run ng build with the additional argument --watch for live re-compiling while you are working on your code.

The build folder is located at /src/hydraplay/server/static/player

Building the production image.

You can build a production image instead downloading by using:

docker build -f docker/Dockerfile -t mariolukas/hydraplay --build-arg SNAPCASTVERSION=0.26.0 .

⚠️ Using this on a Mac with Apple silicon requires Rosetta, additionally you need to enable platform: linux/amd64 in the docker-compose.yml file.

Details

You can find a blog post. which i wrote a couple of years ago when i started the project. A lot of things changed since the first setup. But it will give you and idea on how it works under the hood. ( the blog post describes the very first prototype! )

Known Issues

  • mdns/avahi does not work within docker. You need to start your clients with the -h <ip_address_of_server> parameter.
  • Play/Pause button will not change back after a track was completed. Somehow there is no Mopidy event incomming for EndOfTrack. (works with tcp sources)

Not Implemented yet

  • add debian package config and make file
  • add build script for raspberry pi image
  • add more documentation ( for Raspberry Pi, MacOS with m1, run without docker, configuration etc. )
  • provide ready to use pre-build docker images

Credits

This project would not have been possible without all the work on Snapcast and Mopidy! Special thanks to Ryan Detzel for the inspiration.

Community and Support

Join us at Discord (https://discord.gg/xs9CKfbpuY).

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].