2018-11-06 00:00:53 +00:00
< img src = "https://image.ibb.co/iBY6hq/yamaha.png" width = "600" >
2018-07-23 12:23:57 +00:00
# YCast
2019-08-21 10:33:03 +00:00
[![PyPI latest version ](https://img.shields.io/pypi/v/ycast?color=success )](https://pypi.org/project/ycast/) [![GitHub latest version ](https://img.shields.io/github/v/release/milaq/YCast?color=success&label=github&sort=semver )](https://github.com/milaq/YCast/releases) [![Python version ](https://img.shields.io/pypi/pyversions/ycast )](https://www.python.org/downloads/) [![License ](https://img.shields.io/pypi/l/ycast )](https://www.gnu.org/licenses/gpl-3.0.en.html) [![GitHub issues ](https://img.shields.io/github/issues/milaq/ycast )](https://github.com/milaq/YCast/issues)
[Get it via PyPI ](https://pypi.org/project/ycast/ )
[Download from GitHub ](https://github.com/milaq/YCast/releases )
[Issue tracker ](https://github.com/milaq/YCast/issues )
2019-01-22 11:39:05 +00:00
YCast is a self hosted replacement for the vTuner internet radio service which many AVRs use.
2019-07-09 16:44:56 +00:00
It emulates a vTuner backend to provide your AVR with the necessary information to play self defined categorized internet radio stations and listen to Radio stations listed in the [Community Radio Browser index ](http://www.radio-browser.info ).
2018-07-23 12:23:57 +00:00
YCast is for you if:
* You do not want to use a proprietary streaming service
2018-07-23 15:59:17 +00:00
* You are sick of loading delays and/or downtimes of the vTuner service
2019-08-19 16:41:46 +00:00
* You do not want to pay for a feature which was free before
2019-01-22 11:39:05 +00:00
* You are unsure about the continuation of the vTuner service
## Supported devices
Theoretically, YCast should work for **most AVRs which support vTuner** .
2019-08-19 16:41:46 +00:00
Most AVRs with network connectivity that were produced between 2011 and 2017 have vTuner support built-in.
2019-01-22 11:39:05 +00:00
2019-08-19 16:41:46 +00:00
Go ahead, test it with yours and kindly report the results back.
Any reported device helps the community to see which AVRs work properly and which may have issues.
2019-01-22 11:39:05 +00:00
### Confirmed working
* Yamaha RX-Vx73 series (RX-V373, RX-V473, RX-V573, RX-V673, RX-V773)
2019-08-19 12:34:37 +00:00
* Yamaha RX-Vx75 series (RX-V375, RX-V475, RX-V575, RX-V675, RX-V775)
2019-01-22 11:39:05 +00:00
* Yamaha R-N500
2019-08-12 12:05:05 +00:00
* Yamaha RX-A820
* Yamaha RX-A830
2019-01-24 21:14:00 +00:00
* Onkyo TX-NR414
2019-06-23 20:29:23 +00:00
* Marantz Melody Media M-CR610
2019-01-22 11:39:05 +00:00
### Unconfirmed/Experimental
* Yamaha RX-Vx77 series (RX-V377, RX-V477, RX-V577, RX-V677, RX-V777)
* Yamaha RX-Vx79 series (RX-V379, RX-V479, RX-V579, RX-V679, RX-V779)
* Yamaha RX-Vx81 series (RX-V381, RX-V481, RX-V581, RX-V681, RX-V781)
2019-01-22 12:50:32 +00:00
* Yamaha RX-S600D
* Yamaha RX-S601D
* Yamaha WX-030
* Yamaha RX-A1060
* Yamaha RX-V2700
* Yamaha RX-V3800
* Yamaha CX-A5000
2019-08-19 16:41:46 +00:00
* Denon AVR-Xx000 series (AVR-X1000, AVR-2000, AVR-X3000, AVR-X4000)
* Denon AVR-Xx100W series (AVR-X1100W, AVR-2100W, AVR-X3100W, AVR-X4100W)
* Denon AVR-Xx300W series (AVR-X1300W, AVR-2300W, AVR-X3300W)
2018-07-23 12:23:57 +00:00
## Dependencies:
Python version: `3`
Python packages:
2019-07-17 13:15:31 +00:00
* `requests`
2019-07-09 16:44:56 +00:00
* `flask`
2018-07-23 12:23:57 +00:00
* `PyYAML`
## Usage
2019-08-19 16:41:46 +00:00
YCast really does not need much computing power nor bandwidth, i.e. you can run it on a low-spec RISC machine like a Raspberry Pi.
2018-07-23 12:23:57 +00:00
2019-08-17 12:51:36 +00:00
### DNS entries
2019-08-19 16:41:46 +00:00
You need to create a manual entry in your DNS server (read 'Router' for most home users). `vtuner.com` (more specifically `*.vtuner.com` ) should point to the machine YCast is running on. Alternatively, in case you only want to forward specific vendors, the following entries may be configured:
2018-07-23 12:23:57 +00:00
2019-01-24 21:23:27 +00:00
* Yamaha AVRs: `radioyamaha.vtuner.com` (and optionally `radioyamaha2.vtuner.com` )
* Onkyo AVRs: `onkyo.vtuner.com` (and optionally `onkyo2.vtuner.com` )
2019-06-23 20:29:23 +00:00
* Denon/Marantz AVRs: `denon.vtuner.com` (and optionally `denon2.vtuner.com` )
2018-07-23 12:23:57 +00:00
2019-08-17 12:51:36 +00:00
### Running the server
2018-07-23 12:23:57 +00:00
2019-08-17 12:51:36 +00:00
#### With built-in webserver
2019-07-09 16:44:56 +00:00
2019-08-19 16:41:46 +00:00
You can run YCast by using the built-in development server of Flask (not recommended for production use, but should™ be enough for your private home use): `python -m ycast`
2019-07-09 16:44:56 +00:00
2018-07-23 15:59:17 +00:00
While you can simply run YCast with root permissions listening on all interfaces on port 80, this may not be desired for various reasons.
2018-07-23 12:23:57 +00:00
2019-08-19 16:41:46 +00:00
You can change the listen address and port (via `-l` and `-p` respectively) if you are already running a HTTP server on the target machine and/or want to proxy or restrict YCast access.
2018-07-23 12:23:57 +00:00
It is advised to use a proper webserver (e.g. Nginx) in front of YCast if you can.
Then, you also don't need to run YCast as root and can proxy the requests to YCast running on a higher port (>1024) listening only on `localhost` .
2019-01-24 21:14:00 +00:00
You can redirect all traffic destined for the original request URL (e.g. `radioyamaha.vtuner.com` , `onkyo.vtuner.com` ) or need to redirect the following URLs from your webserver to YCast:
2018-07-23 12:23:57 +00:00
* `/setupapp`
* `/ycast`
2019-08-17 12:51:36 +00:00
__Attention__: Do not rewrite the requests transparently. YCast expects the complete URL (i.e. including `/ycast` or `/setupapp` ). It also need an intact `Host` header; so if you're proxying YCast you need to pass the original header on. For Nginx, this can be accomplished with `proxy_set_header Host $host;` .
2018-07-23 15:59:17 +00:00
2018-11-06 00:00:53 +00:00
In case you are using (or plan on using) Nginx to proxy requests, have a look at [this example ](examples/nginx-ycast.conf.example ).
This can be used together with [this systemd service example ](examples/ycast.service.example ) for a fully functional deployment.
2019-08-17 12:51:36 +00:00
#### With WSGI
You can also setup a proper WSGI server. See the [official Flask documentation ](https://flask.palletsprojects.com/en/1.1.x/deploying/ ).
### Custom stations
2019-08-19 16:41:46 +00:00
If you want to use the 'My Stations' feature, create a `stations.yml` and run YCast with the `-c` switch to specify the path to it. The config follows a basic YAML structure (see below).
2019-08-17 12:51:36 +00:00
```
Category one name:
First awesome station name: first.awesome/station/URL
Second awesome station name: second.awesome/station/URL
Category two name:
Third awesome station name: third.awesome/station/URL
Fourth awesome station name: fourth.awesome/station/URL
```
You can also have a look at the provided [example ](examples/stations.yml.example ) to better understand the configuration.
2018-07-23 15:59:17 +00:00
## Firewall rules
2019-08-19 16:41:46 +00:00
* Your AVR needs access to the internet.
2019-01-24 21:14:00 +00:00
* Your AVR needs to reach port `80` of the machine running YCast.
2019-08-17 12:51:36 +00:00
* If you want to use Radiobrowser stations, the machine running YCast needs internet access.
2018-07-23 12:23:57 +00:00
## Caveats
2019-08-17 12:51:36 +00:00
* vTuner compatible AVRs don't do HTTPS. As such, YCast blindly rewrites every HTTPS station URL to HTTP. Most station
2019-08-19 16:41:46 +00:00
providers which utilize HTTPS for their stations also provide an HTTP stream. Thus, most HTTPS stations should work.
2019-08-17 12:51:36 +00:00
* Some station logos are not compatible with the vTuner frontend.
* The built-in bookmark function does not work at the moment. You need to manually add your favourite stations for now.