Moode Forum
[PROBLEM] Display bug when sending Airplay or Bluetooth to Moode - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [PROBLEM] Display bug when sending Airplay or Bluetooth to Moode (/showthread.php?tid=6237)



Display bug when sending Airplay or Bluetooth to Moode - markmizu - 02-17-2024

Hi All,

I've noticed that when I try to send audio to Moode via Airplay or Bluetooth the display updates to the correct "mode" but the track info does not update - it seems to be limited to the last thing you played locally on the device. The background image is also the cover art of the last song played locally.

I had a look around and I've confirmed that in Airplay mode the artwork is successfully being sent and cached to shairport-sync -


Code:
marke@moode:/ $ ls /tmp/shairport-sync/.cache/coverart

cover-2ad798e37a1be014538eb544608df7c5.jpg  

It seems that I have a lcd.txt file in the home folder which is not updating - as an example here is the output of this file and currentsong.txt whilst the device is happily playing an Airplay stream -
Code:
marke@moode:~ $ sudo cat /var/local/www/currentsong.txt
file=AirPlay Active
outrate=PCM 16 bit 44.1 kHz, Stereo, 1.411 Mbps

marke@moode:~ $ cat lcd.txt
file=http://strm112.1.fm/blues_mobile_mp3
artist=Radio station
album=1.FM - Blues Radio
title=Roy Rogers - Blues On The Range (Instrumental)
coverurl=imagesw%2Fradio-logos%2F1.FM%20-%20Blues%20Radio.jpg
track=
date=
composer=
encoded=VBR
bitrate=0 bps
outrate=Not playing0 bps
volume=56
mute=0
state=stop

It's the same deal with Bluetooth - doesn't seem to be updating the current song status data.

Ive attached a few screenshots -

1: my iPad Airplay'ing to Moode -

[attachment=3631]

2: The Moode screen -

[attachment=3630]

3: Audio Info > Playback

[attachment=3632]

4: Audio Info > Track

[attachment=3633]


Is this correct in terms of functionality?


For ref - Log file output -


