Giter VIP home page Giter VIP logo

ytuner's Introduction

AVR

"Everything should be made as simple as possible, but not simpler" - Albert Einstein.

YTuner

YTuner is a simple project inspired by YCast but rewritten from scratch and greatly improved. Designed to replace vTuner internet radio service and dedicated to all users of AVRs made by Yamaha, Denon, Onkyo, Marantz, Grundig and others with built-in vTuner support. If you own one (or even more) of the vTuner-enabled AVRs mentioned above and want to enjoy free internet radio stations on your device as before, and be sure that your device's streaming service won't suddenly end, you should consider using YTuner.

Why

YCast is a great project, but my goal was to run a similar service on a very low-spec platform where python along with packages turned out to be too heavy and too slow. Now, with YTuner you can enjoy improved functionality at full speed of ultra lightweight native app on operating systems such as:

  • Windows, Linux, macOS, BSD, Solaris, Raspberry Pi OS

and with selected CPU architecture:

  • Intel i386, AMD64/x86_64, ARM/ARM64, PowerPC/PowerPC64, SPARC/SPARC64

or any others powered by cross-build abilities of Free Pascal Compiler.

Features

YTuner supports :

  • Custom stations list files (aka MyStations) : YAML files (YCast compatible) or INI files.
  • Great Radio-browser.info functionality.
  • AVR bookmarks. Single bookmark for many AVRs or dedicated bookmark for each AVR (if you own more then one) with support of "add" and "del" operations sent from AVR devices.
  • Easy application configuration with ini files.
  • Optional SSL support for YTuner HTTPS web request.
  • Radio stations logo images conversion/resize on the fly with couple of supported image formats (JPG,PNG,GIF,TIFF-optional)
  • Radio stations logo images optional cache.
  • Radio-browser extensive caching with many options and auto refresh
    • UUIDs, data structures and stations cache (based on files or RAM storage).
    • Local DB based full cache of Radio-browser resources.
  • Radio browser advanced filtering and sorting (single config for many AVRs or dedicated configs for each AVR (if you own more then one))

YTuner also has build in :

  • Web service to support AVR requests.
  • Optional DNS proxy service to intercept vtuner.com related DNS queries and others if needed.
  • Maintenance service.

Supported devices

Theoretically, YTuner should work with most AVRs that support vTuner.
Now, the list of supported and tested devices below is short, but I hope it will expand with your help.

Please test YTuner with your AVR and give me your feedback.

Confirmed working

  • Yamaha
    • Yamaha RX-V671
    • Yamaha RX-V673
    • Yamaha RX-V675 (Tested by seldam. Thank you.)
    • Yamaha RX-V677 (Tested by Jordan / jordandalley. Thank you.)
    • Yamaha RX-V777 (Confirmed by Jordan / jordandalley. Thank you.)
    • Yamaha RX-V3900 (Tested by BeryBurnout. Thank you.)
    • Yamaha DSP-Z7 (Tested by Beatrice / TheBossME. Thank you.)
  • Marantz
    • Marantz NR1607 (Tested by brietman. Thank you.)
  • Denon
    • Denon AVR-X3200W (Tested by Larsvb0. Thank you.)
    • Denon AVR-X3300W (Tested by citronalco. Thank you.)

Installation

YTuner is a standalone application and in most cases it does not require additional services, frameworks, packages, virtual machines, libraries or tools to run properly (except optional OpenSSL and/or SQLite3 libraries). You can download from Releases a file specific to your operating system and CPU architecture or build YTuner from source (look at Build section).

After download (or build) save and extract files into prepared directory with granted read/write/execute privileges. Remember that the credentials who will run YTuner must also have permission to open TCP port 80 and optionally UDP 53 (note below).

Now, you should have directory with some of the following subdirectories and files :

-- ytuner
 |-- config (subdir for config files) 
   |-- stations.ini  (if you want to use a ini file with your favorite radio stations) 
   |-- stations.yaml (if you want to use a yaml/yml file with your favorite radio stations)
   |-- avr.ini (common configuration file for all your AVRs)
   |-- bookmark.xml (common bookmark file for all your AVRs - only if one of your AVR support bookmark)
   |-- ...... (AVRs dedicated bookmark and config files)
 |-- cache (subdir for cache files)
   |-- rbuuids.txt (Radio browser UUIDs cache file)
   |-- ...... (other cache files)
 |-- db (subdir for databse cache file)
   |-- rb.db (Radio browser database cache file)
 |-- ytuner (or ytuner.exe for Windows)
 |-- ytuner.ini (YTuner important config file)

