{"id":16652107,"url":"https://github.com/mariolukas/hydraplay","last_synced_at":"2025-09-03T14:32:27.837Z","repository":{"id":42030755,"uuid":"179475391","full_name":"mariolukas/HydraPlay","owner":"mariolukas","description":"A multiroom audio player setup, based on snapcast and mopidy. ","archived":false,"fork":false,"pushed_at":"2023-04-30T20:51:43.000Z","size":67669,"stargazers_count":146,"open_issues_count":16,"forks_count":20,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-28T11:42:01.073Z","etag":null,"topics":["angular","docker","docker-compose","javascript","mopidy","mopidy-frontend","multiroom","multiroom-audio","music","python","smarthome","snapcast","sonos","ui","user-interface","zones"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariolukas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-04T10:24:22.000Z","updated_at":"2024-12-03T06:43:12.000Z","dependencies_parsed_at":"2023-02-16T12:31:50.362Z","dependency_job_id":null,"html_url":"https://github.com/mariolukas/HydraPlay","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FHydraPlay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FHydraPlay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FHydraPlay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FHydraPlay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariolukas","download_url":"https://codeload.github.com/mariolukas/HydraPlay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231895828,"owners_count":18442361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","docker","docker-compose","javascript","mopidy","mopidy-frontend","multiroom","multiroom-audio","music","python","smarthome","snapcast","sonos","ui","user-interface","zones"],"created_at":"2024-10-12T09:27:38.626Z","updated_at":"2024-12-30T17:48:48.856Z","avatar_url":"https://github.com/mariolukas.png","language":"TypeScript","funding_links":["https://www.paypal.com/donate?hosted_button_id=FHPTBZ43KZGSU"],"categories":[],"sub_categories":[],"readme":"# About HydraPlay\nHydraPlay is an easy to use multiroom audio player. HydraPlay provides an integrated web interface to multiple\n[Mopidy](https://mopidy.com/) instances and one [Snapcast](https://github.com/badaix/snapcast) server. It generates\nall the complex configurations under the hood. Only one configuration file is needed to define what the user needs.\n\nThe server part is written in Python and provides a webserver for the frontend delivery. Besides that the server \ngenerates all configurations and cares about starting Mopidies and Snapcast. \n\nThe Frontend is written in TypeScript with the usage of Angular. It connects to the Mopidy and Snapcast web API's to\ncombine all the fancy functions in one user interface. \n\nHydraPlay was inspired by a project i have found on [Youtube](https://www.youtube.com/watch?v=Lmr58F8gSs8\u0026t=100s) \nby Ryan Detzel.\n\n*This project is still under development, some things might be unstable*\n\n\n## Screenshots\nThe scnreenshots below show two connected players and a configuration with two (default value) Mopidy instances. \n\u003ccenter\u003e\n\n### Player controls\u003cbr\u003e\n\u003cdiv style=\"text-align: center\"\u003e\n  \u003cimg style=\"width: 500px\" src=\"doc/images/screen1.png\"\u003e\u003c/img\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n### Stream/Zone controls\u003cbr\u003e\n\u003cdiv style=\"text-align: center\"\u003e\n  \u003cimg style=\"width: 500px\" src=\"doc/images/screen2.png\"\u003e\u003c/img\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n### Playlist controls\u003cbr\u003e\n\u003cdiv style=\"text-align: center\"\u003e\n  \u003cimg style=\"width: 500px\" src=\"doc/images/screen3.png\"\u003e\u003c/img\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\u003c/center\u003e\n\n\n## Getting Started\n\nThe following steps require Docker and Docker Compose to be installed on your system.\n\n[Guide to install Docker](https://docs.docker.com/get-docker/)\n\n[Guide for Docker Compose](https://docs.docker.com/compose/install/)\n\n### 1. Configure Hydraplay\n\nMake a copy of the file `hydra.example.json` and rename it to `hydra.private.json`. This file contains all needed configurations for the setup. \n\nOpen 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](https://mopidy.com/ext/spotify/). Add the cliendId, client secret and your Spotify login credentials to the config. Enable Spotify and  save all changes.\n\n### 2. Start the Docker container \n\nNow you are able to start the server with:\n\n:warning: **Using this on a Mac with Apple silicon requires [Rosetta](https://docs.docker.com/desktop/mac/apple-silicon/), additionally you need to enable ```platform: linux/amd64``` in the docker-compose.yml file.**\n\n```\ndocker-compose up\n```\n\n### 3. Connect a SnapClient to HydraPlay\n\nConnect a SnapClient to the server.\n\n#### Integrated Webclient (Snapweb)\nThe fastest way is by using the integrated webclient. Open a browser and go to \n\n```\nhttp://\u003cyour_server_ip\u003e:\u003cport_in_configuration\u003e/client/\n```\nClick on the play button on the top right corner in the window.\n\u003cdiv style=\"text-align: center\"\u003e\n  \u003cimg style=\"width: 500px\" src=\"doc/images/screen5.png\"\u003e\u003c/img\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\nYour client should be connected to the server ( you can proceed with the next step)\n\n\u003cdiv style=\"text-align: center\"\u003e\n  \u003cimg style=\"width: 500px\" src=\"doc/images/screen6.png\"\u003e\u003c/img\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n#### Connect with SnapClient\n\nAlternatively use a more stable generic client on your client-side systems (e.g Raspberry Pi)\n\n```\nsnapclient -h \u003cserver_ip\u003e\n```\n\nDetailed information can be found on the offical [Snapcast GitHub project](https://github.com/badaix/snapcast) documentation.\n\n#### Use SnapCasts Android Client\n\nOr even install the official android client on your mobile phone\n\n[https://github.com/badaix/snapdroid/releases/tag/v0.24.0](https://github.com/badaix/snapdroid/releases/tag/v0.24.0)\n\n### 4. Open HydraPlay and use it!\n\nFinally open a Browser and goto:\n\n```\nhttp://\u003cyour_server_ip\u003e:\u003cport_in_configuration\u003e\n```\n\n## Donations\n\nIf you like my work and want to support it, feel free to leave a donation.\n\n\u003ccenter\u003e\n\u003ca href=\"https://www.paypal.com/donate?hosted_button_id=FHPTBZ43KZGSU\"\u003e\n  \u003cimg width=\"200\" src=\"https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png\" alt=\"Donate with PayPal\" /\u003e\n\u003c/a\u003e\n\u003c/center\u003e\n\n\n## Configuration\nThis section describes the HydraPlay cofiguration file ```hydra.example.conf```\n\n### Hydraplay Section\n\n**port**: defines the web port on which hydraplay will be available in the browser. Defaults is ```8080```\n\n**source_type**: Defines which type of audio source should be used between mopidy and snapcast. Possible values are ```fifo``` and ```tcp```. Defaults is ```tcp```.\n### Snapcast Section\n\n**config_path**:  Defines the path to the generated Snapserver config file. Default for Docker usage is ```/tmp/```,\n\n**server_port**: Default is ```1704```\n\n**remote_port**: Default is ```1705```\n\n**additional_fifos**: Will be used for additional sources but is not implemented yet. Default is ```[]```,\n\n**codec**: Defines Snapcsats audio codec. Possible values are ```flac, opus, ogg, pcm``` Default is ```flac```\n\n### Mopidy Section\n\n**mpd_base_port**: Default is ```6600```\n\n**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 is```6680```\n\n**instances**: Defines the number of stated Mopidy instances. Each instance represents one stream in HydraPlay. A good\nstarting point would be number of instances equals number of clients. Defualt is ```2```\n\n**config_path**: Defines the folder where HydraPlay generates the Mopidy configurations. Default is ```/tmp/```,\n\n#### Extensions\nTODO\n\n## Development\n\n### Running a dev container locally\nIf you want to do some development on the ui you can use a local docker dev \nimage 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 \n\n```docker-compose -f docker-compose.dev.yml build```\n\n:warning: **Using this on a Mac with Apple silicon requires [Rosetta](https://docs.docker.com/desktop/mac/apple-silicon/), additionally you need to enable ```platform: linux/amd64``` in the docker-compose.yml file.**\n\n\nAfterwards you can fire up the development environment\nby \n\n```docker-compose -f docker-compse.dev.yml up```\n\nNow you can proceed whit \"Build the Angular Frontend\"\n\n### Build the Angular Frontend\n[nodejs](https://nodejs.org/en/download/) is required before you can proceed.\nAfter you've installed nodejs you can build the ui by using: \n\n```\ncd src/ui\nnpm install -g @angular/cli -g\nnpm install\nng build\n```\n\nYou can run ```ng build``` with the additional argument ```--watch``` for live\nre-compiling while you are working on your code. \n\nThe build folder is located at ```/src/hydraplay/server/static/player```\n\n\n\n### Building the production image. \nYou can build a production image instead downloading by using:\n\ndocker build -f docker/Dockerfile -t mariolukas/hydraplay --build-arg SNAPCASTVERSION=0.26.0 .\n\n:warning: **Using this on a Mac with Apple silicon requires [Rosetta](https://docs.docker.com/desktop/mac/apple-silicon/), additionally you need to enable ```platform: linux/amd64``` in the docker-compose.yml file.**\n\n## Details \nYou can find a [blog  post.](https://www.mariolukas.de/2019/07/hydraplay-open-source-multiroom-audio/) 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.\n( the blog post describes the very first prototype! )\n\n### Known Issues\n* mdns/avahi does not work within docker. You need to start your clients with  the -h \u003cip_address_of_server\u003e parameter.\n* ~~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)\n\n### Not Implemented yet\n\n- [ ] add debian package config and make file\n- [ ] add build script for raspberry pi image\n- [ ] add more documentation ( for Raspberry Pi, MacOS with m1, run without docker, configuration etc. )\n- [x] provide ready to use pre-build docker images \n\n### Credits\nThis project would not have been possible without all the work on [Snapcast](https://github.com/badaix/snapcast) and [Mopidy](https://mopidy.com/)! Special thanks to Ryan Detzel for the inspiration.\n\n### Community and Support \n\n[Join](https://discord.gg/xs9CKfbpuY) us at Discord (https://discord.gg/xs9CKfbpuY).\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariolukas%2Fhydraplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariolukas%2Fhydraplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariolukas%2Fhydraplay/lists"}