[PLUGIN] Pandora Plugin 2.0

Hi Glenn :slight_smile:

Last summer, I did a lot of development over a short period of time. Along the way, there were several bugs and improvements introduced. I hope that most of them have been addressed, however there are a few more that I have to work on.

One of them was mentioned by @downtownHippie and I’m not sure how to address that at the moment. Another one that I know of is that the first tracks grabbed are duplicated when the program starts. I just haven’t had a chance to dive into that second bug yet.

I believe that version 2.9.2 is the most current – that’s what I have here locally. Can you give that version a try? You should be able to update to it from the main Volumio menu. Failing that, you can just grab the source from my GitHub repo.

What you are doing looks interesting. Please fill us all in on your progress!

Sorry 2.0.9 was a typo, I am running the latest version 2.9.2.

I also use the Spotify Plugin 2.0.3 version and it is working fine with the same SocketIO call to load the Json file that is returned by the same “browse” function. I also changed the socket call to replaceAndPlay:

image

sio.emit(“replaceAndPlay”,{“service”:“spop”,“type”:“playlist”,“title”:“Electronic Pop”,“albumart”:“https://mosaic.scdn.co/640/ab67616d0000b2731a104e8630a97b573201f655ab67616d0000b2738863bc11d2aa12b54f5aeb36ab67616d0000b273aae542061ac42ee04779fb2fab67616d0000b273be969b70f5ad29a3ba54d8ee",“uri”:"spotify:user:spotify:playlist:4KzBvM3Ux7tdwT6voutjZH”})

HTH
Glenn

@GlennBurnett Take a look at this output from the plugin:

Oct 12 16:50:43 volumio volumio[970]: info: [1634071843533] ControllerPandora::PandoraHandler::fetchTracks::fetchStationPlaylist
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::volumioGetState
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: Listing playlists
Oct 12 16:50:44 volumio volumio[970]: info: Listing playlists
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844578] [Pandora] PandoraHandler::fetchTracks::fetchStationPlaylist: Retrieved Tool playlist
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844580] ControllerPandora::PandoraHandler::fetchTracks::fillNewTracks
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844582] [Pandora] PandoraHandler::fetchTracks::fillNewTracks: Fetched 4 track(s)
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::addQueueItems
Oct 12 16:50:44 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=5698634996614699141
Oct 12 16:50:44 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=5698634996614699141 in service pandora
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844586] ControllerPandora::explodeUri
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=7172386784749455536
Oct 12 16:50:44 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=7172386784749455536 in service pandora
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844587] ControllerPandora::explodeUri
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=1076112715076876425
Oct 12 16:50:44 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=1076112715076876425 in service pandora
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844588] ControllerPandora::explodeUri
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=615023797295767538
Oct 12 16:50:44 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=615023797295767538 in service pandora
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844589] ControllerPandora::explodeUri
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::saveQueue
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::volumioPushQueue
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::updateTrackBlock
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrackBlock
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::play index 0
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::stop
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 16:50:44 volumio volumio[970]: UNSET VOLATILE
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::play index undefined
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::startPlaybackTimer
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844613] ControllerPandora::clearAddPlayTrack
Oct 12 16:50:44 volumio volumio[970]: info: ControllerMpd::clear
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand clear
Oct 12 16:50:44 volumio volumio[970]: info:
Oct 12 16:50:44 volumio volumio[970]: ---------------------------- MPD announces system playlist update
Oct 12 16:50:44 volumio volumio[970]: info: Ignoring MPD Status Update
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844628] ControllerPandora::checkForExpiredStations
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844630] ControllerPandora::removeTrack
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844630] [Pandora] removeTrack: Not removing track with uri: null at queue index: -1
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844631] [Pandora] MQTTHandler::publishData: Published stationName to mqtt://192.168.1.50:1883 topic: volumio/pandora/stationName
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844632] ControllerPandora::appendTracksToMpd
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844633] [Pandora] appendTracksToMpd: Added 1 track(s) to mpd
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand addid
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand play
Oct 12 16:50:44 volumio volumio[970]: error: updateQueue error: null
Oct 12 16:50:44 volumio volumio[970]: info:
Oct 12 16:50:44 volumio volumio[970]: ---------------------------- MPD announces system playlist update
Oct 12 16:50:44 volumio volumio[970]: info: Ignoring MPD Status Update
Oct 12 16:50:44 volumio volumio[970]: info: ------------------------------ 29ms
Oct 12 16:50:44 volumio volumio[970]: verbose: MPD COMMAND [object Object]
Oct 12 16:50:44 volumio volumio[970]: verbose: MPD COMMAND [object Object]
Oct 12 16:50:44 volumio volumio[970]: verbose: MPD COMMAND [object Object]
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844657] ControllerPandora::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::servicePushState
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: verbose: STATE SERVICE {"service":"pandora","type":"song","trackType":"mp3","title":"Vicarious","name":"Vicarious","artist":"TOOL","album":"10,000 Days (Explicit)","albumart":"http://mediaserver-cont-usc-mp1-1-v4v6.pandora.com/images/d7/1c/d0/03/90ad4c318d7aed0c6c908cdd/1080W_1080H.jpg","realUri":"http://t1-5.p-cdn.us/access/5698634996614699141.mp3?version=5&lid=75770519&token=uhNcISNHWDNLy2haT3Raai%2Fqcr%2F7HaWgjrwGI67LauwHOraakhIlR5UhG1GGfbcXimYKioCZqRkaKcGq3hWinc%2Bi%2Bl3GF4U7duU5kdbdJLtXxXacuWYH5VBpNxSEyCmZu1Bz0fgato6aOBjfdgPtVdd%2Bx2EhOz9r35GVkOtCokrGzUu7mceZVMNnM5ZSWC%2F8Z1UmDhifpdNHVUokyd4b1gYt8zVGdK%2B8ApGnt8U8DonzPsRult0wMbTuyigOv5aOgYwhfWRfSOM7kx4%2FHsyPnDzdqgAt0a6mPIsgxE2Tfoh%2FvDzDm%2FsovKl1%2F43bpApufC%2FeIfsf7%2Bqg5EixLsEyzQ%3D%3D","isStreaming":true,"duration":426,"samplerate":"44.1 KHz","bitdepth":"16 bit","channels":2,"uri":"http://t1-5.p-cdn.us/access/5698634996614699141.mp3?version=5&lid=75770519&token=uhNcISNHWDNLy2haT3Raai%2Fqcr%2F7HaWgjrwGI67LauwHOraakhIlR5UhG1GGfbcXimYKioCZqRkaKcGq3hWinc%2Bi%2Bl3GF4U7duU5kdbdJLtXxXacuWYH5VBpNxSEyCmZu1Bz0fgato6aOBjfdgPtVdd%2Bx2EhOz9r35GVkOtCokrGzUu7mceZVMNnM5ZSWC%2F8Z1UmDhifpdNHVUokyd4b1gYt8zVGdK%2B8ApGnt8U8DonzPsRult0wMbTuyigOv5aOgYwhfWRfSOM7kx4%2FHsyPnDzdqgAt0a6mPIsgxE2Tfoh%2FvDzDm%2FsovKl1%2F43bpApufC%2FeIfsf7%2Bqg5EixLsEyzQ%3D%3D","seek":0,"status":"play"}
Oct 12 16:50:44 volumio volumio[970]: verbose: CURRENT POSITION 0
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::syncState   stateService play
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::syncState   currentStatus stop
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::volumioPushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::setConsumeUpdateService pandora
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844673] ControllerPandora::fetchAndAddTracks
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844674] ControllerPandora::getStationTracks
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844676] [Pandora] PandoraHandler::getSongMaxDiff: -12
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844677] ControllerPandora::fetchAndAddTracks::getSqInfo
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844677] ControllerPandora::getStationTracks
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844680] [Pandora] fetchAndAddTracks: diff1: -12 sQPos1: 0
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844680] [Pandora] fetchAndAddTracks: Fetching tracks
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844681] ControllerPandora::PandoraHandler::fillStationData
Oct 12 16:50:44 volumio volumio[970]: error: Upnp client error: Error: This socket has been ended by the other party
Oct 12 16:50:44 volumio volumio[970]: info:
Oct 12 16:50:44 volumio volumio[970]: ---------------------------- MPD announces system playlist update
Oct 12 16:50:44 volumio volumio[970]: info: Ignoring MPD Status Update
Oct 12 16:50:44 volumio volumio[970]: info: ------------------------------ 42ms
Oct 12 16:50:44 volumio volumio[970]: info: ------------------------------ 5ms
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844887] ControllerPandora::pandoraListener
Oct 12 16:50:44 volumio volumio[970]: info: ControllerMpd::getState
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand status
Oct 12 16:50:44 volumio volumio[970]: info:
Oct 12 16:50:44 volumio volumio[970]: ---------------------------- MPD announces state update: player
Oct 12 16:50:44 volumio volumio[970]: info: ControllerMpd::getState
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand status
Oct 12 16:50:44 volumio volumio[970]: info:
Oct 12 16:50:44 volumio volumio[970]: ---------------------------- MPD announces state update: player
Oct 12 16:50:44 volumio volumio[970]: info: ControllerMpd::getState
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand status
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::parseState
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand playlistinfo
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::parseState
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand playlistinfo
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::parseState
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::sendMpdCommand playlistinfo
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::parseTrackInfo
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: [1634071844921] ControllerPandora::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::servicePushState
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: verbose: STATE SERVICE {"status":"play","position":0,"seek":0,"duration":427,"samplerate":"44.1 KHz","bitdepth":"16 bit","channels":2,"random":false,"updatedb":false,"repeat":false,"bitrate":null,"isStreaming":false,"title":"Vicarious","artist":"TOOL","album":"10,000 Days (Explicit)","uri":"http://t1-5.p-cdn.us/access/5698634996614699141.mp3?version=5&lid=75770519&token=uhNcISNHWDNLy2haT3Raai%2Fqcr%2F7HaWgjrwGI67LauwHOraakhIlR5UhG1GGfbcXimYKioCZqRkaKcGq3hWinc%2Bi%2Bl3GF4U7duU5kdbdJLtXxXacuWYH5VBpNxSEyCmZu1Bz0fgato6aOBjfdgPtVdd%2Bx2EhOz9r35GVkOtCokrGzUu7mceZVMNnM5ZSWC%2F8Z1UmDhifpdNHVUokyd4b1gYt8zVGdK%2B8ApGnt8U8DonzPsRult0wMbTuyigOv5aOgYwhfWRfSOM7kx4%2FHsyPnDzdqgAt0a6mPIsgxE2Tfoh%2FvDzDm%2FsovKl1%2F43bpApufC%2FeIfsf7%2Bqg5EixLsEyzQ%3D%3D","trackType":"mp3"}
Oct 12 16:50:44 volumio volumio[970]: verbose: CURRENT POSITION 0
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::syncState   stateService play
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::syncState   currentStatus play
Oct 12 16:50:44 volumio volumio[970]: info: Received an update from plugin. extracting info from payload
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::volumioPushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::volumioPushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::setConsumeUpdateService pandora
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::parseTrackInfo
Oct 12 16:50:44 volumio volumio[970]: verbose: ControllerMpd::parseTrackInfo
Oct 12 16:50:44 volumio volumio[970]: info: ControllerMpd::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::servicePushState
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: CONSUME SERVICE: Received update from a service different from the one supposed to be playing music. Skipping notification. Current pandora Received mpd
Oct 12 16:50:44 volumio volumio[970]: info: ControllerMpd::pushState
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::servicePushState
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getTrack 0
Oct 12 16:50:44 volumio volumio[970]: info: CONSUME SERVICE: Received update from a service different from the one supposed to be playing music. Skipping notification. Current pandora Received mpd
Oct 12 16:50:44 volumio volumio[970]: info: ------------------------------ 51ms
Oct 12 16:50:44 volumio volumio[970]: info: ------------------------------ 35ms
Oct 12 16:50:44 volumio volumio[970]: info: CoreCommandRouter::volumioGetQueue
Oct 12 16:50:44 volumio volumio[970]: info: CoreStateMachine::getQueue
Oct 12 16:50:44 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845087] ControllerPandora::PandoraHandler::publishStationData
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845089] [Pandora] MQTTHandler::publishData: Published stationData to mqtt://192.168.1.50:1883 topic: volumio/pandora/stationData
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845090] ControllerPandora::PandoraHandler::fetchTracks::fetchStationPlaylist
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845835] [Pandora] PandoraHandler::fetchTracks::fetchStationPlaylist: Retrieved Tool playlist
Oct 12 16:50:45 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845836] ControllerPandora::PandoraHandler::fetchTracks::fillNewTracks
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845837] [Pandora] PandoraHandler::fetchTracks::fillNewTracks: Fetched 4 track(s)
Oct 12 16:50:45 volumio volumio[970]: info: CorePlayQueue::addQueueItems
Oct 12 16:50:45 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=5144226752569024224
Oct 12 16:50:45 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=5144226752569024224 in service pandora
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845840] ControllerPandora::explodeUri
Oct 12 16:50:45 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:45 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=7621890671420772159
Oct 12 16:50:45 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=7621890671420772159 in service pandora
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845841] ControllerPandora::explodeUri
Oct 12 16:50:45 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:45 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=673488620818230663
Oct 12 16:50:45 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=673488620818230663 in service pandora
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845843] ControllerPandora::explodeUri
Oct 12 16:50:45 volumio volumio[970]: info: CorePlayQueue::getQueue
Oct 12 16:50:45 volumio volumio[970]: info: Adding Item to queue: /pandora/stationToken=2614581235804285591trackId=1363981088989761575
Oct 12 16:50:45 volumio volumio[970]: info: Exploding uri /pandora/stationToken=2614581235804285591trackId=1363981088989761575 in service pandora
Oct 12 16:50:45 volumio volumio[970]: info: [1634071845845] ControllerPandora::explodeUri