Code:
marke@moode:~ $ cat /var/log/moode.log
20240217 144613 worker: --
20240217 144613 worker: -- Start moOde 8 series
20240217 144613 worker: --
20240217 144613 worker: Successfully daemonized
20240217 144613 worker: Wait for Linux startup...
20240217 144625 worker: Linux startup complete
20240217 144626 worker: Boot config backed up
20240217 144627 worker: Session loaded
20240217 144629 worker: Package holds applied
20240217 144630 worker: File check complete
20240217 144630 worker: Debug logging off
20240217 144630 worker: Reduced logging off
20240217 144630 worker: --
20240217 144630 worker: -- Audio debug
20240217 144630 worker: --
20240217 144630 worker: ALSA cards:   0:Headphones | 1:empty | 2:empty | 3:empty
20240217 144630 worker: MPD config:   0:Pi Headphone jack | mixer:PCM | cardnum:0
20240217 144630 worker: Mixer name:   [PCM]
20240217 144630 worker: Hdwr volume:  set to 0%
20240217 144630 worker: Volume knob:  56
20240217 144631 worker: --
20240217 144631 worker: -- System
20240217 144631 worker: --
20240217 144633 worker: Host:     moode
20240217 144633 worker: Model:    Pi-4B 1.4 8GB
20240217 144633 worker: moOde:    8.3.8 2024-02-14
20240217 144633 worker: RaspiOS:  11.8 Bullseye 64-bit
20240217 144633 worker: Kernel:   6.1.21 64-bit
20240217 144633 worker: MPD ver:  0.23.14
20240217 144633 worker: CPU gov:  ondemand
20240217 144633 worker: Userid:   marke
20240217 144633 worker: Homedir:  /home/marke
20240217 144633 worker: Timezone: Greenwich
20240217 144633 worker: Keyboard: gb
20240217 144633 worker: USB boot: enabled
20240217 144633 worker: File sys: expanded
20240217 144633 worker: HDMI out: on
20240217 144633 worker: Sys LED0: on
20240217 144633 worker: Sys LED1: on
20240217 144633 worker: --
20240217 144633 worker: -- Network
20240217 144633 worker: --
20240217 144633 worker: Eth: adapter exists
20240217 144633 worker: Eth: timeout off
20240217 144633 worker: Eth: method  dhcp
20240217 144633 worker: Eth: address 192.168.0.101
20240217 144633 worker: Eth: netmask 255.255.255.0
20240217 144633 worker: Eth: gateway 192.168.0.1
20240217 144633 worker: Eth: pri DNS 192.168.0.1
20240217 144633 worker: Eth: domain
20240217 144634 worker: Wlan: adapter exists
20240217 144634 worker: Wlan: country GB
20240217 144634 worker: Wlan: SSID    SwirlyPopCloud
20240217 144634 worker: Wlan: other   none
20240217 144634 worker: Wlan: router  off
20240217 144634 worker: Wlan: timeout up to 90 secs
20240217 144634 worker: Wlan: connect to SwirlyPopCloud
20240217 144634 worker: Wlan: sleep   disabled
20240217 144634 worker: Wlan: method  dhcp
20240217 144634 worker: Wlan: address 192.168.68.148
20240217 144634 worker: Wlan: netmask 255.255.255.0
20240217 144634 worker: Wlan: gateway 192.168.0.1
20240217 144634 worker: Wlan: pri DNS 192.168.0.1
20240217 144634 worker: Wlan: domain
20240217 144634 worker: --
20240217 144634 worker: -- Software update
20240217 144634 worker: --
20240217 144634 worker: Automatic check: on
20240217 144634 worker: Checking for available update...
20240217 144634 worker: Software is up to date
20240217 144634 worker: --
20240217 144634 worker: -- File sharing
20240217 144634 worker: --
20240217 144634 worker: SMB file sharing:  off
20240217 144634 worker: NFS file sharing:  off
20240217 144634 worker: DLNA file sharing: off
20240217 144634 worker: --
20240217 144634 worker: -- Audio config
20240217 144634 worker: --
20240217 144635 worker: MPD config:    updated
20240217 144635 worker: Audio device:  Pi Headphone jack
20240217 144635 worker: Formats:       U8, S16_LE
20240217 144635 worker: Mixer type     Hardware
20240217 144635 worker: Mixer name     PCM
20240217 144635 worker: Hdwr volume:   controller detected
20240217 144635 worker: ALSA max vol:  100%
20240217 144635 worker: ALSA card:     0
20240217 144635 worker: ALSA mode:     Default
20240217 144635 worker: ALSA loopback: off
20240217 144635 worker: CamillaDSP:    off
20240217 144635 worker: Renderers:     active flags reset
20240217 144635 worker: --
20240217 144635 worker: -- MPD startup
20240217 144635 worker: --
20240217 144635 worker: MPD service:        started
20240217 144635 worker: MPD port 6600:      accepting connections
20240217 144635 worker: MPD ALSA Default:   on
20240217 144635 worker: MPD ALSA Bluetooth: off
20240217 144635 worker: MPD HTTP Server:    off
20240217 144635 worker: MPD crossfade:      off
20240217 144635 worker: MPD ignore CUE:     yes
20240217 144635 worker: MPD CDSP volsync:   off
20240217 144635 worker: MPD CDSP volrange:  60 dB
20240217 144635 worker: --
20240217 144635 worker: -- Music sources
20240217 144635 worker: --
20240217 144635 worker: USB auto-mount: udisks-glue
20240217 144635 worker: USB drives:     no drives found
20240217 144635 worker: NAS sources:    no music sources defined
20240217 144635 worker: --
20240217 144635 worker: -- Feature availability
20240217 144635 worker: --
20240217 144635 worker: Input select:    available, src MPD, out Pi Headphone jack
20240217 144700 worker: Bluetooth:       started, Pairing Agent started, ALSA mode Default
20240217 144700 worker: AirPlay:         started
20240217 144700 worker: Spotify Connect: available
20240217 144700 worker: Squeezelite:     available
20240217 144700 worker: RoonBridge:      not installed
20240217 144700 worker: Multiroom:       available
20240217 144700 worker: UPnP client:     started
20240217 144700 worker: GPIO buttons:    available
20240217 144700 worker: HTTPS mode:      available
20240217 144700 worker: Stream recorder: n/a
20240217 144700 worker: --
20240217 144700 worker: -- Volume levels
20240217 144700 worker: --
20240217 144701 worker: Volume knob:   56
20240217 144701 worker: Saved MPD vol: -1
20240217 144701 worker: Saved SRC vol: 0
20240217 144701 worker: Mixer type:    hardware
20240217 144701 worker: Hdwr volume:   86%
20240217 144701 worker: CDSP volume:   0.0dB
20240217 144701 worker: --
20240217 144701 worker: -- Peripherals
20240217 144701 worker: --
20240217 144701 worker: Local display:   on
20240217 144701 worker: On-screen kbd:   on
20240217 144701 worker: Rotary encoder:  off
20240217 144701 worker: USB volume knob: off
20240217 144702 worker: LCD updater:     on
20240217 144702 worker: --
20240217 144702 worker: -- Miscellaneous
20240217 144702 worker: --
20240217 144702 worker: Auto-CoverView:    off
20240217 144702 worker: CoverView timeout: Never
20240217 144702 worker: Auto-shuffle:      off
20240217 144702 worker: Auto-play:         off
20240217 144702 worker: Web SSH server:    on
20240217 144702 worker: Maintenance task:  360 mins
20240217 144702 worker: Current view:      reset to Playback
20240217 144702 worker: Session check:     ok
20240217 144702 worker: --
20240217 144702 worker: -- Startup complete
20240217 144702 worker: --
20240217 144702 worker: Mount monitor:    off
20240217 144702 worker: Radio monitor:    off
20240217 144702 worker: Watchdog monitor: started
20240217 144702 worker: Responsiveness:   Default
20240217 144702 worker: Ready
20240217 145219 worker: Job airplaysvc
20240217 145219 worker: Retry 1 stopping AirPlay
20240217 160256 worker: Job airplaysvc
20240217 160256 worker: Retry 1 stopping AirPlay


