https://github.com/gilsdav/snapclient-switcher
Be able to switch host (snapserver) of snapclient by a simple rest call.
https://github.com/gilsdav/snapclient-switcher
host snapcast snapclient snapserver switch
Last synced: 7 months ago
JSON representation
Be able to switch host (snapserver) of snapclient by a simple rest call.
- Host: GitHub
- URL: https://github.com/gilsdav/snapclient-switcher
- Owner: gilsdav
- Created: 2017-10-11T22:12:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T22:14:03.000Z (almost 8 years ago)
- Last Synced: 2025-01-24T15:27:50.311Z (8 months ago)
- Topics: host, snapcast, snapclient, snapserver, switch
- Language: Python
- Size: 15.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Related to: https://github.com/badaix/snapcast
# snapclient-switcher
Be able to switch host (snapserver) of snapclient by a simple rest call.
* Default port: `8090`
* Default snapserver: `127.0.0.1:1704`## Installation
* Download last .deb file: https://github.com/gilsdav/snapclient-switcher/releases
* Install: `sudo dpkg -i snapclient-switcher-x.x.deb`## Uninstallation
* Uninstall: `sudo dpkg -P snapclient-switcher`## How to use
`http://snapclientIp:8090/[?url=xxx.xxx.xxx.xxx][&port=xxxx]`
* Reset to default: `http://snapclientIp:8090`
* Change host: `http://snapclientIp:8090?url=newHostIp`
* Change port: `http://snapclientIp:8090?port=newPort`
* Change host and port: `http://snapclientIp:8090?url=newHostIp&port=newPort`
* Get current connection: `http://snapclientIp:8090/status`## Manual install
### Config existing snapclient
* Open `/etc/default/snapclient`
* And edit the line `START_SNAPCLIENT=false`
* Log as root `sudo -s`
* Unregister service `systemctl disable snapclient`### Start snapclient-switcher
* Execute `python snapclient-switcher.py [port]`### Start snapclient-switcher as service ##
* Copy `snapclient-switcher/usr/local/bin/snapclient-switcher.py` into `/usr/local/bin/` folder
* Start daemon `sudo ./snapclient-switcher/etc/init.d/snapclient-switcher start`
#### Start on boot
* Copy `snapclient-switcher/etc/init.d/snapclient-switcher` into `/etc/init.d` folder
* Log as root `sudo -s`
* Register service `systemctl enable snapclient-switcher`
* Start service `service snapclient-switcher start`