My memory of this is hazy, but as the output shows, individual station tracks are added to the queue, not pandora stations. The plugin fetches the tracks as needed.

Try adding stations this way:

/pandora/stationToken=23

From common.js:

handleBrowseUri is looking for this regular expression match (imported as uriStaRE – short for uri Station RegEx).

/\/pandora\/stationToken=(\d+)/

That number should correspond to the station’s numerical position in the array / list / whatever you call it :slight_smile:

Good luck and please report back!

I am passing the station token that I get back from the browse API. I tried to replace it with the numerical value of the position in the list, but that did not work either.

In both journalctl logs you see it attempts to explode the URI, but from the API call it seems unsuccessful, from the UI it is working.

Let me know if I can provide any more information.

Thanks!!

Here is the browse results from the API: http://volumiodev:3000/api/V1/browse?uri=/pandora

{"navigation":{"prev":{"uri":"/pandora"},"lists":[{"availableListViews":["list"],"items":[
{"service":"pandora","type":"station","title":"Puscifer Radio","name":"Puscifer Radio","albumart":"https://content-images.p-cdn.com/images/a9/33/69/c2/5cb84edcaecf90076ba3c034/_500W_500H.jpg","icon":"fa fa-folder-open-o","uri":"/pandora/stationToken=3583959267178674503"}

Here is my Python code:

def playPandora2():
    service = "Pandora2"
    
    sio = SocketIO('localhost', 3000)
    sio.emit("clearQueue", "")
    #sio.emit("replaceAndPlay",{"service":"pandora","type":"station","artist":"","title":"Polo G Radio","name":"Polo G Radio","album":"","albumart":"https://content-images.p-cdn.com/images/e8/0d/e7/9a/54b147d2b2282c7d5b4081ad/_500W_500H.jpg","icon":"fa fa-folder-open-o","uri":"/pandora/station_id=1"})
    sio.emit("replaceAndPlay",{"service":"pandora","type":"station","title":"Puscifer Radio","name":"Puscifer Radio","albumart":"https://content-images.p-cdn.com/images/a9/33/69/c2/5cb84edcaecf90076ba3c034/_500W_500H.jpg","icon":"fa fa-folder-open-o","uri":"/pandora/stationToken=3583959267178674503"})
    
    sio.disconnect()
    return service

Here is loading the above stationToken from the Volumio UI journalctl:

Logs begin at Tue 2021-10-12 02:33:01 MST. --
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:39:56 volumiodev python3[11783]: 192.168.4.27 - - [12/Oct/2021 15:39:56] "GET /favicon.ico HTTP/1.1" 404 -
Oct 12 15:41:20 volumiodev smbd[23580]: [2021/10/12 15:41:20.085559,  0] ../lib/util/debug.c:603(reopen_logs_internal)
Oct 12 15:41:20 volumiodev smbd[23580]: Unable to open new log file '/var/log/samba/log.smbd': No such file or directory
Oct 12 15:41:58 volumiodev volumio[1255]: error: error
Oct 12 15:42:30 volumiodev smbd[5567]: [2021/10/12 15:42:30.121777,  0] ../lib/util/debug.c:603(reopen_logs_internal)
Oct 12 15:42:30 volumiodev smbd[5567]: Unable to open new log file '/var/log/samba/log.smbd': No such file or directory
Oct 12 15:42:48 volumiodev volumio[1255]: error: error
Oct 12 15:44:01 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: pandora , handleBrowseUri
Oct 12 15:44:01 volumiodev volumio[1255]: info: [1634078641856] ControllerPandora::handleBrowseUri
Oct 12 15:44:01 volumiodev volumio[1255]: info: [1634078641856] ControllerPandora::checkForExpiredStations
Oct 12 15:44:01 volumiodev volumio[1255]: info: [1634078641857] [Pandora] checkForExpiredStations: Stations expired
Oct 12 15:44:01 volumiodev volumio[1255]: info: [1634078641857] ControllerPandora::PandoraHandler::fillStationData
Oct 12 15:44:05 volumiodev volumio[1255]: info: [1634078645463] ControllerPandora::PandoraHandler::fillStationData
Oct 12 15:44:05 volumiodev volumio[1255]: info: [1634078645789] ControllerPandora::PandoraHandler::fetchTracks::fetchStationPlaylist
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646329] [Pandora] PandoraHandler::fetchTracks::fetchStationPlaylist: Retrieved Puscifer Radio playlist
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646329] ControllerPandora::PandoraHandler::fetchTracks::fillNewTracks
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646330] [Pandora] PandoraHandler::fetchTracks::fillNewTracks: Fetched 4 track(s)
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::addQueueItems
Oct 12 15:44:06 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=1484830872071778748
Oct 12 15:44:06 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=1484830872071778748 in service pandora
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646331] ControllerPandora::explodeUri
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=6437276833028140361
Oct 12 15:44:06 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=6437276833028140361 in service pandora
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646332] ControllerPandora::explodeUri
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=6282539889401606192
Oct 12 15:44:06 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=6282539889401606192 in service pandora
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646333] ControllerPandora::explodeUri
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=2008636039658067951
Oct 12 15:44:06 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=2008636039658067951 in service pandora
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646334] ControllerPandora::explodeUri
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::updateTrackBlock
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrackBlock
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::play index 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::stop
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::play index undefined
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::startPlaybackTimer
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646351] ControllerPandora::clearAddPlayTrack
Oct 12 15:44:06 volumiodev volumio[1255]: info: ControllerMpd::clear
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand clear
Oct 12 15:44:06 volumiodev volumio[1255]: info:
Oct 12 15:44:06 volumiodev volumio[1255]: ---------------------------- MPD announces system playlist update
Oct 12 15:44:06 volumiodev volumio[1255]: info: Ignoring MPD Status Update
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand clear took 7 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646360] ControllerPandora::checkForExpiredStations
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646360] ControllerPandora::removeTrack
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646361] [Pandora] removeTrack: Not removing track with uri: null at queue index: -1
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646361] ControllerPandora::appendTracksToMpd
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646361] [Pandora] appendTracksToMpd: Added 1 track(s) to mpd
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand addid
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand play
Oct 12 15:44:06 volumiodev volumio[1255]: error: updateQueue error: null
Oct 12 15:44:06 volumiodev volumio[1255]: info:
Oct 12 15:44:06 volumiodev volumio[1255]: ---------------------------- MPD announces system playlist update
Oct 12 15:44:06 volumiodev volumio[1255]: info: Ignoring MPD Status Update
Oct 12 15:44:06 volumiodev volumio[1255]: info: ------------------------------ 14ms
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand addid took 10 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand play took 9 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: MPD COMMAND [object Object]
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: MPD COMMAND [object Object]
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: MPD COMMAND [object Object]
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646375] ControllerPandora::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::servicePushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: STATE SERVICE {"service":"pandora","type":"song","trackType":"mp3","title":"The Mission (M Is For Milla Mix)","name":"The Mission (M Is For Milla Mix)","artist":"Puscifer","album":"Sound Into Blood Into Wine","albumart":"http://mediaserver-cont-usc-mp1-2-v4v6.pandora.com/images/66/1b/37/e1/11dc40a5870a2c2ca9e76975/1080W_1080H.jpg","realUri":"http://t1-4.p-cdn.us/access/1484830872071778748.mp3?version=5&lid=27752775&token=pNehErphfUgrjGEPodoD8QJ2UoRy17ZdBQaj1WUSdqX3j9EgDfft042%2FWQFoTP9oO4z9zAGMoagc8h8d014ByBmm8db5%2BDBXQcjHB550zjnVW8EQbZ%2B%2FFcooAVWKvWTY%2BQunElYYeQdlUVdp6TDdEHVNnYgbp%2B8mtbRoOs7FSinX7Kyb7Qb%2FDfyOHVA9JDrmdJ%2BKharvLmVxd%2BvxxW8Y6USTh8JN4JU0jJQ%2FdzHc2nEbT170VcvAFs3ivyQ3oeimrCUxdCeRLlhmczFsnG5NoLeznYEs225II9D6B2rXjuRyzGmKcOP1na32kJZRn1Y7taN%2B90jKhBR2U9DKmW9ncg%3D%3D","isStreaming":true,"duration":224,"samplerate":"44.1 KHz","bitdepth":"16 bit","channels":2,"uri":"http://t1-4.p-cdn.us/access/1484830872071778748.mp3?version=5&lid=27752775&token=pNehErphfUgrjGEPodoD8QJ2UoRy17ZdBQaj1WUSdqX3j9EgDfft042%2FWQFoTP9oO4z9zAGMoagc8h8d014ByBmm8db5%2BDBXQcjHB550zjnVW8EQbZ%2B%2FFcooAVWKvWTY%2BQunElYYeQdlUVdp6TDdEHVNnYgbp%2B8mtbRoOs7FSinX7Kyb7Qb%2FDfyOHVA9JDrmdJ%2BKharvLmVxd%2BvxxW8Y6USTh8JN4JU0jJQ%2FdzHc2nEbT170VcvAFs3ivyQ3oeimrCUxdCeRLlhmczFsnG5NoLeznYEs225II9D6B2rXjuRyzGmKcOP1na32kJZRn1Y7taN%2B90jKhBR2U9DKmW9ncg%3D%3D","seek":0,"status":"play"}
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: CURRENT POSITION 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::syncState   stateService play
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::syncState   currentStatus stop
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService pandora
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646384] ControllerPandora::fetchAndAddTracks
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646385] ControllerPandora::getStationTracks
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646385] [Pandora] PandoraHandler::getSongMaxDiff: -12
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646386] ControllerPandora::fetchAndAddTracks::getSqInfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646387] ControllerPandora::getStationTracks
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646388] [Pandora] fetchAndAddTracks: diff1: -12 sQPos1: 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646388] [Pandora] fetchAndAddTracks: Fetching tracks
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646388] ControllerPandora::PandoraHandler::fillStationData
Oct 12 15:44:06 volumiodev volumio[1255]: info:
Oct 12 15:44:06 volumiodev volumio[1255]: ---------------------------- MPD announces system playlist update
Oct 12 15:44:06 volumiodev volumio[1255]: info: Ignoring MPD Status Update
Oct 12 15:44:06 volumiodev volumio[1255]: info: ------------------------------ 28ms
Oct 12 15:44:06 volumiodev volumio[1255]: info: ------------------------------ 17ms
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646526] ControllerPandora::pandoraListener
Oct 12 15:44:06 volumiodev volumio[1255]: info: ControllerMpd::getState
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand status
Oct 12 15:44:06 volumiodev volumio[1255]: info:
Oct 12 15:44:06 volumiodev volumio[1255]: ---------------------------- MPD announces state update: player
Oct 12 15:44:06 volumiodev volumio[1255]: info: ControllerMpd::getState
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand status
Oct 12 15:44:06 volumiodev volumio[1255]: info:
Oct 12 15:44:06 volumiodev volumio[1255]: ---------------------------- MPD announces state update: player
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand status took 3 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: info: ControllerMpd::getState
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand status
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand status took 3 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::parseState
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand playlistinfo
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::parseState
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand playlistinfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand status took 5 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand playlistinfo took 4 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand playlistinfo took 3 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::parseState
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::sendMpdCommand playlistinfo
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::parseTrackInfo
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::parseTrackInfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646541] ControllerPandora::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::servicePushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: STATE SERVICE {"status":"play","position":0,"seek":116,"duration":224,"samplerate":"44.1 KHz","bitdepth":"16 bit","channels":2,"random":false,"updatedb":false,"repeat":false,"bitrate":"128 Kbps","isStreaming":false,"title":"The Mission (M Is For Milla Mix)","artist":"Puscifer","album":"Sound Into Blood Into Wine","uri":"http://t1-4.p-cdn.us/access/1484830872071778748.mp3?version=5&lid=27752775&token=pNehErphfUgrjGEPodoD8QJ2UoRy17ZdBQaj1WUSdqX3j9EgDfft042%2FWQFoTP9oO4z9zAGMoagc8h8d014ByBmm8db5%2BDBXQcjHB550zjnVW8EQbZ%2B%2FFcooAVWKvWTY%2BQunElYYeQdlUVdp6TDdEHVNnYgbp%2B8mtbRoOs7FSinX7Kyb7Qb%2FDfyOHVA9JDrmdJ%2BKharvLmVxd%2BvxxW8Y6USTh8JN4JU0jJQ%2FdzHc2nEbT170VcvAFs3ivyQ3oeimrCUxdCeRLlhmczFsnG5NoLeznYEs225II9D6B2rXjuRyzGmKcOP1na32kJZRn1Y7taN%2B90jKhBR2U9DKmW9ncg%3D%3D","trackType":"mp3"}
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: CURRENT POSITION 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::syncState   stateService play
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::syncState   currentStatus play
Oct 12 15:44:06 volumiodev volumio[1255]: info: Received an update from plugin. extracting info from payload
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService pandora
Oct 12 15:44:06 volumiodev volumio[1255]: info: ControllerMpd::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::servicePushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CONSUME SERVICE: Received update from a service different from the one supposed to be playing music. Skipping notification. Current pandora Received mpd
Oct 12 15:44:06 volumiodev volumio[1255]: info: ------------------------------ 34ms
Oct 12 15:44:06 volumiodev volumio[1255]: info: sendMpdCommand playlistinfo took 24 milliseconds
Oct 12 15:44:06 volumiodev volumio[1255]: verbose: ControllerMpd::parseTrackInfo
Oct 12 15:44:06 volumiodev volumio[1255]: info: ControllerMpd::pushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::servicePushState
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:44:06 volumiodev volumio[1255]: info: CONSUME SERVICE: Received update from a service different from the one supposed to be playing music. Skipping notification. Current pandora Received mpd
Oct 12 15:44:06 volumiodev volumio[1255]: info: ------------------------------ 35ms
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreCommandRouter::volumioGetQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CoreStateMachine::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646704] ControllerPandora::PandoraHandler::fetchTracks::fetchStationPlaylist
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647220] [Pandora] PandoraHandler::fetchTracks::fetchStationPlaylist: Retrieved Puscifer Radio playlist
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647222] ControllerPandora::PandoraHandler::fetchTracks::fillNewTracks
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647226] [Pandora] PandoraHandler::fetchTracks::fillNewTracks: Fetched 4 track(s)
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::addQueueItems
Oct 12 15:44:07 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=8522279127336170882
Oct 12 15:44:07 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=8522279127336170882 in service pandora
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647231] ControllerPandora::explodeUri
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=6974328891770073459
Oct 12 15:44:07 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=6974328891770073459 in service pandora
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647234] ControllerPandora::explodeUri
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=1144245746049276676
Oct 12 15:44:07 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=1144245746049276676 in service pandora
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647235] ControllerPandora::explodeUri
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=7542407005084485367
Oct 12 15:44:07 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=7542407005084485367 in service pandora
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647236] ControllerPandora::explodeUri
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: CoreStateMachine::updateTrackBlock
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getTrackBlock
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647255] ControllerPandora::getStationTracks
Oct 12 15:44:07 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:44:07 volumiodev volumio[1255]: info: [1634078647256] [Pandora] PandoraHandler::getSongMaxDiff: -8
^C

