info-beamer

Scheduler Skipping Playlists

Hello,

I’ve added “Always Scheduled” Playlists and scheduled playlists and have found the scheduler skips one or more playlists when a scheduled event has occurred on a playlist with a scheduled time interval. Even if you duplicate the playlist with a scheduled time interval it will still skip all following scheduled playlists regardless of their time interval and go back to the beginning. I’ve tried multiple arrangements of schedules and ordering but there seems to be a bug in the way the plugin continues after a scheduled playlist time interval triggers the associated playlist.

The scheduler is the only useful plugin for us. If there isn’t a solution we wouldn’t have any use for Info-Beamer.

Before looking into possible reasons, I want to ensure I properly understand what you’re seeing:

Given these four playlists configured in a setup:

List 1 | Always scheduled
List 2 | Always scheduled
List 3 | Time interval scheduled
List 4 | Always scheduled

from what I understand you observe playback with the following order assuming the List 3 interval matches the current time:

List 1, List 2, List 3, List 1, List 2, List 3, ...

With List 4 not played at all? Is that correct?

Sort of…

I’ve set the correct time zone in settings (Australia/NSW, without a simulated time)

For example:
List 1 | Always scheduled
List 2 | Always scheduled
List 3 | Time interval scheduled *
List 4 | Always scheduled
List 5 | Time interval scheduled *

  • = Both time interval schedules fall within the current time, but don’t have to be identical.

On initial boot, despite the time interval falling within the current time the player ignores both timer intervals on the first cycle or play. Then on the second cycle the Pi does correctly display the first playlist that has a condition true timer interval scheduled in the timer interval but ignores every other scheduled playlist regardless of it’s timer interval schedule or if it’s even “always scheduled”; it just goes back to the first playlist. It appears to repeat this behaviour every second cycle…ignoring the timer interval on all playlists in one cycle then only acknowledging the first matching one, then skipping the remaining playlists.

I hope that makes sense…

This one can actually be explained: It can and most likely will happen that the Pi doesn’t have a correct system time yet when playback starts. The scheduling decision of what to play always happens at the start of each playback loop and if the system doesn’t have a correct time yet, it cannot schedule anything that depends on time. So you most likely only get “always scheduled” content on the first loop. For the second loop the system will then hopefully have a correct system time and will include time restricted content if scheduled.

Similarly if the system never gets a correct system time, either because it cannot reach an NTP server or because it’s completely offline, you’ll only see “always scheduled” content.

I have difficulties reproducing this issue. I used 5 playlists like in your example and gave the two time interval scheduled lists an interval that matches the current time. I see all 5 playlists looping. So there must be something else going on. Can you run your device and once you see this behavior go to the device page, click on Manage… → Toolbox… → Generate on-device log file? Then write a quick email to hello@info-beamer.com and I can take a look.

No worries, I’ve created the debug log file.

Excuse my ignorance, but how/where do I retrieve that file? I’m new to Raspberry Pi…not sure how that’s done.

It’s not easily user-accessible, but for troubleshooting purposes I can look at it. But only if the device is online.

(If you’re interested in looking at the file, enable the remote terminal on the account page, then go to the device’s page, scroll down to remote terminal, click on the dropdown near connect and select ‘connect as root’ and confirm. Then type zless /space/log/debug and hit Tab to autocomplete the filename. Then hit Enter to confirm and use the cursor keys to scroll through the file)

I did exactly as you said but is says “no such file” (I did successfully create the on device debug log).

I’ve left the device on if you wish to access it.

Thanks. I was able to take a look. What I see seems correct to me. At least in this log file (see below):

  • On 18:50:03 (UTC) the player didn’t yet have a correct time (despite the log line showing it, it always takes a second or two to reach the player process itself). As a result it skips the playlists that require a correct time (the second and fifth playlist in your setup). It then plays that remaining content containing a total of 5 pages. This takes 1:29m.

  • On 18:51:32 it schedules again. This time it has the correct time and schedules all content (as the timespans you’ve set match). It plays 7 pages total during this loop.

  • On 18:56:37 it repeats this and adds the same 7 pages in total again.

From what I understand this should be exactly what’s configured. But I might be missing something or might have looked at the from log file. If you have another example and generate a new log file, I can take another look.

