coffeegreg / YTuner

YTuner is a simple project designed to replace vTuner internet radio service and dedicated to all users of AVRs made by Yamaha, Denon, Onkyo, Marantz and others with built-in vTuner support.
MIT License
25 stars 2 forks source link

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

Closed TheBossME closed 10 months ago

TheBossME commented 10 months ago

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

coffeegreg commented 10 months ago

Hi Beatrice,

I'm glad to know that you found the YTuner useful. As you rightly noticed, YTuner is not a fork of YCast but totally rewritten application with additional functionality. If your Yamaha DSP-Z7 works with your stations.yaml file but without icon information, potential problems may be related to the on-the-fly conversion of icon graphic formats or that your AVR has trouble recognizing and handling a given format. For example, my Yamaha RX-V671 supports the PNG format but the Yamaha RX-V673 does not. Both doesn't support ICO format too. I am very curious what the problem is because for me the station logo is displayed correctly and yaml files containing URLs to graphic files work properly. Maybe the problem is related to SSL/TLS and potential errors in downloading images/icons from https addresses. Anyway, please give me a sample of a few stations from your stations.yaml file that are causing problems with your Yamaha DSP-Z7 and I will check it out and try to fix it. Log dump would also help a lot.

MessageInfoLevel=4 is the maximum debug information level. What type of additional information are you interested in? I will see what I can do to meet your expectations.

The bookmarking feature (not supported in YCast as far as I know) relies on YTuner generating and handling additional XML file(s). YTuner uses one common bookmark file bookmark.xml for all AVR devices (if you have more than one) or each AVR will have its own bookmark file. The Yamaha DSP-Z7 must support this function from its own menu. Again, my Yamaha RX-V671 supports bookmarks (add and delete operations), but my other Yamaha RX-V673 does not due to lack of this functions in menu. The interesting thing is that when I configure YTuner to support a common bookmark (in the bookmark.xml file), I can add/delete/play bookmark stations using the RX-V671 and RX-V673 sees all these stations in the bookmark menu and can play them too. You don't have to worry about ID for the bookmark. It is generated automatically based on GUID (for stations from radiobrowser.info) or MD5 hash based on station's name and URL. ID has MS prefix for MyStations (yaml/ini files) or RB for radiobrowser.info stations. I've just checked the documentation for your Yamaha DSP-Z7 (it looks fabulous and I'm sure it sounds amazing too) and I see that it supports bookmark (page 62 on DSP-Z7 Owner's Manual) but ... it looks a little bit different than in my Yamaha models, so the operation may also be different. Don't worry, send me the logs when you oparate on bookmarks (TITLE click) and we will see how your Yamaha is trying to communicate with YTuner. Together we can ensure proper bookmark support for your AVR. This is the only way I can add unique support for devices I don't have.

Unfortunately, I cannot plan feature to import bookmark from vtuner.com because I lost access to it like all vtuner users when this service was no longer free as before. Even if I had such access, I suspect that there is no "export bookmark to file" functionality anywhere on the vtuner.com portal for logged users.

Thank you for the :star: and appreciation of my work. :notes: Enjoy the music. :notes: Greg

coffeegreg commented 10 months ago

Hi Beatrice,

Ad 1) Hmm.. interesting. I will try to prepare a solution for additional filtering. I need some time to think about the best way to do this.

Ad 2) Great. As I understand, creating/adding and removing stations from the bookmark using the TITLE button described works?

Ad 3) I'll check this behavior of spaces in the category name soon and I'll fix it if necessary. Of course I can add support for the .yml extension similarly to .yaml. Change the MyStationFile parameter in the ytuner.ini file if you want to change the file name, but keep the .ini or .yaml extension until I make changes related to .yml handling.

Ad 4) It's up to you. You decide about caching stations logos. Just set IconCache to 1 to enable cache and store icon files in CACHE subdirectory.

Ad 5) Yes you're right. The ID is limited to 15 characters. As I mentioned earlier, it is based on MD5 hash of station's name and URL (MyStations) or UUID (RadioBrowser).

Ad 6) YTuner doesn't need additional application or service to on-the-fly convert and rescale images. Default YTuner station's logo output format (format supported by your Yamaha) is JPG. Supported YTuner input graphics formats are: JPG, PNG, GIF and TIFF (disabled by default). YTuner does not need any additional application or service to convert and scale images on the fly. YTuner supported input graphics formats are: JPG, PNG, GIF and TIFF (disabled by default). The default YTuner station logo output format (a format that must be supported by your Yamaha) is JPG. I was thinking about increasing the list of supported formats, but I came to the conclusion that the only interesting format to expand this list is to include the webp format. YTuner, apart from conversion, scales the station's logo to the size of a square with a default size of 200 pixels. You can of course change this using the IconSize parameter in the ytuner.ini file. Of course, none of my receivers display the station logo on their display. The station's logo is only visible on TV.

