Turn your Raspberry Pi into headless audio source for Icecast internet radio.
To see how it works, start here.
journalctl -x -b --unit picast.service
systemctl status picast.service
- get a raspberry pi with a soundcard
- install Raspbian Stretch lite or Stretch and expand the filesystem, set locales etc.
- set up the raspi with ssh key access i.e.
$ ssh mypi
lets you run commands via ssh - connect some Raspberry Pis with ssh access via their ssh host name on your network
- find the soundcard vendor and product id form lsusb
- connect prepared Raspberry Pis to the network
- install Ansible 2.4+ via homebrew
- create create ansible config file
- create create ansible inventory file
- create wpa_supplicant.conf
- run
ansible-playbook deploy.yml
located in project directory
[defaults]
inventory=inventory.ini
located in project directory this has the channel and psk variables set for specified hosts
[streamers]
mypinhostname
[streamers:vars]
stream_url=http://example.com:8000/mystream
stream_password=hackme
soundcard_vendor_id="1ab2"
soundcard_product_id="0001"
located in this_project_directory/roles/wifi/files/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="My iPhone Hotspot"
key_mgmt=WPA-PSK
psk=wpa_passphrase_result0000000000000000000000000000000000000000000
priority=100
}
network={
ssid="my-home-network"
psk=wpa_passphrase_result0000000000000000000000000000000000000000000
key_mgmt=WPA-PSK
priority=99
}