Pulling this over from the other thread. Al, I will still do as you requested below, when I have some time. Maybe today, maybe next week. I want to set up a moOde server on a separate Rpi for testing this stuff. Earlier I was using my main "production" moode server for testing and messed it up a bit when I fat-fingered the php code. I was able to fix it, but I'd rather make those mistakes on a system that nobody in the home relies on.
_______________________________
Hi,
can you modify the /var/local/www/commandw/spotevent.sh and add the following lines, always, that is, before the very first IF
(then we need to change that script, because ATM for any event other than "started" or "stopped" it just exits... adding these lines before the test at least gets us how-and-when it gets called...)
echo "`date +%Y-%m-%dT%T.%N` - PLAYER_EVENT = ${PLAYER_EVENT}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - OLD_TRACK_ID = ${OLD_TRACK_ID}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - TRACK_ID = ${TRACK_ID}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - DURATION_MS = ${DURATION_MS}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - POSITION_MS = ${POSITION_MS}" >> /var/log/moode_spotevent.log
Then, cast some songs in Spotify, and also do the following:
1. play a song, wait for it to finish, and play the next song. After some time you can stop it.
2. play a song, halfway through select another one to play
3. play a playlist, at least two songs (or do as at point 1)
This to see how many times the script gets called; hopefully only one time per event (STOP / PLAYING / CHANGED)
Cheers, Al.
_______________________________
Hi,
can you modify the /var/local/www/commandw/spotevent.sh and add the following lines, always, that is, before the very first IF
(then we need to change that script, because ATM for any event other than "started" or "stopped" it just exits... adding these lines before the test at least gets us how-and-when it gets called...)
echo "`date +%Y-%m-%dT%T.%N` - PLAYER_EVENT = ${PLAYER_EVENT}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - OLD_TRACK_ID = ${OLD_TRACK_ID}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - TRACK_ID = ${TRACK_ID}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - DURATION_MS = ${DURATION_MS}" >> /var/log/moode_spotevent.log
echo "`date +%Y-%m-%dT%T.%N` - POSITION_MS = ${POSITION_MS}" >> /var/log/moode_spotevent.log
Then, cast some songs in Spotify, and also do the following:
1. play a song, wait for it to finish, and play the next song. After some time you can stop it.
2. play a song, halfway through select another one to play
3. play a playlist, at least two songs (or do as at point 1)
This to see how many times the script gets called; hopefully only one time per event (STOP / PLAYING / CHANGED)
Cheers, Al.