Open ThHanika opened 2 years ago
Despite all the work you have provided I am still at the same stage. The filter.yml and resently.yml files are not created. I think problem related to my version of linux on pi.
pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)"
Show me your logs.... it seems an access-problem
service.log
2022-02-11 18:41:20 INFO: **YCast (1.1.0)** server starting
??? please take the new version.. it must start with:
2022-02-11 08:12:32 INFO: YCast (1.2.4) server starting
2022-02-11 08:12:32 INFO: Initialize base directory /.ycast
2022-02-11 08:12:32 INFO: try Work-Dir: /home/ycast/.ycast
2022-02-11 08:12:32 INFO: using var directory: /home/ycast/.ycast
2022-02-11 08:12:32 INFO: Initialize Limits and Filters
and it seems, that your icon-cache is also not working..
I deleted the log files. I did a fresh install. I restarted pi. No log file created.
1 [Unit] 2 Description=YCast service 3 After=network.target 4 5 [Service] 6 Type=simple 7 WorkingDirectory=/var/www/ycast 8 9 # StandardOutput=file:/var/www/ycast/service.log 10 # StandardError=file:/var/www/ycast/ycast.log 11 12 StandardOutput=syslog 13 StandardError=syslog 14 SyslogIdentifier=ycast 15 16 Restart=always 17 RestartSec=130 18 ExecStart=/usr/bin/python3 -m ycast -c /var/www/ycast/stations.yml -d 19 20 [Install] 21 WantedBy=multi-user.target 22
your logs are switched to system-logs!!! :-D
hard coded files are commented out. It was not necessary to change your ycast.system file
for easier debugging take your old service.file and ... it is not usable to restart your rasp. use this command:
sudo systemctl restart ycast.service
sudo systemctl status ycast.service
BTW: to scan your syslog:
sudo journalctl | grep ycast
Aaahh, it seems, you have a shadow installation of ycast.
commands to fix:
pip uninstall ycast
and
sudo pip uninstall ycast
check it with
sudo pip list
and pip list
and reinstall
~$ pip list | grep ycast
ycast 1.2.4
BTW: for root user, you have to install ycast with sudo:
sudo pip install ...
Aaahh, it seems, you have a shadow installation of ycast. commands to fix:
pip uninstall ycast
andsudo pip uninstall ycast
You are right! I uninstalled both versions by running twice:
pip uninstall ycast
Successfully installed ycast-1.2.4 pi@raspberrypi:~ $ pip list | grep ycast ycast 1.2.4
what says:
sudo pip list | grep ycast
??? I see ycast 1.1.0 or logs now in files?
It's a mystery.
pi@raspberrypi:~ $ sudo pip list | grep ycast
ycast 1.2.4
do you use docker?
pi@raspberrypi:~ $ sudo systemctl restart ycast.service pi@raspberrypi:~ $ sudo systemctl status ycast.service
● ycast.service - YCast service
Loaded: loaded (/etc/systemd/system/ycast.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-02-12 16:28:31 CET; 1min 7s ago
Main PID: 5472 (python3)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/ycast.service
└─5472 /usr/bin/python3 -m ycast -c /var/www/ycast/stations.yml -d
févr. 12 16:28:32 raspberrypi ycast[5472]: 2022-02-12 16:28:32 INFO: Initialize Limits and Filters
févr. 12 16:28:32 raspberrypi ycast[5472]: 2022-02-12 16:28:32 WARNING: YAML file '/var/www/ycast/.ycast/filter.yml' not found
févr. 12 16:28:32 raspberrypi ycast[5472]: * Serving Flask app 'ycast.server' (lazy loading)
févr. 12 16:28:32 raspberrypi ycast[5472]: * Environment: production
févr. 12 16:28:32 raspberrypi ycast[5472]: WARNING: This is a development server. Do not use it in a production deployment.
févr. 12 16:28:32 raspberrypi ycast[5472]: Use a production WSGI server instead.
févr. 12 16:28:32 raspberrypi ycast[5472]: * Debug mode: off
févr. 12 16:28:32 raspberrypi ycast[5472]: 2022-02-12 16:28:32 WARNING: * Running on all addresses.
févr. 12 16:28:32 raspberrypi ycast[5472]: WARNING: This is a development server. Do not use it in a production deployment.
févr. 12 16:28:32 raspberrypi ycast[5472]: 2022-02-12 16:28:32 INFO: * Running on http://192.168.1.24:80/ (Press CTRL+C to quit)
do you use docker?
No, I do not think so.
show:
ls /var/www/ycast/.ycast/
This is a nice development!
pi@raspberrypi:~ $ ls /var/www/ycast/.ycast/ filter.yml
if you hear your radio-station, you will find "recently.yml" in this direcctory. And get some stations on your start-page
After going through RadioBrowser
pi@raspberrypi:~ $ ls /var/www/ycast/.ycast/
cache filter.yml recently.yml
And you see the icon-cache is working now
if you hear your radio-station, you will find "recently.yml" in this direcctory. And get some stations on your start-page
That's great! Everything is working. Thank you very much for your work and your patience.
recently.yml: i have a feeling that this file does not support all UFT-8 characters.
I make no conversions. I save it as it is. Where is your problem? Display on your Yamaha-device?
I make no conversions. I save it as it is. Where is your problem? Display on your Yamaha-device?
Must be "Chérie Fm"
FYI: My AVR is Denon Ceol N9
Should .vtuner.com be redirected to make the web service work?
Should .vtuner.com be redirected to make the web service work? It is not necessary in your case...
Must be "Chérie Fm"
OK, I know more now..., the yaml- specification (recently.yml and station.yml) have restricted using of character-codes, python escape invalid characters in UTF8 code sequences. https://yaml.org/spec/1.2.2/#311-dump
Should .vtuner.com be redirected to make the web service work? It is not necessary in your case...
On pi www.vtuner.com opens the Vtuner site. I probably didn't understand how to make the web service work. Besides, I'm currently using a PHP editor to edit my favorites.
only ip-adress of your raspbery?
only ip-adress of your raspbery?
It's better with the IP. :-D
Only the first category of my favorites is displayed and the others are deleted by adding a station. And again the UFT-8 problem, all the existing accented characters are modified.
I hope you have a backup, and... the web is still evolving. Ahh, I see you didn't select a category in the bookmark header... then 'others' will automatically be set as the bookmark category! In this case, all other bookmark items with a different category are hidden, but not deleted. If you clear the Category field, all bookmarks will reappear. (I was thinking about how it is possible to be able to specify arbitrary names for further categories. Of course, this may be a bit confusing)
And again the UFT-8 problem, all the existing accented characters are modified.
Even if I repeat myself, the é is not a legal character in a *.yaml file. It is encoded. The stations.yml is just a location. I tried it: The character is displayed correctly on the AVR amplifier.
BTW: If you modified the stations.yml and set the é in the stations.yml file, it es possible, the python cannot decode it. (OffTopic: "Chérie Fm" is a nice station... :+1:
The two attached files show the modifications of stations.yml after using the web service. Listes de stations.txt Listes de stations2.txt .
Aaah thank you for the file, there is a bug with empty favicon-link. It stops on error-exception. Fix in process on the website
Perfect for me!
Could you create a Docker image with your fork? I use ycast docker on Qnap with success, but it looks like your commits would not be merged into original project anytime...
Sorry, I have no knowhow about docker.
Me too ☹️ Maybe I'll ask some ycast docker maintainer to do it. There are at least a few Dockers with ycast so i think it is just a matter of changing ycast repository in docker configuration.
The filter.yml file is not automatically created in my working directory, is this normal? I only have the file /var/www/ycast/.ycast/recently.yml
This is normal. a default Dictionary is created in memory, and up to now, there is nothing to save. But there is an newcommer, fit in nextcloud developement. He makes global filters editable by web-frontend (working in prozess)
Could you create a Docker image with your fork? I use ycast docker on Qnap with success, but it looks like your commits would not be merged into original project anytime...
@ThHanika/YCast is now a docker-file made
I hop it helps, here the website