Adding Raspberry Pi 5 Support to Anthias

Engineering |
Adding Raspberry Pi 5 Support to Anthias

Overview

The release of the Raspberry Pi 5 in October 2023 marked another milestone in the single-board computer landscape.

As maintainers of Anthias, Screenly’s free and open-source digital signage solution, we knew we needed to extend support to this new device. However, the path to implementation wasn’t as straightforward as one might expect, largely due to our ongoing technical debt resolution and infrastructure improvements.

What is Anthias and why do we maintain it?

Anthias is a free and open-source digital signage solution that allows you to deploy digital signs in your organization quickly and easily. You can use Anthias to run and manage digital signage players and control the content that runs on your screen from a user-friendly interface.

Anthias’s origins date back to 2012 when Screenly was founded. At the time, our founders were working on a client project that required a digital signage solution. They built a custom solution for the client, but they quickly realized that they could create a more widelyapplicable solution that could be used by other organizations. This gave rise to Screenly Open Source Edition, also known as Screenly OSE. Screenly OSE quickly became the most-starred open-source digital signage solution on GitHub.

Screenly OSE was then rebranded to Anthias in 2022. The motivation for this rebrand was to more clearly differentiate Screenly OSE from Screenly’s paid digital signage plans. While Anthias is free and open-source and will be free and open-source forever, Screenly also offers paid plans that offer features better geared for multi-screen deployments.

Challenges we have encountered

When the Pi 5 was released, we were amidst of significant architectural changes. Our team was navigating through crucial migrations, moving from Flask to Django and upgrading from Qt 5 to Qt 6. This transition to Qt 6 brought its own set of considerations, particularly regarding compatibility with older hardware like the Raspberry Pi 1 and 2.

One of our biggest challenges lie in our Docker infrastructure. Our existing setup, with its tightly coupled Dockerfile and docker-compose.yml configuration, served us well when supporting a limited number of platforms like Raspberry Pi 1 through 4 and x86 devices. However, as our platform support grew, we needed a more scalable and flexible approach.

Initially, we employed a Bash script to generate Docker files conditionally, but this solution quickly showed its limitations. The growing complexity of conditional logic threatened to make our codebase unintuitive and difficult to maintain.

The solution

Transitioning from Bash to Python

This realization led us to reimagine our approach. We transitioned from Bash to Python for generating Dockerfiles, implementing Jinja templates in place of our existing Docker templates. This shift granted us unprecedented flexibility in managing dependencies and configurations. However, this comes with a small cost. The Python script depends on third-party libraries, which means that an extra step is needed to install those dependencies.

Using Docker to isolate dependencies from the host machine

This is where Docker came in handy. We automated the installation of third-party libraries via a Docker container and a script that the user can run. Now, we can elegantly handle platform-specific dependencies through conditional statements, making our build system more maintainable and extensible. This made adding support for the Pi 5 more of a breeze rather than a headache. We don’t want our host machine to be polluted with dependencies for different platforms.

The actual migration process for Pi 5 support took a different route compared to our existing platforms. While we build Qt libraries from source for Raspberry Pi 1 through 4 and x86 devices – a process requiring substantial computational resources – we opted for a more pragmatic approach with the Pi 5. We decided to utilize the pre-built version of Qt 6 and build the WebView directly on a Raspberry Pi 5 device. Though this approach presents challenges for automating builds through GitHub Actions, we prioritized getting Pi 5 support into users’ hands quickly, leaving build automation as a future enhancement.

Supporting different user needs

As with our existing supported platforms, our implementation strategy is divided into two paths: supporting devices running Raspberry Pi OS Lite (which is based on Debian) and those running balenaOS. This strategy serves different user needs. The Raspberry Pi OS version caters to users who want to customize their Anthias installation post-installation, while the balenaOS version provides a streamlined solution for those seeking a plug-and-play digital signage system.

How to get started

Now that Raspberry Pi 5 support is live in Anthias, we invite you to try it out. Whether you prefer the command-line installation or our pre-released images, both options are available to suit your needs. As an open-source project, we welcome community contributions – if you have ideas for features or spot any bugs, please don’t hesitate to create an issue or open a pull request. Your involvement helps make Anthias better for everyone.

Switching to a paid Screenly plan

Anthias is free and open-source, and it will always be. However, if you are looking for run multiple screens at once and deploy digital signs in an enterprise environment, you may want to consider a paid Screenly plan. Many of our paid Screenly customers started with Anthias for their first screen and then upgraded to a paid plan as their digital signage needs grew. You can learn more about our plans here and sign up for a 30-day free trial.

Picture of Nico Miguelino
Nico Miguelino View Profile
Nico maintains open source projects at Screenly.

Recent Posts

Blog Post | December 16, 2024

Screenly Changelog Episode 6

Read More

Display your best content with Screenly digital signs.

Screenly is loaded with features to make digital signage management easy.

footer screen image
manage cookies