Here is the logging from loading from my code journalctl:

Oct 12 15:39:38 volumiodev systemd-timesyncd[379]: interval/delta/delay/jitter/drift 2048s/-0.000s/0.165s/0.001s/-2ppm
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioClearQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::ClearQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::stop
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::clearPlayQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushState
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioReplaceandPlayItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::ClearQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::stop
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::clearPlayQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:39:56 volumiodev python3[11783]: 192.168.4.27 - - [12/Oct/2021 15:39:56] "GET /pandora2/ HTTP/1.1" 200 -
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushState
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::addQueueItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::addQueueItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=4699546528046872903
Oct 12 15:39:56 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=4699546528046872903 in service pandora
Oct 12 15:39:56 volumiodev volumio[1255]: info: [1634078396223] ControllerPandora::explodeUri
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioReplaceandPlayItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::ClearQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::stop
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::clearPlayQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushState
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::addQueueItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::addQueueItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503
Oct 12 15:39:56 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503 in service pandora
Oct 12 15:39:56 volumiodev volumio[1255]: info: [1634078396227] ControllerPandora::explodeUri
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::saveQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPushQueue
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::updateTrackBlock
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getTrackBlock
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::updateTrackBlock
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getTrackBlock
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPlay
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::play index 0
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreCommandRouter::volumioPlay
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::play index 0
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::stop
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::stop
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: verbose: UNSET VOLATILE
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::play index undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::play index undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::setConsumeUpdateService undefined
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::getTrack 0

