Posts: 13,426
Threads: 304
Joined: Mar 2018
Reputation:
545
(11-18-2023, 03:28 PM)the_bertrum Wrote: Love that monitor feature Tim, thanks very much. If one accepts the default settings (6 second interval and 3 under-run messages) would it take up to 18 seconds to restart?
It depends on how often the xrun messages are written to the MPD log.
Each time the monitor wakes up it reads the messages in the log that were written since the last time it woke up. If a message is an xrun message a counter is incremented and checked against the threshold to determine whether to restart MPD. The monitor then goes to sleep.
So basically if threshold number of xrun messages occur in < sleep_interval then MPD restart will occur in max 1 x sleep_interval secs. When I was looking at the MPD log to get a sense of how long to took to see 3 xrun messages during a stalled stream it looked like 6 seconds would be a reasonable default sleep_interval.
Posts: 1,869
Threads: 43
Joined: Mar 2020
Reputation:
85
I get it. most excellent work, and much better than my dirty script to do the job
----------------
Robert
Posts: 1,869
Threads: 43
Joined: Mar 2020
Reputation:
85
One other thing occurred to me over night. My script has to cope with different messages in the mpd log when Camilla is running. The playing silence to avoid xrun" messages are there, but frequently swamped by "Thread out of data" messages coming from Camilla. As a result I match for:
Code: $LASTLOG = *"xrun"* || $LASTLOG = *"Thread out of data"*
where $LASTLOG is set the last line of the mpd log.
You mention that your monitor reads all the messages since it last ran, so I expect this isn't an issue here, just that there may be (a lot) more messages to read when Camilla is in play.
----------------
Robert
Posts: 13,426
Threads: 304
Joined: Mar 2018
Reputation:
545
Right, when Camilla is on and a stream fail case occurs MPD xrun messages are interspersed among tons of cdsp messages.
The algorithm for reading the log is basically a PHP implementation of the tail -f command. I used the tailLog() function in moodeutl as the basis for the mpdmon.php daemon.
https://github.com/moode-player/moode/bl...mpdmon.php
https://github.com/moode-player/moode/bl...n/moodeutl
I'll prolly upload a ~pre1 image to Test Team today. Give it a try when u get the chance.
Posts: 1,869
Threads: 43
Joined: Mar 2020
Reputation:
85
(11-19-2023, 11:50 AM)Tim Curtis Wrote: I'll prolly upload a ~pre1 image to Test Team today. Give it a try when u get the chance. Burning it right now. I'll report back if I spot issues. Must say, the xrun condition is much rarer these days, dunno why it got better.
----------------
Robert
Posts: 13,426
Threads: 304
Joined: Mar 2018
Reputation:
545
Here's latest draft release notes.
What's new:
Option to remove CamillaDSP configs and IR files before restoring from backup. This enables the scenario where user wants to replace all the sample configs and IR's with their own set of configs / IR files.
Code: ################################################################################
#
# 2023-11-25 moOde 8.3.7 (Bullseye)
#
################################################################################
New features
- NEW: Radio manager stream monitor for restarting stalled streams
Updates
- UPD: Bump to MPD 0.23.14
- UPD: Bump to shairport-sync 4.3.2
- UPD: Bump to NQPTP 1.2.4
- UPD: Bump to Font Awesome 6.4.2 Pro and update specific icons
- UPD: Add comparison operators =~ and !~ (PERL regex) to Library Adv search
- UPD: Add DSD<number> badge for DSF/DFF/WavPack DSD formats
- UPD: Add DSD format to embedded cover art extractor
- UPD: Add WavPack format to Default/Default+ options for Prefs, Thumbgen scan
- UPD: Add Receivers btn on renderer overlay when connecting to Multiroom sender
- UPD: Add Audio info button on renderer overlay
- UPD: Add channel count and ALSA output format 'output' to extra metadata
- UPD: Add Artist under Title in Folder view (if Artist not = AlbumArtist)
- UPD: Add Prefs option for static waveform now-playing icon
- UPD: Add BSSID to info on Network Config
- UPD: Add underscore to allowed characters in manually entered SSID
- UPD: Add ALSA output mode option to Bluetooth Control
- UPD: Add Pi-5B revision code parsing to pirev.py utility
- UPD: Add option to remove CamillaDSP configs and IR files before restore
- UPD: Improve metadata layout in CoverView wide mode
- UPD: Improve icon for volume popup by always showing level
- UPD: Improve sort headings in Radio and Playlist views
- UPD: Improve bitrate sort in Radio view (sort high to low)
- UPD: Improve GPIO Config help and labels
- UPD: Improve Squeezelite Config help
- UPD: Improve readability and parsing of startup log
- UPD: Improve the "Artist column" option in Prefs Library
- UPD: Improve Favorite: update station type, include on Queue context menu
- UPD: Improve Input select configuration and volume handling
- UPD: Replace Chrome deprecated vertical sliders with cross-Browser sliders
- UPD: Remove unreliable AirPlay protocol switcher (only AirPlay 2 supported)
- UPD: Show "Radio station" for stations that transmit a bogus title tag
- UPD: Standardize display style for encodedAt and ALSA output formats
- UPD: Configure Squeezelite AUDIODEVICE param using Audio Config settings
- UPD: Move Local Display to Peripherals Config
- UPD: Move DLNA server to File Sharing section of System Config
- UPD: Move Prefs thumbnail and cover art options to dedicated section
- UPD: Move selected Library prefs options for a more logical grouping
Audio devices
- NEW: ProtoDAC TDA1387 X8 (FifoPiMa)
Radio stations
- NEW: Eirewave
- NEW: Davide of MIMIC
- NEW: Soma FM - Bossa Beyond
- NEW: Soma FM - The In-Sound
- NEW: Soma FM - Tiki Time
- UPD: Jazz24
- UPD: BBC stations
- UPD: FluxFM stations
- UPD: Genres on various stations
Security
- UPD: Remove AP mode PSK from hostapd.conf
Bug fixes
- FIX: Tag/Album sync (auto-scroll then highlight item) not working
- FIX: WavPack format information not correct in Library and Audio info
- FIX: MPD mixer reverts to "software' after disconnecting bluetooth device
- FIX: Backup/Restore missing Prefs, Library, Track play setting
- FIX: Restore not updating buffer size in /etc/bluealsaaplay.conf
- FIX: Invert polarity auto-click not working
- FIX: Soma FM station name displays null when tag not present
- FIX: Base folder RADIO not excluded correctly in Folder view
- FIX: WebUI visual glitch when MPD is restarted
- FIX: Playbar context menu overflows right boundary
- FIX: Missing parenthesis when generating in nftables.conf
- FIX: Moodeutl -f/-F can hang if hwparams is empty (rare)
- FIX: HD badge hidden when radio station stopped
- FIX: Other minor fixes
Posts: 13,426
Threads: 304
Joined: Mar 2018
Reputation:
545
Latest draft release notes.
What's new:
Host name if set in Raspberry Pi Imager will be imported and applied to moOde names during first startup.
Code: ################################################################################
#
# 2023-12-02 moOde 8.3.7 (Bullseye)
#
################################################################################
New features
- NEW: Radio manager stream monitor for restarting stalled streams
Updates
- UPD: Bump to MPD 0.23.14
- UPD: Bump to shairport-sync 4.3.2
- UPD: Bump to NQPTP 1.2.4
- UPD: Bump to Font Awesome 6.4.2 Pro and update specific icons
- UPD: Add comparison operators =~ and !~ (PERL regex) to Library Adv search
- UPD: Add DSD<number> badge for DSF/DFF/WavPack DSD formats
- UPD: Add DSD format to embedded cover art extractor
- UPD: Add WavPack format to Default/Default+ options for Prefs, Thumbgen scan
- UPD: Add Receivers btn on renderer overlay when connecting to Multiroom sender
- UPD: Add Audio info button on renderer overlay
- UPD: Add channel count and ALSA output format 'output' to extra metadata
- UPD: Add Artist under Title in Folder view (if Artist not = AlbumArtist)
- UPD: Add Prefs option for static waveform now-playing icon
- UPD: Add BSSID to info on Network Config
- UPD: Add underscore to allowed characters in manually entered SSID
- UPD: Add ALSA output mode option to Bluetooth Control
- UPD: Add Pi-5B revision code parsing to pirev.py utility
- UPD: Add option to remove CamillaDSP configs and IR files before restore
- UPD: Improve metadata layout in CoverView wide mode
- UPD: Improve icon for volume popup by always showing level
- UPD: Improve sort headings in Radio and Playlist views
- UPD: Improve bitrate sort in Radio view (sort high to low)
- UPD: Improve GPIO Config help and labels
- UPD: Improve Squeezelite Config help
- UPD: Improve readability and parsing of startup log
- UPD: Improve the "Artist column" option in Prefs Library
- UPD: Improve Favorite: update station type, include on Queue context menu
- UPD: Improve Input select configuration and volume handling
- UPD: Replace Chrome deprecated vertical sliders with cross-Browser sliders
- UPD: Remove unreliable AirPlay protocol switcher (only AirPlay 2 supported)
- UPD: Show "Radio station" for stations that transmit a bogus title tag
- UPD: Standardize display style for encodedAt and ALSA output formats
- UPD: Configure Squeezelite AUDIODEVICE param using Audio Config settings
- UPD: Move Local Display to Peripherals Config
- UPD: Move DLNA server to File Sharing section of System Config
- UPD: Move Prefs thumbnail and cover art options to dedicated section
- UPD: Move selected Library prefs options for a more logical grouping
- UPD: Allow host name to be imported from Raspberry Pi Imager
Audio devices
- NEW: ProtoDAC TDA1387 X8 (FifoPiMa)
Radio stations
- NEW: Eirewave
- NEW: Davide of MIMIC
- NEW: Soma FM - Bossa Beyond
- NEW: Soma FM - The In-Sound
- NEW: Soma FM - Tiki Time
- UPD: Jazz24
- UPD: BBC stations
- UPD: FluxFM stations
- UPD: Genres on various stations
Security
- UPD: Remove AP mode PSK from hostapd.conf
Bug fixes
- FIX: Tag/Album sync (auto-scroll then highlight item) not working
- FIX: WavPack format information not correct in Library and Audio info
- FIX: MPD mixer reverts to "software' after disconnecting bluetooth device
- FIX: Backup/Restore missing Prefs, Library, Track play setting
- FIX: Restore not updating buffer size in /etc/bluealsaaplay.conf
- FIX: Invert polarity auto-click not working
- FIX: Soma FM station name displays null when tag not present
- FIX: Base folder RADIO not excluded correctly in Folder view
- FIX: WebUI visual glitch when MPD is restarted
- FIX: Playbar context menu overflows right boundary
- FIX: Missing parenthesis when generating in nftables.conf
- FIX: Moodeutl -f/-F can hang if hwparams is empty (rare)
- FIX: HD badge hidden when radio station stopped
- FIX: Other minor fixes
Posts: 1,279
Threads: 24
Joined: Jun 2022
Reputation:
42
12-02-2023, 09:35 PM
(This post was last modified: 12-02-2023, 09:37 PM by Nutul.)
Sure the Tag/Album fix is working?
I see somehow erratic behavior: there is a scroll + highlight in the albums' pane, but not in the artists'.
I cannot remember exactly what I do, I think I just re-open moOde in the browser, and go to the library. Now, say I am on album 7 of artist X, now the library scrolls to the 7th album within the entire list of albums, as no artist is selected... same behavior I see with the local UI on the 7'' display (ah, yes, maybe when I enter some configuration page, then I go back to play-mode...).
I don't believe this might be related to the fact that I haven't flashed any new image since a while, although it might be... ;-)
Posts: 13,426
Threads: 304
Joined: Mar 2018
Reputation:
545
This -> "there is a scroll + highlight in the albums' pane, but not in the artists'" is the way the code currently works.
IIRC there was a reason the artist could not also be identified and scroll-to but my memory is not so good on this.
Posts: 1,279
Threads: 24
Joined: Jun 2022
Reputation:
42
(12-02-2023, 10:21 PM)Tim Curtis Wrote: IIRC there was a reason the artist could not also be identified and scroll-to but my memory is not so good on this.
Probably for scenarios of multiple-artist albums? Maybe only AlbumArtist should be kept into consideration in these situations?
Note, that if I scroll the library and select something just to, say, look into the audio parameters of a track; then revert to NowPlaying, and then click on the artist I'll be taken to the library, and such artist would be highlighted; not the album this time, though - so the now-playing context can actually know what artist and album is currently playing. The technical details for the limitations, if any, I don't (yet) know, obviously... ;-)
Not a big issue, obviously, but also the eye wants its candy :-)
|