BeagleBone Black home automation & media server

Edit: I have now shoved all this inside a powered studio monitor and added an external antenna for the home automation :)

————————————-

image

I built this little rig after blowing up my LAN based RFXCom transmitter. I had a USB transmitter sitting around which I ofen used in conjunction with a BeagleBone.

After a little tinker I added a vlc based media player too. A bit of double sided sticky tape, usb thumb-drive, small usb hub and a small speaker turned it into a nice little unit.  I’m going to replace the long black usb cable with a smaller one.

image

When the unit boots, it speaks it’s IP address and then starts a random playlist of music which can be controlled via a web based VLC interface.  Music can be added by dropping it onto the thumb-drive. You can use this box as a file server simply with sftp. 

image

The unit also serves as a Home Automation transmitter in conjunction with HomeAutom8 (www.homeautom8.com)

image

Here is how (ubuntu):

apt-get install screen mono-runtime libmono2.0-cil wget zip unzip vlc espeak
wget http://www.homeautom8.com/downloads/Tcp2Com-v1.7.zip
wget http://www.homeautom8.com/downloads/Devinits.zip
wget http://www.homeautom8.com/downloads/HomeAutom8-cli.exe
unzip Tcp2Com-v1.7.zip
unzip Devinits.zip
cp Devinits/HomeEasy/devinit.hex Tcp2Com-v1.7/
cd Tcp2Com-v1.7
mono Tcp2Com.exe -c /dev/ttyUSB0 -utrx

Edit your /etc/fstab to mount a usb thumb-drive:

/dev/sda1 /mnt/ext auto defaults 0 0

Add this to your /etc/rc.local:

sleep 60
ifconfig | grep -o “inet addr:192.168.[0|1]…” | grep -o “192.168.[0|1]…” | espeak

cd /root/Tcp2Com-v1.7
/usr/bin/mono Tcp2Com.exe -c /dev/ttyUSB0 -utrx &
sleep 10
sudo -u ubuntu /usr/bin/vlc —novideo —loop —random -I http —http-port 7000 /mnt/ext http://vis.media-ice.musicradio.com/LBC973MP3Low &
exit 0

Note the url on the vlc command line?  That adds the LBC radio stream to the playlist, you can add more or change this to your favourite station.

You will need to create an account on HomeAutom8