It looks like Volumio is trying to push the uri of the Station to the Volumio Queue

Oct 12 15:39:56 volumiodev volumio[1255]: info: CoreStateMachine::addQueueItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: CorePlayQueue::addQueueItems
Oct 12 15:39:56 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=4699546528046872903
Oct 12 15:39:56 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=4699546528046872903 in service pandora
Oct 12 15:39:56 volumiodev volumio[1255]: info: [1634078396223] ControllerPandora::explodeUri

rather than the individual tracks as shown in your output here:

Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646329] ControllerPandora::PandoraHandler::fetchTracks::fillNewTracks
Oct 12 15:44:06 volumiodev volumio[1255]: info: [1634078646330] [Pandora] PandoraHandler::fetchTracks::fillNewTracks: Fetched 4 track(s)
Oct 12 15:44:06 volumiodev volumio[1255]: info: CorePlayQueue::addQueueItems
Oct 12 15:44:06 volumiodev volumio[1255]: info: Adding Item to queue: /pandora/stationToken=3583959267178674503trackId=1484830872071778748
Oct 12 15:44:06 volumiodev volumio[1255]: info: Exploding uri /pandora/stationToken=3583959267178674503trackId=1484830872071778748 in service pandora

It seems like we need to get Volumio to “Browse to this Uri” rather than “Add raw Uri to Volumio Queue”.

