Posts: 6,015
Threads: 176
Joined: Apr 2018
Reputation:
235
@ fdealexa
It isn't the number of stations or images that matters here, it's the size of the resulting zip file.
In your case you may find my original code ( moode-radio-utils) more useful. It works differently and would allow you to import just user-defined stations, e.g., where ID > 499. However, it is not integrated with the moOdeUI and must be run from the command line.
And I learned something here. Turns out the use of a semi-colon in a URI is legal but in a restricted sense. It is a reserved character whose meaning depends on the URL scheme. I still get the shivers when I see it but it's not illegal syntactically.
Regards,
Kent
Posts: 9
Threads: 0
Joined: Aug 2020
Reputation:
0
(07-23-2020, 06:08 PM)jbajci Wrote: (07-23-2020, 03:02 PM)Pixxel Wrote: Hi,
probably still some problem with Piano 2.1 + Kali. Moode reports without music:
Quote:MPD error Failed to open "ALSA default" (alsa); Failed to open ALSA device "hw:0,0": No such file or directory
Code: pi@moode:~ $ cat /var/log/moode.log
20200723 104759 worker: -- Start
20200723 104759 worker: Successfully daemonized
20200723 104800 worker: Integrity check (passed)
20200723 104800 worker: Session loaded
20200723 104800 worker: Debug logging (off)
20200723 104800 worker: Device raw: (0:empty|1:empty|2:empty|3:empty
20200723 104800 worker: Device i2s: (Allo Piano 2.1 Hi-Fi DAC)
20200723 104800 worker: Device mpd: (0:Allo Piano 2.1 Hi-Fi DAC)
20200723 104800 worker: Device ses: (0|Allo Piano 2.1 Hi-Fi DAC|Master|Invalid card number.%)
20200723 104800 worker: ALSA Master volume set to (Invalid card number.)
20200723 104800 worker: -- System
20200723 104803 worker: Host (moode)
20200723 104803 worker: moOde (6.7.1 2020-07-22)
20200723 104803 worker: RaspiOS (10.4)
20200723 104803 worker: Kernel (5.4.51-v7+ #1325)
20200723 104803 worker: Platform (Pi-3B+ 1GB v1.3)
20200723 104803 worker: ARM arch (armv7l, 32-bit kernel)
20200723 104803 worker: MPD ver (0.21.24)
20200723 104803 worker: CPU gov (ondemand)
20200723 104803 worker: USB boot enabled
20200723 104803 worker: File system not expanded yet
20200723 104804 worker: HDMI port on
20200723 104805 worker: File check (OK)
20200723 104805 worker: -- Network
20200723 104805 worker: eth0 exists
20200723 104805 worker: IP addr (192.168.1.102)
20200723 104805 worker: Netmask (255.255.255.0)
20200723 104806 worker: Gateway (192.168.1.1)
20200723 104806 worker: Pri DNS (192.168.1.1)
20200723 104806 worker: Domain (None)
20200723 104806 worker: wlan0 exists
20200723 104806 worker: wifi country (US)
20200723 104806 worker: wlan0 SSID is blank
20200723 104806 worker: eth0 addr exists, AP mode not started
20200723 104806 worker: wlan0 address not assigned
20200723 104806 worker: -- Audio
20200723 104807 worker: MPD conf updated
20200723 104807 worker: ALSA outputs unmuted
20200723 104807 worker: ALSA card number (0)
20200723 104807 worker: Audio output (Allo Piano 2.1 Hi-Fi DAC)
20200723 104808 worker: Audio formats (cat: /proc/asound/card0/pcm0p/sub0/hw_params: No such file or directory)
20200723 104808 worker: ALSA mixer name (Master)
20200723 104808 worker: MPD volume control (disabled)
20200723 104808 worker: Hdwr volume controller exists
20200723 104808 worker: Max ALSA volume (100%)
20200723 104808 worker: Piano output mode (Invalid card number.)
20200723 104809 worker: Piano 2.1 initialized
20200723 104809 worker: Reset renderer active flags
20200723 104809 worker: -- MPD
20200723 104809 worker: MPD started
20200723 104810 worker: MPD accepting connections
20200723 104810 worker: Configure MPD outputs
20200723 104810 worker: MPD output 1 ALSA default (on)
20200723 104810 worker: MPD output 2 ALSA crossfeed (off)
20200723 104810 worker: MPD output 3 ALSA parametric eq (off)
20200723 104810 worker: MPD output 4 ALSA graphic eq (off)
20200723 104810 worker: MPD output 5 ALSA polarity inversion (off)
20200723 104810 worker: MPD output 6 ALSA bluetooth (off)
20200723 104810 worker: MPD output 7 HTTP stream (off)
20200723 104810 worker: MPD crossfade (off)
20200723 104810 worker: -- Feature availability
20200723 104810 worker: Source select (available)
20200723 104810 worker: Source select (source: MPD)
20200723 104810 worker: Source select (output: Allo Piano 2.1 Hi-Fi DAC)
20200723 104811 worker: Bluetooth (available)
20200723 104811 worker: Airplay renderer (available)
20200723 104811 worker: Spotify renderer (available)
20200723 104811 worker: Squeezelite renderer (available)
20200723 104811 worker: UPnP renderer (available)
20200723 104811 worker: DLNA server (available)
20200723 104811 worker: UPnP browser (available)
20200723 104811 worker: Audio scrobbler (available)
20200723 104811 worker: GPIO button handler (available)
20200723 104811 worker: -- Music sources
20200723 104811 worker: USB source (AUDIOMALINA)
20200723 104811 worker: NAS and UPnP sources (none configured)
20200723 104811 worker: -- Miscellaneous
20200723 104811 worker: USB volume knob (Off)
20200723 104811 worker: USB auto-mounter (udisks-glue)
20200723 104811 worker: LED0 (On)
20200723 104811 worker: LED1 (On)
20200723 104811 worker: Saved MPD vol level (0)
20200723 104811 worker: Preamp volume level (0)
20200723 104812 worker: MPD volume level (0) restored
20200723 104812 worker: ALSA Master volume (Invalid card number.)
20200723 104812 worker: Auto-play (Off)
20200723 104812 worker: Maintenance interval (3 hrs)
20200723 104812 worker: Screen saver activation (Never)
20200723 104812 worker: Session permissions (OK)
20200723 104812 worker: Watchdog started
20200723 104812 worker: Ready
hi, i have the same
problem
Me tooo
Posts: 566
Threads: 5
Joined: Mar 2020
Reputation:
31
08-21-2020, 01:50 PM
(This post was last modified: 08-21-2020, 02:25 PM by fdealexa.)
(08-21-2020, 09:14 AM)TheOldPresbyope Wrote: @fdealexa
It isn't the number of stations or images that matters here, it's the size of the resulting zip file.
In your case you may find my original code (moode-radio-utils) more useful. It works differently and would allow you to import just user-defined stations, e.g., where ID > 499. However, it is not integrated with the moOdeUI and must be run from the command line.
And I learned something here. Turns out the use of a semi-colon in a URI is legal but in a restricted sense. It is a reserved character whose meaning depends on the URL scheme. I still get the shivers when I see it but it's not illegal syntactically.
Regards,
Kent
Thank a lot, Kent.
As Tim mentioned: do you think that is it possibile to increase the limit in the PHP.ini?
I am sorry that you have spent a lot of time for this matter.
I think that the "merge" function will complete the radio management tool.
Thanks again, to you and to Tim.
Ciao,
Francesco
Posts: 6,015
Threads: 176
Joined: Apr 2018
Reputation:
235
(08-21-2020, 01:50 PM)fdealexa Wrote: (08-21-2020, 09:14 AM)TheOldPresbyope Wrote: @fdealexa
It isn't the number of stations or images that matters here, it's the size of the resulting zip file.
In your case you may find my original code (moode-radio-utils) more useful. It works differently and would allow you to import just user-defined stations, e.g., where ID > 499. However, it is not integrated with the moOdeUI and must be run from the command line.
And I learned something here. Turns out the use of a semi-colon in a URI is legal but in a restricted sense. It is a reserved character whose meaning depends on the URL scheme. I still get the shivers when I see it but it's not illegal syntactically.
Regards,
Kent
Thank a lot, Kent.
As Tim mentioned: do you think that is it possibile to increase the limit in the PHP.ini?
I am sorry that you have spent a lot of time for this matter.
I think that the "merge" function will complete the radio tool.
Thanks again, to you and to Tim.
Ciao,
Francesco
I have tried rerunning with double the size of the two obvious PHP-fpm parameters. It did not affect the outcome. Still getting error 413.
This interplay between frontend Javascript and backend PHP is not my forte. Tim is the master; I am the grasshopper (you have to have watched 1970s American TV to get this). There's nothing more I can add by randomly poking around.
Regards,
Kent
Posts: 13,399
Threads: 304
Joined: Mar 2018
Reputation:
543
I'll check into it. I created a big test zip yesterday. There are some interrelated PHP settings that control sizes of things that can be transferred.
I suppose once the size issue is fixed I should include sone size checking in the import routine similar to that which is already in the import routines for uploading background image and covers. Also some basic sanitizing of the zip file for line endings and dot files/dirs should prolly be included.
A merge feature though is a lot more complicated and so maybe the python code you already wrote can be leveraged. My only concern with merging is that it can quickly become a rabbit hole of tests and error handling cos we have no way of knowing what's been done manually to the radio stations, logos and sql table.
Posts: 566
Threads: 5
Joined: Mar 2020
Reputation:
31
Hi Tim, Hi Kent,
unfortunatelly the existing py code (moode-radio-utils) is not running due:
1. the location of the radio-logos and thumbs (change from /var/www/images/ to /var/local/www/imagesw) - no problem I can change them
2. More important: the record definition of db (from 5 fields to 12 fields) - I am not able to modify the code and json.
I am sorry to bring no good news but, please: "ambasciator non porta pena" that means "do not shoot the messenger"
Regards,
Francesco
Posts: 6,015
Threads: 176
Joined: Apr 2018
Reputation:
235
08-21-2020, 05:11 PM
(This post was last modified: 08-21-2020, 05:14 PM by TheOldPresbyope.
Edit Reason: typo
)
This export/import discussion probably should be in its own thread
The whole radio subsystem is a bit of a rabbit hole for me. It keeps trying to mutate from a nice background music source into a full-featured Internet radio which is not how I want to use it.
I wrote my Python routines to help a specific user with a problem. If they have been useful to others, great, but I won't pretend they are production quality. As it says in the README, there's a modicum of error checking. It deals only with user-defined stations. Existing user-defined stations on the destination player are left untouched, stations to be loaded which match existing ones in name are skipped, and "id" values aren't used on input so it's not possible to end up with clashing primary keys. That's it.
In my last test, I doubled both the post_max_size and upload_max_filesize parameters to 60M (in /etc/php/7.3/fpm/php.ini) and rebooted. The 413 error reoccurred. By my calculation, there should be plenty of headroom over the 30MB-32MB base64 sizes of the zip files which failed to upload. I don't get it.
Regards,
Kent
Posts: 13,399
Threads: 304
Joined: Mar 2018
Reputation:
543
Those two params plus an nginx.conf param named "client_max_body_size" all have to be set to the given size.
I was able to upload 145M zip file but definitely there needs to be a lower limit for this because uploading "big" files for example >100M would require other checks like for available free space, RAM, etc.
Maybe 50M is a good max upload size?
Posts: 6,015
Threads: 176
Joined: Apr 2018
Reputation:
235
Nginx. Now it all starts making sense.
Seems to me 50MB is as good a choice as any. Certainly not “unlimited”.
I’ll try it with the OPs files later.
Regards,
Kent
Posts: 566
Threads: 5
Joined: Mar 2020
Reputation:
31
(08-21-2020, 05:11 PM)TheOldPresbyope Wrote: This export/import discussion probably should be in its own thread
The whole radio subsystem is a bit of a rabbit hole for me. It keeps trying to mutate from a nice background music source into a full-featured Internet radio which is not how I want to use it.
I wrote my Python routines to help a specific user with a problem. If they have been useful to others, great, but I won't pretend they are production quality. As it says in the README, there's a modicum of error checking. It deals only with user-defined stations. Existing user-defined stations on the destination player are left untouched, stations to be loaded which match existing ones in name are skipped, and "id" values aren't used on input so it's not possible to end up with clashing primary keys. That's it.
In my last test, I doubled both the post_max_size and upload_max_filesize parameters to 60M (in /etc/php/7.3/fpm/php.ini) and rebooted. The 413 error reoccurred. By my calculation, there should be plenty of headroom over the 30MB-32MB base64 sizes of the zip files which failed to upload. I don't get it.
Regards,
Kent
Hi Kent,
I am very sorry if my post has created some doubts: regarding the Python routines (moode-radio-utils), what I meant: the new DB (from 6.6 I guess) has different position and record definition. I tried your two radio list and it doesn't work.
I absolutely do not want to question what you (and all the staff) have created: I would just like to be a help in making Mode better and, of course, the best player.
I apologize for any misunderstandings, please believe me.
Thanks and best regards,
Francesco
|