I have a play node which works most of the time.
However, under the following circumstances, it does not.
Open Spotify on my Android phone, but do not press play on the phone
Press Play on Node-RED, it doesn't play
Press Play on the phone, and then stop on the phone
Press Play on Node-RED, now it works
AND
If I press Stop (either phone or Node-RED
Then wait 2 minutes
Play on Node-RED no longer works until I start and stop on the phone first.
It looks like the issue occurs only when the phone screen turns off.
I tested the same workflows using the web player on my laptop instead of the app on my phone, and the Node-RED play button starts the player. However, if I leave the web player paused for a longer time, then Node-RED no longer triggers play.
A useful diagnostic from the web player is that there is a button for selecting the playback device.
Initially it showed both the phone and web player as options.
If I turn the phone off, then eventually the list only shows the web player.
If I wait even longer with the web player paused, eventually it shows no available playback devices (not even itself!)
So, I think that there is an issue with Spotify removing the devices.
I used the spotify node to fetch the playback devices.
When the phone has been inactive for a while, it is not even listed in the devices returned via API.
I see that the device seems to have a permanent ID. Could I use the TransferPlayback to "re-awaken" the phone by ID and get the controls to respond again?
I have a play node which works most of the time. However, under the following circumstances, it does not.
AND
It looks like the issue occurs only when the phone screen turns off.
I tested the same workflows using the web player on my laptop instead of the app on my phone, and the Node-RED play button starts the player. However, if I leave the web player paused for a longer time, then Node-RED no longer triggers play.
A useful diagnostic from the web player is that there is a button for selecting the playback device. Initially it showed both the phone and web player as options. If I turn the phone off, then eventually the list only shows the web player. If I wait even longer with the web player paused, eventually it shows no available playback devices (not even itself!)
So, I think that there is an issue with Spotify removing the devices.
I used the spotify node to fetch the playback devices. When the phone has been inactive for a while, it is not even listed in the devices returned via API.
I see that the device seems to have a permanent ID. Could I use the TransferPlayback to "re-awaken" the phone by ID and get the controls to respond again?