[PLUGIN] Now Playing

So I tried playing a podcast with the Podcast plugin and indeed, the seek timer keeps counting after the stream has finished playing.

After inspecting the code of the Podcast plugin, it appears that this is not due to a bug in Now Playing. Rather, it is due to the Podcast plugin not informing Volumio that playback has finished by pushing a ‘stop’ state, and you can see this through the player state in http://volumio/dev still showing status: "play".

It just so happens that Volumio’s web interface resets the seekbar position when it sees that the time has exceeded duration and stops incrementing the timer further. But if you look more closely, you will see that the Play button is still showing the Pause icon:

Whereas, if a ‘stop’ state is correctly registered, the UI would show the Play icon and a seek time of “0:00”:

I do not have the opportunity to test the Spotify Connect plugin because I do not have a Spotify account. Looking at the code, I suspect it also doesn’t send ‘stop’ states in scenarios where a song has finished playing, but I cannot be sure until I am able to actually test the plugin.

It just so happens that Volumio web interface resets the seekbar position when it sees that the time has exceeded duration and stops incrementing the timer further.

I will implement this in the next version of Now Playing. But to be honest, this is just an ugly workaround. I think it is the responsibility of the plugin to send the correct state to Volumio so that the frontend can display it. Having said that, I understand this is sometimes easier said than done, given Volumio’s lack of documentation on state handling / workflow and the statemachine is not exactly pleasant to work with…

Thank you Patrick for this feedback
Concerning spotifyconnect, the contats I make are the following:
the counter on the left works correctly during 2 or 3 songs, then it accumulates the durations without ever refreshing
if I do a refresh or a volume modification the counter becomes correct again for a few songs.

Perhaps a dumb question, but can someone share how people are downloading/installing the latest version given it is not in production? Are there instructions anywhere on how to do this? Or will this move to production soon?

  1. Go to http://volumio address/dev .
  2. Enable Plugins Test Mode.
  3. If you have previous version of plugin installed, you would have to uninstall it first (note: all plugin settings will be cleared).
  4. Restart Volumio.
  5. Go to plugin store. Under plugin you want to install, click “Details”.
  6. Choose a beta version to install.

moved question

Now Playing v0.3.6 uploaded to beta channel:

  1. Weather info on Idle Screen:
    • Previously, only 5 or 3 days of forecast are shown (depending on screen width). You can now scroll horizontally on the weather info area to see more days.
    • Added hourly weather forecast info (up to 48 hours). Click / tap on current weather to toggle between daily / hourly info (@ClaesM)

  1. Added plugin setting to hide the volume slider in Action Panel (also @ClaesM)

  2. Added maximize button to expand contents of Browse Screen and Queue when display width is 1024px and above (previously confined to 80% of width).

  3. Added plugin setting to change font size and color of Info View metadata (under “Text Styles”)

  4. Number of grid columns displayed on the Browse Screen is now more proportionate to the screen size.

  5. Implemented workaround in the seekbar for music services that don’t push ‘stop’ state when playback finishes, causing displayed seek time to overflow duration. @Christianrablay , would you mind testing (Spotify Connect, in particular)?

1 Like

Have you tried this:

Btw, I do not think this is the appropriate thread to post your issue. Other people wiith the same kit won’t be able to see your post because the Now Playing plugin has nothing to do with the 2nd OLED screen.

What do I do with the files on GitHub, save to the micro SD card? Thanks for the advice on moving my question. I deleted my query.

What I mean is you should start a new thread describing your issue so others can easily see it.

The instructions are given in the link:

You need to ssh into Volumio and run the commands given in the instructions. Follow this link if you don’t know how to use ssh:

https://volumio.github.io/docs/User_Manual/SSH.html

For convenience sake, I’ve listed the commands you need to run after you have done the ssh part. Just copy and paste each line after the $ sign into the ssh console. Each line corresponds to a command. Wait for the command to finish executing before proceeding to the next.

$ sudo apt-get update
$ git clone http://github.com/audiophonics/Evo_Sabre --branch oledv2.2 --single-branch 
$ cd Evo_Sabre
$ cd volumio
$ sudo bash install.sh

If you are prompted for a password, just enter volumio

Awesome Patrick! I will test the new features as soon as I get back home!
Best Regards /C

1 Like

Very, very good! :wink:

Hi Patrick!
You have really made this plugin work very well and it looks just awesome!
Thank you very very much for all your efforts!
//C

2 Likes

I have installed version 0.3.6. It works.
My findings:
For podcats, when this one stops, the counter stops too.
For spotify connect, it is more problematic. For the first two songs the counter is functional. Then, it returns to zero and does not move anymore. The total duration changes with each song, but the counter doesn’t move anymore.

Ok, I’ll mark the Spotify Connect issue as pending until I can borrow a Spotify account from a friend for testing.

1 Like

Hi Patrick!
I hope everything is ok with you? I have not any problems with spotify here…
one thing that I have a request for is to have some alternatives for weather forecast, Here in Sweden (where I live) is for ex SMHI the one that is most accurate… Just a Q, don´t want to give you a lot of troubles!
Anyway, You have created a Must Have Plugin!
Regards // C

