Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
web
 
 
 
 
 
 

README.md

radioauto

Smart morning (or any time) radio for the Raspberry Pi

Introduction

This is my current setup for playing (and stopping) radio automatically on my Pi.

It consists of:

  • a cronjob to schedule the radio play/stop, leveraging all the flexibility cron offers
  • a Bash script for the missing flexibility: check for holidays, disable specific dates, set the volume, etc
  • a (optional) web interface to disable running on specific dates easily

Related blog post.

Dependencies

  • cron
  • mpc
  • mpd

Installation

  1. Install the dependencies. On Raspbian:
$ sudo apt install mpc mpd
  1. Clone the repo:
$ sudo git clone https://github.com/rccavalcanti/radioauto.git /opt/radioauto
  1. Configure the host parameters:
$ sudo mkdir /etc/radioauto
$ sudo cp /opt/radioauto/host.conf.sample /etc/radioauto/host.conf
$ sudo -e /etc/radioauto/host.conf
  1. Create the cronjob from the sample:
$ sudo cp /opt/radioauto/cron.sample /etc/cron.d/radioauto
$ sudo -e /etc/cron.d/radioauto

If you are not familiar with cron, read man 5 crontab.

  1. (Optional: web interface) Point your webserver root to the web directory and enable PHP.

Be sure to allow it to read/write the configuration directory:

$ sudo chgrp www-data /etc/radiodata
$ sudo chmod g+rwx /etc/radiodata
  1. (Optional: holidays) To prevent radioauto to run on holidays:
$ sudo -e /etc/radioauto/holidays.txt

Fill this file with the holidays in the format MM-DD or YYYY-MM-DD, one per line.

Usage

Your Pi should automatically start and stop streaming at the configured time.

If you ever need to disable it ad-hoc for a specific date, just access the web interface.

Credits

License

Licensed under GPLv3

Copyright (C) 2017-2020 Rafael Cavalcanti

About

Smart morning (or any time) radio for the Raspberry Pi

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.