Ad 7) The answer is very simple: performance. Why keep polling DNS servers for the same thing? Of course, there is a risk of changing the IP address for all.api.radio-browser.info and I wrote about it in the ytuner.ini file with the RBAPIURL parameter. You can go ahead and change this IP address to the default value of http://all.api.radio-browser.info and not worry about it anymore. Generally, the server with the given IP address responds the fastest for me and the domain name all.api.radio-browser.info does not always resolve to this IP address. You can check available servers here

Ad 10) I don't see any errors in the attached log. There are no requests to get the station logo or to add or remove from/to the bookmark (TITLE key action). Please include these logo lines when you use bookmark (TITLE click) or when you want to play a station that has a graphic logo. I still don't have confirmation whether your Yamaha supports station logo files produced by YTuner. Please try using the attached stations.ini or stations.yaml files as a test. There are stations that have specific URLs to logo files. Please test one of the attached files and let me know the result.

Regards Greg

TheBossME commented 10 months ago

Hi Greg,

  1. regarding Bookmarks Category on vtuner.com. What do you think about the bookmarks feature ?. Isn't it similar functionality like the stations.yaml ?.

I've take a short look into my bookmarks in vtuner

/setupapp/yamaha/asp/Favorites/BrowseFavorites.asp?sFavoriteGroupName=Deutschland

I found then under the Groupname the stations I have bookmarked.

FavoritegroupName can be created or modified in the bookmark.xml file ? Can't remember howto create, but I think, this will be directly in website, so,then a similar functionality is needed then maybe via a Web-GUI within your application.

  1. Do you think about WEB-GUI within your application?. This would help Endusers to modify the stations.yaml directly or and create Groupnames in the bookmark.xml.

  2. Yamaha goes the way to use airable.Radio api for there network receivers actually. When radio-browser.info died someday, we have similar situation like with vtuner, or other changes in api etc. so maybe it could be helpful, to have alternative then. Only an idea.

  3. You've said, that my AVR didn't use station images. That can be the truth. I looks like the,device ignore that. The embedded icons in .mp3 or FLAC files which I can stream from my Mediaserver (Syno) are pretty,shown on the TV. There is no need to display the stations icons on my TV, while switched off while streaming audio streams. So it's not an issue only a non existing feature actually. I didn't remember if possible from vtuner.

  4. for the improvement of filtering you can take a look into ycast-advanced fork from THHanika. There is also a WebGui in that fork you can checkout. This is only for,suggestions.

You can put the DSP-Z7 which is similar the RX-3900 model onto the "Working list"

It was also nice communication with you, thank you for that.

Regards Beatrice

coffeegreg commented 10 months ago

Hi Beatrice,

First of all, we need to determine exactly what we call a "bookmark". Bookmark is what is mentioned in the AVR user manual (e.g. page 62 on DSP-Z7 Owner's Manual or page 67-68 on RX-V671 Owner's Manual). Nothing more and nothing less. Bookmark is operated only from the AVR device and you do it conveniently using the remote control when, while listening to a new station, you decide to put it into the bookmark or want to remove it from it. All stations added in this way are visible in the AVR's "Bookmark" directory and there are no additional subdirectories/subcategories because the "bookmark on/off" functionality of the AVR device does not support it. At least that's the case with my RX-V671. Physically, the stations located in bookmark are saved in the same directory as the YTuner in the bookmark.xml file (one common for all your devices if you have more than one) or in the file [your_avr_mac_address].xml. You can see the structure of this file(s) when you add some of your favorite stations to bookmark. As far as I know YCast does not support this kind of AVR functionality ( I've found description in YCast caveats section : The built-in bookmark function does not work at the moment. ) Now let's move on to what we know from vtuner.com as Favorite Groups and Favorite Stations. I don't know what it looks like on vtuner.com currently. It used to look like this As we know all this functionality of creating groups and placing stations to them has been greatly simplified and moved in YCast to .yaml files and retained in YTuner for compatibility. Your questions concern whether there will be a GUI in YTuner that will allow you to create/manage a more extensive structure of favourite groups and stations than just what is in the .yaml/yml files. I once thought about it, but I came to the conclusion that the interest may be negligible because in my opinion it is easier to create and manage a simple text file than to play with the GUI. I focused more on simplifying and minimizing the resources needed to run YTuner and reducing the need to run other services such as dnsmasq. That's why I added YTuner's own module with a DNS server. Now I have to think about it again. Maybe a larger number of users would encourage me to implement a GUI :wink: Anyway, I'm not saying NO and I'll think about it. :thumbsup: Let's get back to your questions. Ad 4) I never wrote that your AVR does not use station images. This is what I wanted to find out and ask you to test YTuner with a simple .yaml file that contains e.g.