Sep 14 18:50:03 [schedule] checking schedule PXXXXXXXXe 1/2 (1)
Sep 14 18:50:03 filtered pages:  2
Sep 14 18:50:03 [schedule] adding all pages
Sep 14 18:50:03 [schedule] checking schedule LXXXXXXXw 1 (2)
Sep 14 18:50:03 [schedule] no current time. can't schedule playlist with start/end date
Sep 14 18:50:03 [schedule] checking schedule PXXXXXXXXe 3/4 (3)
Sep 14 18:50:03 filtered pages:  2
Sep 14 18:50:03 [schedule] adding all pages
Sep 14 18:50:03 [schedule] checking schedule CXXXXXXXXXe (4)
Sep 14 18:50:03 filtered pages:  1
Sep 14 18:50:03 [schedule] adding all pages
Sep 14 18:50:03 [schedule] checking schedule LXXXXXXXw 2 (5)
Sep 14 18:50:03 [schedule] no current time. can't schedule playlist with start/end date
Sep 14 18:50:03 [generate_cycle] generated cycle with 5 pages
[..]
Sep 14 18:51:32 [schedule] checking schedule PXXXXXXXXe 1/2 (1)
Sep 14 18:51:32 filtered pages:  2
Sep 14 18:51:32 [schedule] adding all pages
Sep 14 18:51:32 [schedule] checking schedule LXXXXXXXw 1 (2)
Sep 14 18:51:32 [schedule] span 1 matches
Sep 14 18:51:32 filtered pages:  1
Sep 14 18:51:32 [schedule] adding all pages
Sep 14 18:51:32 [schedule] checking schedule PXXXXXXXXe 3/4 (3)
Sep 14 18:51:32 filtered pages:  2
Sep 14 18:51:32 [schedule] adding all pages
Sep 14 18:51:32 [schedule] checking schedule CXXXXXXXXXe (4)
Sep 14 18:51:32 filtered pages:  1
Sep 14 18:51:32 [schedule] adding all pages
Sep 14 18:51:32 [schedule] checking schedule LXXXXXXXw 2 (5)
Sep 14 18:51:32 [schedule] span 1 matches
Sep 14 18:51:32 filtered pages:  1
Sep 14 18:51:32 [schedule] adding all pages
Sep 14 18:51:32 [generate_cycle] generated cycle with 7 pages
[...]
Sep 14 18:56:37 [schedule] checking schedule PXXXXXXXXe 1/2 (1)
Sep 14 18:56:37 filtered pages:  2
Sep 14 18:56:37 [schedule] adding all pages
Sep 14 18:56:37 [schedule] checking schedule LXXXXXXXw 1 (2)
Sep 14 18:56:37 [schedule] span 1 matches
Sep 14 18:56:37 filtered pages:  1
Sep 14 18:56:37 [schedule] adding all pages
Sep 14 18:56:37 [schedule] checking schedule PXXXXXXXXe 3/4 (3)
Sep 14 18:56:37 filtered pages:  2
Sep 14 18:56:37 [schedule] adding all pages
Sep 14 18:56:37 [schedule] checking schedule CXXXXXXXXXe (4)
Sep 14 18:56:37 filtered pages:  1
Sep 14 18:56:37 [schedule] adding all pages
Sep 14 18:56:37 [schedule] checking schedule LXXXXXXXw 2 (5)
Sep 14 18:56:37 [schedule] span 1 matches
Sep 14 18:56:37 filtered pages:  1
Sep 14 18:56:37 [schedule] adding all pages
Sep 14 18:56:37 [generate_cycle] generated cycle with 7 pages

Found the problem!

I created a new setup and added 4 schedules.

List 1 | Always scheduled
List 2 | Time interval scheduled
List 3 | Always scheduled
List 4 | Time interval scheduled

This time I just inserted images. Everything worked correctly. It didn’t skip any images in the setup.

I then replaced the images with the video assets I used in the previous setup and the problem returned. The videos I’m using range from 35 seconds each to about 15 seconds. I looked at the Duration setting of each video and found that the problem video was automatically detected and set to 106 seconds, even though the video is only 30 seconds long. I hadn’t played with these setting… I deleted this video from the assets and reuploaded it. This time it correctly detected the video length as 30 seconds and each playlist plays perfectly!

I don’t recall any issues when I initially uploaded the video to the site so I can’t give any feedback on how it might have happened from my end.

Thank you for the time you’ve spent helping me troubleshoot this!

info-beamer - Digital Signage for the Raspberry Pi community forum - Imprint