It also works with Apple Airplay and even as a "simple" Bluetooth speaker!
From my understanding it is mainly three services.
Balena OS: an operating system tailored for embedded devices, such as the Raspberry Pi 4, with a focus on running Docker containers.
Balena Engine: a Docker compatible container engine.
Balena Cloud: a platform to deploy, manage and monitor IoT applications.
A DAC or digital-to-analog converter is the device that converts our digital music files into analog signals for our Hi-Fi amplifier.
Services
Hardware
Create a balenaCloud application, set the Application Name to sound2, and set the Default Device Type to Raspberry Pi 4.
Add a device and download the customized image.
Flash this image to the SD card with Etcher.
Raspberry Pi setup:
Get the Balena CLI tools
If you have node:
npm install balena-cli -g --production
If not, see alternatives.
Fetch and deploy the code
git clone git@github.com:balenalabs/balena-sound.git
cd balena-sound
balena push sound2
Configuration in the Balena Dashboard
audio=off
in RESIN_HOST_CONFIG_dtparam
BALENA_HOST_CONFIG_dtoverlay
with a value of hifiberry-dacplus
SYSTEM_OUTPUT_VOLUME
to 100
, see Increase Output VolumeThe dasboard is features rich: live logs, terminal session to the host machine, service status, environment variables and so on.
The setup is running smoothly for a couple of weeks now. The experiment is a success and the feeling is really good. For me, hardware experiments are tedious at best but mainly just painful, this time it was different.
Kudos to Balena for making hardware felt like software, I was at home 🙂.
This is a washed-out version of this article from Balena.