Using a Real Time Clock module for proper offline timekeeping

Yodeck Players do not include an on-board real-time clock. What does that mean? It means that if your Player is offline for a prolonged period of time, it might lose track of time and scheduling might not behave correctly.

The Problem


The Players (based on Raspberry Pi) do not have an RTC (Real Time Clock) module on board.

It's cost if fairly low (you can find them on eBay), but it is something that needs to be considered if your deployment is time-critical.

The Technical Details


Two clocks are important in Linux: the ‘hardware clock’, also known as RTC (Real Time Clock), CMOS or BIOS clock, and the 'system clock'.
  • The RTC is a battery backed clock module connected on the GPIO ports of the Player (Raspberry Pi) that keeps time even when the Player is shut down (or has no power).
  • The second clock is called the ‘system clock’, maintained by the operating system, Linux in our case
 At boot time, the hardware clock is used to set the system clock and from that point onwards the system clock is used to track time. On regular intervals and at shutdown, the system time is used to set the hardware clock as a way to ‘save’ the time between reboots.

Without an RTC, the Player saves the current time on the SD card every hour. If there is a power failure, when the Player boots, it will load the last time recorded on the SD card. Then, it will sync its time from the Internet NTP (Network Time) servers, or as a backup, our servers. But if there is no Internet access, the Pi will not be able to sync time, so its clock might be off (from minutes, to hours, depending how long the power failure was). This will affect Scheduling, not content playback.

Conclusion


If time-scheduling is critical and you may have serious down-time in your Internet connection, then you might consider adding an RTC. Reach out if you need more details for your case.

Feedback and Knowledge Base