Turn any Nascent Objects device with a speaker module into an AirPlay-enabled speaker.
This process will work with any Nascent Objects product that contains a speaker module. Some examples of supported products include:
- Cielo: An Alexa Speaker by John Whaley
- Red: A Bluetooth Speaker by Alexandre Jais
- Bloque: An Alexa Speaker by Robert She
- Boo: An Alexa Speaker by Aline Pittner
- Cubito: An Alexa Speaker by Minji Kim
- Duet: An Alexa Speaker by Shaun Kosoy
- ioPlay: An Alexa Speaker for Lego Technic
To setup your device as an AirPlay-enabled speaker you first need to setup its wifi and connect to it.
-
Start by inserting your main module, speaker module, and any other modules into your shape and plug it in.
-
Wait 2 minutes for it to boot.
-
Once booted, press the button on the back of your main module to enable wifi setup. Once pressed, the button's light should blink on and off.
The main module is now broadcasting as a wireless access point.
- Connect your computer or mobile device to:
SSID: | Nascent Main |
Password: | prototype |
- Once successfully connected to the access point, open a web browser and navigate to:
-
Use the device setup web portal to set your:
- SSH Password
- Device Name
- Home Wifi Network
-
Once the device is connected to your wireless network, connect your computer or mobile phone back to your home wireless network.
You should now be able to ssh into the device with a command similar to:
ssh root@[DEVICE_NAME].local
Where [DEVICE_NAME] and the ssh password are the ones you specified.
The rest of this setup process should be performed on device from an active SSH session.
You will be setting up AirPlay support using shairport-sync. To do that, you must first install a few dependencies:
By default your Nascent Main Module uses mdns for zero-conf networking, but Shairport-Sync wants Avahi.
opkg update
systemctl stop mdns
opkg install avahi
systemctl enable avahi-daemon
systemctl start avahi-daemon
systemctl disable mdns
opkg install avahi-dev
opkg install coreutils
wget --no-check-certificate http://www.hyperrealm.com/libconfig/libconfig-1.5.tar.gz
cd libconfig-1.5
./configure --prefix=/usr
make
make install
cd ..
opkg install libdaemon-dev
opkg install libpopt-dev
opkg install alsa-lib-dev
git clone https://github.com/mikebrady/shairport-sync
getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null
getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null
cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd
make
make install
cd ..
You now need to configure shairport sync to use your speaker module. You can configure this manually by editing /etc/shairport-sync.conf to whatever settings you like, but to make things easy we've included a script to generate a config file that will be compatible with your nascent device.
git clone https://github.com/nascentobjects/AirPlayExample
cd AirPlayExample
bash ./generate_shairport_conf.sh
cd ./shairport-sync.conf /etc/
Enable the systemd service to start your airplay speaker service automatically at boot.
systemctl enable shairport-sync
systemctl start shairport-sync