Dance:
   FFH - Eurodance: http://mp3.ffh.de/ffhchannels/hqeurodance.mp3|https://static.ffh.de/fileadmin/fm-dam/ffh.de/pages/musik/webradios/nologo/ffh_eurodance_nologo_600x600.jpg

And then please give me your feedback if you see the FFH station's logo on the TV or not.

Ad 3) Good idea, but not with airable.api. While radio-browser is free and open source, airable.api is not. I more expect that airable.api will share the fate of vtuner than radio-browser, but it may actually happen that the maintenance costs of radio-browser will appear too high (now it is almost EUR 1000 per year). Maybe you know other free and open source solutions similar to radio-browser.info with a well-documented API? I may try to add independent support for the second solution when I have some free time.

Ad 5) First, I'll try to come up with something myself. Looking at other ideas kills creativity. :wink:

PS. Please leave your comments history alone. This information may be useful to someone in the future. :wink:

Regards Greg

TheBossME commented 10 months ago

Hi,Greg,

I do agree with web interface for the application. I didn't need something like that. I was working with Keyboard not with mices 🤣

No Stations Icon do appear, I do Test with different types like ico, png, jpeg. Console output is actually in debug mode and automatically written to a log file defined in YTuner.Service file I've created. In the .log isn't any information about handling station symbols. And no,issues.

And I will leave my comments here, I tried to modify and came to delete, while on Tablet computer, and restore not available (shit). Sorry for that.

I'm playing actually with Proxmox Hypervisor on arm64 platform. Will be a faster and cheaper solution in near future. We've tested with 80 threads at Hetzner Datacenter in Germany. I actually didn't know how much power and bandwidth is needed to host radiobrowser.info

Regarding the bookmark feature. As I do understand the Rubrik is created directly at the vtuner website. The bookmark will be marked to be in the Rubrik, this doesn't come from the AVR. The AVR see in the bookmark section that Rubrik and jump into it to read from. You should actually do not invest to much power to that. It will be better for endusers to modify their stations file. This will work forever when properly updated while changes do,appear related to the stations stream.

👋 Thanks for all and have a nice evening. Beatrice

coffeegreg commented 10 months ago

Hi Beatrice,

I can't come to terms with the fact that you don't see the station's logo on your TV. What's also strange is that you don't see anything in the logs that could indicate that your AVR is sending a request to YTuner to download a file with the station's logo. Maybe your AVR sends a slightly different request than mine and therefore is not supported because I don't know anything about it. Either way, a trace in the log should remain if the AVR sends any query to YTuner... For the sample .yaml file with the one FFH station I sent earlier, I see something like this in my log:

2023-10-31 17:21:04 : Dbg : GET /ytuner/icon?id=MS_534A591AB545.
2023-10-31 17:21:04 : Dbg : Getting  https://static.ffh.de/fileadmin/fm-dam/ffh.de/pages/musik/webradios/nologo/ffh_eurodance_nologo_600x600.jpg.
2023-10-31 17:21:12 : Dbg : GET /setupapp/Yamaha/asp/BrowseXML/statxml.asp?mac=xxxxxxxxxxxxxxxxxxxxxxxxx&fver=W&id=MS_534A591AB545.

First step AVR tries to download the station logo image from YTuner for the station with ID=MS_534A591AB545 (FFH from My Stations) but YTuner does not have this image in the cache or the cache is disabled Second step YTuner downloads the missing image from the given URL, converts and scales it (in my case to JPG 200 pixels), sends it to AVR and saves the file in the cache if it is enabled. Strange, you should see something similar in your log ... :thinking:

First I will try to do additional filtering you mentioned, maybe add support for ico files, maybe webp too, but this will increase the executable file by another kilobytes.

Bis dann! Greg

TheBossME commented 10 months ago

The AVR is identified as Network_Receiver 2.0 if I really remember and if this is a needed information.

31-10-23 18:59:50 : Dbg : GET /ytuner/my_stations?ytuner=true&mac=xxxxxx&dlang=ger&fver=W&start=1&howmany=8. 31-10-23 18:59:51 : Dbg : GET /ytuner/my_stations/Dance?ytuner=true&mac=xxxxxx&dlang=ger&fver=W&start=1&howmany=8. 31-10-23 18:59:52 : Dbg : GET /setupapp/Yamaha/asp/BrowseXML/statxml.asp?mac=xxxxxx&fver=W&id=MS_534A591AB545.

coffeegreg commented 10 months ago

Indeed, your Yamaha does not send any queries to YTuner, such as:

GET /ytuner/icon?id=MS_534A591AB545

to get station logo image. :confused:

coffeegreg commented 10 months ago

Conclusion: Unfortunately, the Yamaha DSP-Z7 does not support station icons, but it produces amazing sound and that is the most important thing. :notes: :radio: :notes: Thanks for all your comments and tips to improve YTuner. :thumbsup: I'm closing this issue.