Hello everyone,
I have been experimenting with the new custom bricks feature introduced in Arduino App Lab 0.7.0 on UNO Q.
Starting from my previous Web Radio project:
GitHub - philippe86220/UNO-Q--WebRadio · GitHub
I created a local custom brick (WebRadio) in order to:
- encapsulate the radio logic,
- simplify the Python application structure,
- expose a cleaner API,
- and separate the WebUI from the backend implementation.
The brick now provides methods such as:
radio.play("info")
radio.set_volume(50)
radio.stop()
instead of directly handling HTTP requests inside main.py.
I also experimented with brick_compose.yaml in order to better understand how App Lab service containers behave.
As part of these tests, I created an additional container using:
services:
player:
image: debian:bookworm-slim
command: bash -c "ls -l /dev/snd || true; sleep infinity"
The container was correctly created and started alongside the main App Lab container.
However, in my tests, ALSA audio devices were not exposed inside the service container:
docker exec -it copy-of-brique-player-1 ls -l /dev/snd
returned:
ls: cannot access '/dev/snd': No such file or directory
Because of this, I was not able to containerize audio playback (mpg123 / ALSA / USB audio) using brick_compose.yaml.
At the moment, the most reliable architecture I found is therefore:
App Lab (WebUI + custom brick)
↓ HTTP
Linux host-side service (systemd)
↓
mpg123 + ALSA + USB audio
I documented the exploration and tests here:
GitHub - philippe86220/UNO-Q-Custom-Brick-Exploration-WebUI · GitHub
Thanks to the Arduino team for introducing custom bricks in App Lab. They provide a very interesting way to better structure applications and encapsulate logic.