Internet Radio

Submitted by Thomas Nilsson on

I have a few old fashioned Internet Radios, but as the services they were relaying on has stopped to exists, I decided to build one of my own!

The HW

The front of the radio

I uses a simple interface to control everything. It is based on a Pi Zero W, a Pimoroni Phatbeat  and an adapter card to connect the control buttons. The Phatbeat is unfortunately discontinued, but it should be possible to find something else with a stereo output.

The content of the radio

There are also two loudspeakers as the Phatbeat has a stereo output.

The card stack

The card stack with the interface card in the middle. On the picture, the right most card is the Pi Zero W and the one to the left is the Phatbeat.

The SW

The SW used was originally written for Python 2 so it required some minor updates for Python 3. There is now a version for Python 3 but that is not the one I am using.

A second problem was that the Pi nowadays uses  Systemd so also that had to be fixed.

This is my /etc/systemd/system/phatbeatd.service file:

[Unit]
Description=LSB: Starts PHAT BEAT VLC control daemon at boot time
After=network.target auditd.target
[Service]
Type=forking
Restart=on-failure
KillMode=process
ExecStart=/usr/bin/phatbeatd
RestartSec=10
[Install]
WantedBy=multi-user.target

And this is my /etc/systemd/system/vlcd.service file:

[Unit]
Description=LSB: Starts VLC daemon at boot time
After=network.target auditd.service
[Service]
Type=forking
Restart=on-failure
KillMode=process
ExecStart=/usr/bin/vlcd
RestartSec=10
User=pi
Group=pi
[Install]
WantedBy=multi-user.target

Everything is based on the VLC Radio application which is a part of the Pimoroni application package for the Phatbeat.