Thanks.


RE: Display bug when sending Airplay or Bluetooth to Moode - Tim Curtis - 02-17-2024

Couple things:

1. Bluetooth does not support metadata export.
2. AirPlay exports metadata but there is no code in moOde to process and display it. Maybe an interested dev will come up with something thats robust.
3. Spotify Connect exports a track ID that can be used to fetch metadata from its public website but there is no code in moOde to do this and in any case it's not a very robust approach. Nonetheless maybe an interested dev will come up with something.

There is a Prefs setting named "Renderer backdrop" and below is the (i) help:
"Display the image or cover backdrop instead of the semi-transparent dark overlay when a renderer is playing."



RE: Display bug when sending Airplay or Bluetooth to Moode - markmizu - 02-17-2024

Hi Tim,

Thanks. I suspected that was the case after I had a look through the GitHub repo.

So I'll have a look through the dev docs and get my head around how it all fits together. Shairport-sync has done most of the heavy lifting as its pulled the thumb and piped the metadata so there's potential to use that.

Much appreciated you taking time out of your weekend to respond.

Cheers.


RE: Display bug when sending Airplay or Bluetooth to Moode - Tim Curtis - 02-17-2024

I think there is a metadata reader in the shairport-sync repo. Getting the data into the WebUI is where the challenge lies but I'll be happy to provide some ideas.

Start with:

/var/local/www/commandw/spspre.sh and spspost.sh
/var/www/daemon/worker.php, function chkAplActive()
/var/www/js/playerlib.js, function engineCmd()

This will provide the sequence that occurs when an AirPlay client connects or disconnects and thereby causes the renderer overlay to be displayed/removed from the WebUI.


RE: Display bug when sending Airplay or Bluetooth to Moode - markmizu - 02-17-2024

Great!

Thanks for the pointers. I'll take a look.