Do not forget to add execute privileges to ytuner on linux/*nix systems with a command like chmod +x ytuner.

OpenSSL (optional)

If you want to use SSL to support YTuner HTTPS web request you have to get OpenSSL libraries.

  • Most linux/*nix systems install OpenSSL by default. Otherwise, use your favorite package manager to get OpenSSL libraries or download them from Github or visit OpenSSL Wiki for binary distributions source.
  • Windows users can download them from Github (follow NOTES-WINDOWS.md instructions) or visit OpenSSL Wiki for binary distributions source. Make sure to get/build the correct version of the OpenSSL libraries with the correct bit length for your OS. 32-bit libraries are needed if you chose to use the 32-bit version of YTuner or 64-bit for the AMD64/x86_64 version of YTuner. Finally, you should have 2 files:
    • OpenSSL 1.0.2 and earlier:
      • ssleay32.dll (or libssl32.dll) and libeay32.dll
    • OpenSSL 1.1.x:
      • 64-bit: libssl-1_1-x64.dll and libcrypto-1_1-x64.dll
      • 32-bit: libssl-1_1.dll and libcrypto-1_1.dll
    • OpenSSL 3.x.x:
      • 64-bit: libssl-3-x64.dll and libcrypto-3-x64.dll
      • 32-bit: libssl-3.dll and libcrypto-3.dll

and place them in your ytuner directory or anywhere in your system PATH. Make sure your system has valid CA certificates.

Tip: The YTuner should work with LibreSSL libraries as well.

SQLite3 (optional)

If you want to forget about potential connection problems with Radio-browser.info while using YTuner and listening to your favorite stations, use one of the options [catDB, catMemDB, catPermMemDB] of the RBCacheType parameter in the ytuner.ini file to download the full contents of the Radio-browser.info resources once and store it in your local SQLite3 database. Of course, only data that is useful for YTuner and AVR devices is downloaded and stored locally. Due to the use of the very popular SQLite database, YTuner will need to use the library provided by the SQLite development team.

! Important ! : Minimal version of SQLite library is 3.33.0 (2020-08-14)

Tip: If you faced problems with the SQLite library, read this description.

Configuration

Your YTuner machine and AVR(s) have to have internet access. Make sure your firewall is properly configured if necessary.

AVR

Set all DNS servers on your AVR config to your YTuner machine IP address.

Router

Make sure that your YTuner machine is assigned a static IPv4 address.

YTuner Web Service

Regardless of what operating system you use, you need to make sure that TCP port 80 is not being used by another application. YTuner has a built-in multi-threaded web server that listens on TCP port 80 so you don't have to worry about its configuration and performance.

Tip: In some special cases, it may be necessary to change the default TCP port 80 to another. You can do this by editing the YTuner ini file. See Application configuration section below.

YTuner DNS Service

YTuner has a built-in multi-threaded DNS proxy server that listens on UDP port 53. This feature is optional and you can simple disable it and/or configure by editing configuration .ini file ytuner.ini (See Application configuration section below). You can also use your favorite DNS server like dnsmasq.
Most important is to point *.vtuner.com domain to you YTuner machine and set all DNS servers on your AVR config to your YTuner machine IP address.

Tip: In some special cases, it may be necessary to change the default UDP port 53 to another. You can do this by editing the YTuner ini file. See Application configuration section below.

YTuner Maintenance Service

YTuner has a built-in maintenance service for diagnostic and future goals. At this moment you can use it to shut down YTuner service only.

Tip: In most cases, you will not need this functionality. See Application configuration section below.

Application configuration

YTuner is configured by simple ytuner.ini file.
This file has the following capabilities:

YTuner/cfg/ytuner.ini

Lines 1 to 159 in a5b8622

[Configuration]
; Please do not change this value !
INIVersion=1.2.0
;Force the use of the selected IP address of one of the existing interfaces.
;Leave this parameter with "default" value when you have one IP address only or you are not sure what to do.
;The application will find the IP address itself.
IPAddress=default
;Use SSL. 1-Yes 0-No ; Default = 1
UseSSL=1
;Force HTTP code for redirect. It can be useful for PLAY endpoint. Default = 302
RedirectHTTPCode=302
;Log message level. 0-None, 1-Info, 2-Warning, 3-Error, 4-Debug ; Default = 0
MessageInfoLevel=3
;Station logo icon size (width & height). Default = 200
IconSize=200
;Cache icon files. 1-Yes 0-No ; Default = 1
IconCache=1
;Sixteen characters string with your token. Allowed characters: 0-9 and A-F/a-f; Default=0123456789ABCDEF
;Use with care. Changing this parameter also changes the name of the AVR bookmark file(s) (unless you are using a common bookmark.xml file) and not-common filtering/configuration options ini file(s).
MyToken=0123456789ABCDEF
;One common configuration ini file (avr.ini) for all AVR devices. Otherwise, each AVR will own its own filtering/configuration ini file. 1-Yes 0-No ; Default = 0
CommonAVRini=1
;Cache folder location. Empty or "default" = Same as YTuner app location.
;Cache folder named "cache" contains station icon files and Radio-browser UUIDs and stations '*.cache' files.
CacheFolderLocation=default
;Config folder location. Empty or "default" = Same as YTuner app location.
;Config folder named "config" contains bookmark files and AVRs config files.
ConfigFolderLocation=default
;DB folder location. Empty or "default" = Same as YTuner app location.
;DB folder named "db" contains db files.
DBFolderLocation=default
;SQLite3 library file (with full path). Empty or "default" = YTuner will try to find DB library file.
;Applicable when RBCacheType is one of: catDB, catMemDB, catPermMemDB.
;Windows users can get latest sqlite3.dll driver from https://www.sqlite.org/download.html . Please make sure to download the correct 64-bit or 32-bit version for your system.
;Linux / Unix (Solaris, BSD) / macOS users should have such a driver already installed by default. Please make sure you specify the path to the correct 64-bit or 32-bit library file..
;Typicaly:
;Linux64 : /usr/lib64/libsqlite3.so, /usr/lib64/libsqlite3.so.0, /usr/lib/x86_64-linux-gnu/libsqlite3.so, /usr/lib/x86_64-linux-gnu/libsqlite3.so.0, /usr/lib/aarch64-linux-gnu/libsqlite3.so, /usr/lib/aarch64-linux-gnu/libsqlite3.so.0
;Linux32 : /usr/lib/libsqlite3.so, /usr/lib/libsqlite3.so.0, /usr/lib/i386-linux-gnu/libsqlite3.so, /usr/lib/i386-linux-gnu/libsqlite3.so.0, /usr/lib/arm-linux-gnueabi/libsqlite3.so, /usr/lib/arm-linux-gnueabi/libsqlite3.so.0, , /usr/lib/arm-linux-gnueabihf/libsqlite3.so, /usr/lib/arm-linux-gnueabihf/libsqlite3.so.0
;Solaris64 : /usr/lib/64/libsqlite3.so, /usr/lib/64/libsqlite3.so.0
;Solaris32 : /usr/lib/libsqlite3.so, /usr/lib/libsqlite3.so.0
;macOS : /opt/local/lib/libsqlite3.dylib, /usr/lib/libsqlite3.dylib, /opt/local/lib/libsqlite3.0.dylib, /usr/lib/libsqlite3.0.dylib
;BSD : /usr/local/lib/libsqlite3.so, /usr/lib/libsqlite3.so, /usr/local/lib/libsqlite3.so.0, /usr/lib/libsqlite3.so.0
DBLibFile=default
[MyStations]
;Enables support for the stations list local file. 1-Yes 0-No ; Default = 1
Enable=1
;File name with your favorite stations (.ini or .yaml/.yml file without the path). Default = stations.ini
MyStationsFile=stations.ini
;MyStations auto refresh period (minutes). Only applicable when MyStationsAutoRefreshPeriod => 0. 0 or empty - No refresh ; Default = 0
MyStationsAutoRefreshPeriod=0
[Radiobrowser]
;Enables support for radio-browser.info . 1-Yes 0-No ; Default = 1
Enable=1
;Radio-browser.info API URL. Default = http://all.api.radio-browser.info ;
;Warning! Using an IP address instead of a domain name results in faster performance, however, such a domain IP address may change
;and result in loss of connection to radio-browser.info. It is always worth checking the current list of servers at: http://all.api.radio-browser.info/json/servers
RBAPIURL=http://all.api.radio-browser.info
;Radio-browser.info most popular stations limit. Default = 100
;Warning! Due to the filtering functionality (since YTuner version 1.1.0) performed by the client side, this value means the number of stations got from radiobrowser-info and later optionally filtered out by YTuner.
;For this reason, the station list displayed by AVR may be significantly different from this value or even be empty.
;Determine this value for yourself based on your filtering scope.
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBPopularAndSearchStationsLimit=1000
;Radio-browser.info minimum number of stations per category. Default = 3
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBMinStationsPerCategory=3
;Radio-browser.info UUIDs file cache TTL (hours) ; Empty or value <= 0 always means a valid UUID file cache (if exists) and never refreshes its content. ; Default = 24
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBUUIDsCacheTTL=0
;Radio-browser.info UUIDs file cache auto refresh. Applicable when RBUUIDsCacheTTL>0 only. 1-Yes 0-No ; Default = 0
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBUUIDsCacheAutoRefresh=0
;Use one value of set [catNone,catFile,catMemStr,catDB,catMemDB,catPermMemDB] or leave blank.
;catNone or blank = Do not use cache. Slow!
;catFile = Store previously browsed categories and stations in cache files. Most suitable if the amount of free memory is very small.
;catMemStr = Store previously browsed categories and stations in memory cache. Fastest, but may need more bytes of free memory.
;catDB = Store ALL useful information about categories and stations of Radio-browser.info in SQLite DB file.
; The initial DB file creation process may take a few minutes, but will remain persistent after you restart YTuner.
; After this operation, you will no longer need access to redio-browser.info until you decide to refresh the downloaded data (when RBCacheTTL>0).
; Keep RBCacheTTL = 0 to prevent the DB file from being rebuilt after the RBCacheTTL time expires.
;catMemDB = Same as catDB, but the entire database is placed in memory. This solution is NOT permanent and once YTuner is down all data will be lost.
;catPermMemDB = Combination of catMemDB+catDB; The entire database is placed in memory, but it is also saved to a file and remains persistent. The best option if you have valid sqlite3 driver.
;Windows users can get sqlite3.dll driver from https://www.sqlite.org/download.html . Linux / Unix (Solaris, BSD) / macOS users should have such a driver already installed in their OS.
;Pay attention to "DBLibFolderLocation" parameter in "Configuration" section of this ini file.
;catMemDB and catPermMemDB require additional ~30MB of free RAM to load entire database. Refreshing the database involves starting a concurrent thread that downloads the current content of the radio-browser.info resources and creates a second database while the current one is still running.
;After the process is completed, the newly created database becomes the current database and the old one is deleted. Due to this, an additional ~30MB of free memory is needed for the duration of this process.
;Additionally, data in JSON format downloaded from Radio-browser.info takes over 50MB.
;Test the best option for you. Default = catPermMemDB;
RBCacheType=catPermMemDB
;Radio-browser.info stations cache TTL (hours). Empty or value <= 0 always means a valid cache (if exists) and never refreshes its contents. ; Default = 24
RBCacheTTL=0
[Bookmark]
;Enables bookmarks. Your AVR must support bookmark to save stations to bookmark. 1-Yes 0-No ; Default = 1
Enable=1
;One common bookmark file (bookmark.xml) for all AVR devices. Otherwise, each AVR will own its own bookmark file. 1-Yes 0-No ; Default = 0
CommonBookmark=0
;Bookmark stations limit. ; Default = 100
BookmarkStationsLimit=100
[WebServer]
;Web server IP address. Don't change it if it's not necessary. ; "default" mean the same value as entered in IPAddress in Configuration section above.
WebServerIPAddress=default
;Web server TCP port. Don't change it if it's not necessary. ; Default = 80
WebServerPort=80
[DNSServer]
;Enable build-in DNS proxy serwer. 1-Yes 0-No ; Default = 1
Enable=1
;DNS server IP address. Don't change it if it's not necessary. ; "default" mean the same value as entered in IPAddress in Configuration section above.
DNSServerIPAddress=default
;DNS server UDP port. Don't change it if it's not necessary. ; Default = 53
DNSServerPort=53
;DNs to intercept. Values must by comma separated. The wildcard character (*) is only accepted at the beginning of a domain name. Default = *vtuner.com
InterceptDNs=*.vtuner.com,*.radiosetup.com,*.my-noxon.net,*.radiomarantz.com
;DNS servers IP Addresses. Values must by comma separated. Default = 8.8.8.8,9.9.9.9
DNSServers=8.8.8.8,9.9.9.9
[MaintenanceServer]
;Enables support for the maintenace service. 1-Yes 0-No ; Default = 0
;With this release of YTuner only one is available: http://[MaintenaceServerIPAddress]:[MaintenaceServerPort]/ytuner/down - Shut down YTuner service.
;Be carefull: It is unwise to run this service on an IP address other than local loopback interface;
Enable=0
;Maintenace server IP address. Don't change it if it's not necessary. ; "default" mean "127.0.0.1" loopback interface.
MaintenanceServerIPAddress=127.0.0.1
;Maintenace server TCP Port. Don't change it if it's not necessary. ; Default = 8080
MaintenanceServerPort=8080

YTuner's filtering and sorting functionality can be oriented by AVR device. You can decide about it with CommonAVRini setting of ytuner.ini. Common AVR config file avr.ini or other AVRs dedicated config files have the following capabilities:

[Configuration]
; Please do not change this value!
INIVersion=1.0.0
; Use one value of set [https,http,all-as-http] or leave blank.
; https= select only stations which have https url.
; http = select only stations that do stream unencrypted with http.
; all-as-http = select all stations (http+https) and strip "s" from "https" URLs and use "http" instead.
; Leave blank to avoid filtering with this setting. Default: all-as-http.
Protocol=all-as-http
[RadioBrowser Filtering]
; This setting works like a whitelist.
; Use values of "name" field of http://all.api.radio-browser.info/json/tags separated by ";".
; Use additional "{empty}" value to allow stations with empty "tags" field to be visible in other filtered station lists too.
; Use wildcard character "*" to advanced "tags" filtering ("*" means any number of any characters).
; Leave blank to avoid filtering with this setting. Default: blank.
AllowedTags=*dance*;*medieval
; This setting works like a blacklist and complements the "AllowedTags" whitelist effect.
; Use values of "name" field of http://all.api.radio-browser.info/json/tags separated by ";".
; Use additional "{empty}" value to allow stations with empty "tags" field to be visible in other filtered station lists too.
; Use wildcard character "*" to advanced "tags" filtering ("*" means any number of any characters).
; Leave blank to avoid filtering with this setting. Default: blank.
NotAllowedTags=*hall
; This setting works like a whitelist.
; Use values of "name" field of http://all.api.radio-browser.info/json/countries separated by ";".
; Use additional "{empty}" value to allow stations with empty "country" field to be visible in other filtered station lists too.
; Use wildcard character "*" to advanced "country" filtering ("*" means any number of any characters).
; Leave blank to avoid filtering with this setting. Default: blank.
AllowedCountries=Poland;Germany;*Britain*;Spain
; This setting works like a whitelist.
; Use values of "name" field of http://all.api.radio-browser.info/json/languages separated by ";".
; Use additional "{empty}" value to allow stations with empty "language" field to be visible in other filtered station lists too.
; Use wildcard character "*" to advanced "language" filtering ("*" means any number of any characters).
; Leave blank to avoid filtering with this setting. Default: blank.
AllowedLanguages=polish;*english*;german;*spanish,spain;*español*;españa;{empty}
; This setting works like a whitelist.
; Use values of "name" field of http://all.api.radio-browser.info/json/codecs separated by ";".
; Use additional "{empty}" value to allow stations with empty "codec" field to be visible in other filtered station lists too.
; Use wildcard character "*" to advanced "codec" filtering ("*" means any number of any characters).
; Leave blank to avoid filtering with this setting. Default: blank.
AllowedCodecs=
; This setting works like a blacklist.
; Use values of "name" field of http://all.api.radio-browser.info/json/codecs separated by ";".
; Use additional "{empty}" value to allow stations with empty "codec" field to be visible in other filtered station lists too.
; Use wildcard character "*" to advanced "codec" filtering ("*" means any number of any characters).
; Leave blank to avoid filtering with this setting. Default: blank.
NotAllowedCodecs=AAC*
; This setting works like a whitelist.
; Use values of kbytes/sec. Leave blank to avoid filtering with this setting. Default: blank.
BitrateMax=
; This setting works like a blacklist.
; Filter out stations with names contains specific strings. Use ";" to separate entered values;
; Useful when the station does not have a "Codec" field specified, but the station name contains information like "AAC" or others indicates a codec.
; Leave blank to avoid filtering with this setting. Default: blank.
NotAllowedInName=aac
; This setting works like a blacklist.
; Filter out stations whose URL ends like extensions of specific files. Use ";" to separate entered values;
; Useful when the station does not have a "Codec" field specified, but the URL ending in the form of e.g. ".aac" or others indicates a codec.
; Leave blank to avoid filtering with this setting. Default: blank.
NotAllowedInURL=.aac
[RadioBrowser Sorting]
; Use one of possible values of "order" field of http://all.api.radio-browser.info/#Advanced_station_search . Case sensitive! Default: name;
; Applicable for station lists only.
Order=name
; Reverse; 0 = ascending; 1 = descending. Default: 0;
; Applicable for station lists only.
Reverse=0

Please read the descriptions in both .ini files carefully.

Custom stations

You can enable support for the stations list local file. Two types of files are supported:

  • .ini file :
[Category one name]
  Station one name=http://url-of-station-one|http://url-of-station-one-logo
  Station two name=http://url-of-station-two|http://url-of-station-two-logo

[Category two name]
  Station three name=http://url-of-station-three|http://url-of-station-three-logo
  Station four name=http://url-of-station-four|http://url-of-station-four-logo
  • .yaml / .yml file :
Category one name:
  Station one name: http://url-of-station-one|http://url-of-station-one-logo
  Station two name: http://url-of-station-two|http://url-of-station-two-logo

Category two name:
  Station three name: http://url-of-station-three|http://url-of-station-three-logo
  Station four name: http://url-of-station-four|http://url-of-station-four-logo

YTuner can convert and resize on the fly logo image from JPEG, PNG, GIFF and TIFF (optionaly) to JPEG (default) or PNG format.

Tip: URLs with logo station images are optional.

Bookmark

What is the Bookmark ? Bookmark is what is mentioned in the AVR user's manual. Bookmark is operated only from the AVR device using the remote control. When you listen to a new station you can decide to put it into the Bookmark or want to remove it from it. All stations added in this way are visible in the Bookmark submenu of the AVR receiver.

If you AVR support Bookmark you can enable and use this YTuner functionality. You can configure YTuner to use one common bookmark file (bookmark.xml) for all your AVR devices (if you have more then one) or each AVR will own its own bookmark file. See Application configuration section above.

Running the application

Windows

Simply execute ytuner.exe.

Linux / Unix (Solaris, BSD) / macOS

If you credentials meet all requirements mentioned above just go to your ytuner directory and start application or simple use sudo to execute application:

$ sudo ./ytuner

Docker container

If you are not familiar with building Docker containers you can read this.

Build

You can use CodeTyphon Studio or Lazarus Free Pascal RAD IDE to build YTuner.
Use the latest versions of these IDE. Relevant project files are included.

Dependencies

YTuner uses Indy - Internet Direct library to build its own binary files. Of course, YTuner binaries no longer need any additional libraries beyond the optional OpenSSL and/or SQLite3.

Important: Use the latest version of Indy library to build YTuner.

Summary

If you found this project useful, please star it. ⭐

License

YTuner is licensed under MIT license. See the license.txt file for more details.

ytuner's People

Contributors

coffeegreg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

seldam tora-51

ytuner's Issues

ytuner dnsmasq request per seconds

WARNING in dnsmasq core: Maximum number of concurrent DNS queries reached (max: 150)

The only dns server in ytuner.ini is pihole resolver service.

Works on Marantz NR1607

Works flawlessly on Marantz NR1607. 2 comments:

  1. When you change the DNS in the Marantz, it automatically revert the fixed IP, DNS and Gatway to 000.000.000.000 after applying. So be alert to change it again after applying the DNS to get an internetconnection.
  2. Search results are limited to 1 line.

Assign service to all running interfaces (failover needs)

Hi Greg, I actually prepared failover functionality as systemd service together with the keepalived vrrp functionality.

Requirements: up and running keepalived configuration. I changed the priority order to 206 on the master and 205 on the second (slave) computer.

-- keepalived config sample --

vrrp_sync_group VI_2_200 {
group {
VI_2_200_4
VI_2_200_6
}
}

vrrp_instance VI_2_200_4
{
interface eth0
virtual_router_id 2
use_vmac
garp_master_refresh 60
priority 206
advert_int 2
virtual_ipaddress
{
192.168.0.125/24
}
}

vrrp_instance VI_2_200_6
{
interface eth0
virtual_router_id 2
use_vmac
garp_master_refresh 60
priority 206
advert_int 2
virtual_ipaddress
{
fe80::125/64
}
}

-- keepalived config end --

Feel free to put the service and timer to your project.

  1. ytuner.service

-- snip --

Unit]
Description=ytuner radio service
Wants=network-online.target
BindsTo=keepalived.service
After=keepalived.service
StopWhenUnneeded=true

[Service]
User=root
Group=root
ExecStart=/opt/ytuner/ytuner
WorkingDirectory=/opt/ytuner
StandardOutput=file:/opt/ytuner/ytuner.log
StandardError=file:/opt/ytuner/ytuner_error.log
ExecStartPre=/bin/sleep 15
Restart=always
ExecStop=/bin/date

[Install]
WantedBy=multi-user.target

-- snap --

  1. ytuner.timer

-- snip --

[Unit]
Description=ytuner timer for keepalived
After=network-online.target
Wants=network-online.target

[Timer]
OnUnitActiveSec=1m
Unit=ytuner.service
OnBootSec=1min

[Install]
WantedBy=multi-user.target

-- snap --

This runs with success in 2 LXC containers on two different Proxmox nodes. One is amd64 and second is on raspberry Pi (pimox 8) arm64.

Using the ytuner.timer helps to restart ytuner service. (workaround)

Regards Beatrice

First station name not visible while entering categories

No name visible when entering submenus 1st station (name not there, only blank) but playable. This appear only on a small amount of countries like Finland, Bosnia, Italia, Poland, Slovakia.... etc.

British Indian Ocean Territory access do freeze my Yamaha DSP-Z7.

Improvement: sorting name, ascending, descending

image

YTuner Arm64 Architecture only Support missing ?

Hi Greg,

I've tested to run ytuner on an arm64 architecture. (not armhf).

Result: program does not start. Later on I will test it on armhf and will come back then.
(I added the executable flag on the app)

-bash: ./ytuner: cannot execute: required file not found
Tested on Debian bookworm.

I've tested failover with 2 machines. One on amd64 and one on arm64, which should run. (using keepalived for failover)

Both systems are on Proxmox hosts and running as LXC containers.

Regards
Beatrice

"IPAddress" option does not work

In ytuner.ini, I've set IPAddress=127.0.0.1, but ytuner binds to my machine's address 192.168.3.1:

$ ./ytuner
YTuner v1.0.0 Copyright (c) 2023 Greg P. (https://github.com/coffeegreg)
20-7-23 16:32:51 : Inf : Starting services...
20-7-23 16:32:51 : Inf : Getting Radio-browser.info UUIDs...
20-7-23 16:32:51 : Inf : Successfully loaded 10 my stations.
20-7-23 16:32:51 : Inf : Web server listening on: 192.168.1.1:9985.
20-7-23 16:32:56 : Inf : Successfully downloaded 39708 RB UUIDs.

Issues with version 1.2.0 on DSP-Z7

Hi Greg,

I'll take a short look into the Linux x64 version.

First: The 1.1.2 version works actually at his best.

With 1.2.0 version, new/old issues found, like the "spaces" issue.

  • avr.ini filter does not work as aspected.
    question: how to filter best the misconfigured genres from the database ?

  • ID tags filter removed ?.

  • country filter not working properly
    "Arab Emirates" is,empty now (where i put lots of stations.
    aigainst the "spaces issue", do,you remember ?

  • AVR specific bookmarks file wasn't read ?. Only the bookmarks.xml was read. equal if CommonAVR is set to 1 or 0.
    Maybe special with my AVR (don't know)

Download the whole database from the web api is a good step forward.

I switched back to 1.1.2 and bookmarks are also not there (don't know the reason actually.)

Please check the "BLANK" issue we,do,have again with "the Arab Emirates" on your AVR and let me know if you got content.

The "BLANK" issue do exist also on genre,countries, and so on.

If you're thinking about replacing stations.yaml file with other solutions, my idea here is to do it with SQLite database too. Using same structure than in rb.db file, or using a marking database pointing to the rb.db. Hope you do understand what I mean.

Thanks 🙏

missed Stations after adding to radiobrowser database

Hi Greg,

The caching technique produces missed stations while not updated.

Step1:

  • removed rbuuids from cache
  • restarted ytuner service
    Result: station not visible

Step2:

  • removed rbuuids and other cached files
  • restarted ytuner service
    Result: station visible now.

The rbuuids will be updated once a day (implemented)
the generated cache files are not updated (maybe dayly implementation needed, or other checks)

Regards
Beatrice

stations.yaml issue while scrolling

Hi Greg,

I have discovered a small problem in the stations.yaml. I have not yet verified it in detail.

However, it seems that my AVR cannot be scrolled to the end of a collection of radio stations if one of the stations in the list is not currently broadcasting.

There is no way to determine beforehand in the station list whether the link is broken. I had 2 such cases in my station list, after removing from the list it was possible to scroll to the end again.

I didn't see that as application issue. But was interested to see that.

Ytuner 1.1.0 problem with Spaces

Installed v1.1.0 for used with my Yamaha RX-v673.
Great project, but…

when there is a space in the name of A catagory like in ‘The Netherlands’ then the cat wil not show.

For own entries in stations.ini or stations.yaml and in the radio browser sub categories also.

harrie

ytuner 1.1.0 problems

Hi Greg,

The new version has very good improvements. But I'm sorry to say.. it doesn't worked as expected.

I described in the past, sometimes while scrolling down in station list, the AVR goes freezed.

image

In 1.0.2 i do have no issues while scrolling down. Any idea to figure out from what this comes from ?.

Question: i've added Austria to the list of countries mined to see.
But I do see only a small amount (10) of the stations. Maybe there be filtered out, but actually not checked, what could be the reason.

And how about Countries like The Arab Emirates.
The blank in the filter isn't allowed right ?. So to select the emirates, I should use *Emirates. in the avr.ini

Not tested all functions and filter options.

🙋‍♀️
Beatriceimage

Is is possible to run YTuner as linux service?

I have made a linux service on a raspberry pi. But it looks like this is not working. YTuner is running but not working correctly. When I run YTuner from the command line it does work correctly. Also tried running it from a cronjob @reboot, also not working.

Change port not working

Hi Greg, hope you are still working on this.

As you know I am running this in docker (but I have tried this with Windows version as well). I am trying to change the default port 80 to 8020 so I can run another container with a webserver on port 80.

In Ytuner.ini I changed this:
;Web server TCP port. Don't change it if it's not necessary. ; Default = 80
WebServerPort=8020

For the docker images I changed this in Dockerfile:

Make the TCP/UDP ports to outside the container.

EXPOSE 8020/tcp

I run with HOST network: docker run --name Ytuner --network host -v YTuner:/app/host-shared ytuner:1.2.2

When I try to approach http://10.0.0.12:8020/ I get:Dbg : Unknown route : GET /.
So it seems to be responding

I set up a Reverse Proxy so http://denon.vtuner.com is pointing to 10.0.0.12:8020
When I try to approach http://denon.vtuner.com I get:Dbg : Unknown route : GET /.
So it seems to be responding as well

However the Denon receiver is only playing the known favorites. (I can see responds coming from Ytuner as well)
My Stations show empty list.

Any ideas?

Same for the Windows version.
In Ytuner.ini I changed this:
WebServerPort=8020

I set up a Reverse Proxy so http://denon.vtuner.com is pointing to 10.0.0.12:8020

Same problem.

When quering the Station list I get tis:
13-5-2024 14:44:05 : Dbg : GET /setupapp/denon/asp/browsexm2/loginXML.asp?mac=0CEF23DA75BEE0D17F10B7F74274D2AF&fver=1.754333&dlang=eng&startitems=1&enditems=10.

404 on Windows 11

Tried to install both x32 and x64 package. Both give me 404 errors. It runs fine and listens on port 80 (changed to 8090 as well). Disabled firewall but http(s)://ip:port gives me a 404.

any thoughts?

it's running

it's running

YTuner v1.0.1 Copyright (c) 2023 Greg P. (https://github.com/coffeegreg)
8-11-23 17:17:14 : Inf : Starting services...
8-11-23 17:17:14 : Inf : Getting Radio-browser.info UUIDs...
8-11-23 17:17:14 : Inf : Successfully loaded 10 my stations.
8-11-23 17:17:14 : Err : DNS Server error: Could not bind socket..
8-11-23 17:17:14 : Inf : Web server listening on: 9.8.8.8:12500.
8-11-23 17:17:17 : Err : Radio-browser.info: Getting error stations.
8-11-23 17:17:17 : Inf : Successfully downloaded 1 RB UUIDs.
8-11-23 17:17:17 : Inf : Successfully saved 1 RB UUIDs to cache file.

now what should I do in Denon and Router ?

Originally posted by @graz68a in milaq/YCast#132 (comment)

Yamaha DSP-Z7 worked without using icons in stations.yaml

Hi Greg,

i‘ve found your ytuner rewritten (fork).
What I see it‘s totally rewritten application. thanks for your great work.

In past I was using ycast advanced with success on my DSP-Z7.
but with issues browsing Stations. (only using stations.yaml) which will be nicely selected via web-gui in that ycast advanced release.

With ytuner it’s Properly working while browsing the stations directly from the api.Radio-Browser.Info. That is fast and usable. The stations.yaml i‘ve ported to your ytuner will not work properly. Could be issue with my AVR. Looks like comes from the icons (jpg,ico,png) in the yaml file.

i‘ve modified the stations.yaml manually and do remove all after the pipe symbol. Then station is accessible from within stations.yaml.

Question: how to get more debug info (4 is set in .ini)

and also I did not understand the bookmarks functionality. Is this a planned feature to import from vtuner.com ?. Also the ID for the bookmark, howto generate or come from.

Best regards
Beatrice

Access errors on https streams

Firstly, love your work! This project rocks :)

I figure this is the limitation of the amp (Yamaha RX-V677) but https streams don't load. The amp appears to buffer then it returns a "Access Error" message.

I'm going to try some kind of reverse proxy for that and see how I go, but the particular stream i'm working with serves an m3u8 file containing a https address so it might be difficult.

This is the stream I'm referring to: http://digitalstreams.mediaworks.nz/chx_net_high/playlist.m3u8

Cheers!

Feature request: Please add support for older "Grundig Sonoclock 940A"

As noted in the YCast Project, the Grundig has some special issues when querying the vTuner API:

  • IDs truncated at 32 characters
  • empty XML tags not allowed
  • a reduced set of tags allowed when browsing
  • a full set of tags required when searching for ID
  • the "last station played" always searches for the ID instead of using the provided URL
  • xml entity encoding other than "&" not supported in station name and description, just normal UTF-8
  • uppercase characters in URLs and parameter names (lazy programming against *.asp pages)

To identify the device, the URLs called usually look this way:

/setupapp/grundig/asp/BrowseXML/Search.asp?sSearchtype=3&Search=xxxxxxxxxxxxxxx&mac=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy&dlang=eng&fver=1&ven=grn6

Note the /grundig in the URL as well as the parameters &fver=1&ven=grn6. Maybe the sSearchtype. This URL does a station lookup by ID (full set of result values needed, in the usual structure):

<?xml
version="1.0" encoding="UTF-8" standalone="yes" ?>
<ListOfItems>
    <ItemCount>1</ItemCount>
    <Item>
        <ItemType>Station</ItemType>
        <StationId>xxxxxxxxxxxxxxx</StationId>
        <StationName>ORF Ö1</StationName>
        <StationUrl>http://orf-live.ors-shoutcast.at/oe1-q2a</StationUrl>
        <StationDesc>Classic</StationDesc>
        <Logo>http://.../...</Logo>
        <StationFormat>Classic</StationFormat>
        <StationLocation>XX</StationLocation>
        <StationBandWidth>128</StationBandWidth>
        <StationMime>mp3</StationMime>
        <Relia>3</Relia>
        <Bookmark>http://orf-live.ors-shoutcast.at/oe1-q2a</Bookmark>
    </Item>
</ListOfItems>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.