I suppose either the fetchTracks plugin function needs to be exposed and called every so often, or somehow start the plugin so it does it automatically and then would have to be stopped somehow, perhaps with a different Volumio API call.

The first one could be done but you would have to make multiple API calls, perhaps on a timer or on some signal that Volumio or the plugin would emit. Perhaps you could make a plugin API call to the fetchTracks function. I am fairly certain I could expose that function for you and the relevant track data through an API call, either via MQTT or an alternate method.

The second would just run and run, I suppose, as the plugin does. There would be less intervention but also less information returned.

What do you think?

This code here from index.js could be moved to a separate function. If this function were exposed, I think the “plugin loop” would start rolling along and then would have to be stopped somehow.

else if (curUri.match(uriStaRE) !== null) {
    const stationToken = curUri.match(uriStaRE)[1];

    return checkForStationChange(stationToken)
        .then(() => self.pandoraHandler.fetchTracks())
        .then(() => {
            self.lastUri = null;
            self.cameFromMenu = true;

            return self.pandoraHandler.getNewTracks()
                .then(newTracks => {
                    if (newTracks.length > 0) {
                        return self.commandRouter.stateMachine.playQueue.addQueueItems(newTracks)
                            .then(() => self.getQueueIndex(newTracks[0].uri))
                            .then(index => {
                                self.setCurrQueuePos(index);
                                return self.commandRouter.stateMachine.play(index);
                            });
                    }

                    self.commandRouter.pushToastMessage('error', 'Pandora',
                    'Failed to load tracks from ' + self.currStation.name);

                    return self.pUtil.generalReject(fnName, 'Failed to load tracks from ' +
                        self.currStation.name);
                });
        });
}

Hi Truckershitch,

Your post led me to browse the individual stationToken manually (via the browse API):

http://volumiodev:3000/api/V1/browse?uri=/pandora/stationToken=3583959267178674503

Initially I expected to get a list of tracks in that station that I would then have to load manually, however it actually loaded the first 5 tracks and started playing them (with no response back to the API call). That is the functionality I was looking for. If I skip to the next track it loads additional tracks as expected.

This is unexpected behavior, however I can support it in my code and no additional work for you and easier for me since I don’t have to manually add tracks. I will play with this but it seems that it is loading additional track and expiring tracks as expected. The only issue I can see is if this behavior changes in the future.

Thanks for the great plugin and pointing me in the right direction. One suggested feature is to intercept the “Add to Favorites” (the heart) and send a thumbs up to Pandora. The favorited function does not do anything currently.

Glenn

Hey, no problem! I’m glad to help.

Your suggestion is a good one. I’ll see what I can do there. I have “thumbs down” in the code already. The tricky bit is figuring out the Favorites trigger. :slight_smile:

I haven’t looked at this code in a few months. Every time I do, I have to revisit JavaScript all over again as I don’t have much experience with it. It’s always an adventure.