2 Likes

Hi @patrickkfkan

First, congratulations on the plugin, it is fantastic.

I have been using it and now I have a problem.
Version 0.3.3 started not showing the information (track/artist/album).
I then updated to version 0.3.5 but I have the same problem.
I don’t know if the problem is here or with the plugin.
Tried in Chrome and Edge, both “up to date”
I also tried it on Chrome mobile (Samsung S20 FE).
Did not work.

Genius access token looks like is ok (figures attached in the end of this post).
Below, some system information (hardware and application log)
(sorry if it´s too long, I don´t know what I had to “filter”)

OS info
Version of Volumio: 3.251
Hostname: volumio
Kernel: 5.10.92-v7l+
Governor: performance
Uptime: 0 days, 0 Hrs, 46 Minutes, 48 Seconds

Audio info
Hw audio configured: E30
Mixer type: Hardware
Number of channels: 2
Supported sample rate: 44100 48000 88200 96000 176400 192000

Board info
Manufacturer: Raspberry Pi Foundation
Model: Raspberry Pi 4 Model B Rev 1.1
Version: c03111
Firmware Version: Jan 20 2022 13:56:48 - bd88f66f8952d34e4e0613a85c7a6d3da49e13e2

Starting Live Log…

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: CoreCommandRouter::executeOnPlugin: system , getHwuuid
info: CALLMETHOD: system_controller system enableLiveLog true
info: CoreCommandRouter::executeOnPlugin: system , enableLiveLog
info: Launching a new LiveLog session
info: CoreCommandRouter::volumioPlay

info: CoreStateMachine::play index undefined
info: CoreStateMachine::setConsumeUpdateService undefined
info: CorePlayQueue::getTrack 2
info: CoreStateMachine::startPlaybackTimer
info: CorePlayQueue::getTrack 2
info: ControllerMpd::resume

info:
---------------------------- MPD announces state update: player
info: sendMpdCommand play took 76 milliseconds
info: ControllerMpd::getState

info:
---------------------------- MPD announces state update: player
info: ControllerMpd::getState

info: sendMpdCommand status took 2 milliseconds


info:
---------------------------- MPD announces state update: player
info: ControllerMpd::getState

info:
---------------------------- MPD announces state update: player
info: ControllerMpd::getState

info: sendMpdCommand status took 5 milliseconds
info: sendMpdCommand playlistinfo took 5 milliseconds
info: sendMpdCommand status took 3 milliseconds
info: sendMpdCommand status took 2 milliseconds

info: ControllerMpd::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 2

info: CoreStateMachine::syncState stateService play
info: CoreStateMachine::syncState currentStatus pause
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: ------------------------------ 27ms
info: sendMpdCommand playlistinfo took 20 milliseconds
info: sendMpdCommand playlistinfo took 20 milliseconds
info: sendMpdCommand playlistinfo took 20 milliseconds

info: ControllerMpd::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 2

info: CoreStateMachine::syncState stateService play
info: CoreStateMachine::syncState currentStatus play
info: Received an update from plugin. extracting info from payload
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: ControllerMpd::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 2
:4365,“duration”:324,“samplerate”:“44.1 kHz”,“bitdepth”:“16 bit”,“channels”:2,“random”:false,“updatedb”:false,“repeat”:false,“bitrate”:“509 Kbps”,“isStreaming”:false,“title”:“Continuum”,“artist”:“Milestone Jazz Stars”,“album”:“In Concert”,“uri”:“NAS/hNAS/Milestone Jazz Stars In Concert (1989 Milestone) - 1978 - Sonny Rollins, McCoy Tyner, Ron Carter/03 - Continuum.flac”,“trackType”:“flac”}

info: CoreStateMachine::syncState stateService play
info: CoreStateMachine::syncState currentStatus play
info: Received an update from plugin. extracting info from payload
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: ControllerMpd::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 2


info: CoreStateMachine::syncState stateService play
info: CoreStateMachine::syncState currentStatus play
info: Received an update from plugin. extracting info from payload
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: ------------------------------ 71ms
info: ------------------------------ 69ms
info: ------------------------------ 69ms

info: CALLMETHOD: user_interface now_playing getPluginInfo undefined
info: CoreCommandRouter::executeOnPlugin: now_playing , getPluginInfo
info: Listing playlists
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: CoreCommandRouter::volumioGetVisibleSources
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

info: CoreCommandRouter::volumioGetState
info: CorePlayQueue::getTrack 2

Images

Thank you for your attention.

Regards,

Vagner.

Hi @mikane, I would suggest you delete the images with the Tokens.

Do not include the °N and °W in the coordinates. Are these shown on your Google Map?

image

I’m not sure if this is something temporary with the Genius service. Did you ever get it to work at some point in time? I’ve been having no problems so far…

1 Like

Sorry, I don’t think I will add SMHI to the weather service. The reason I chose OpenWeatherMap is because it provides global data and its API is dead simple to use. I agree its forecasts are slightly different than what the local stations provide, but I think I can live with it for now.

1 Like

Great plugin! Thank you for your work and dedication!

Is there a way to save the settings during an update? I’ve been searching but no luck…
Thanks