How to install Sick Beard on Raspberry Pi

SickbeardLogoHi there! Like many others, I bought a Raspberry Pi and put it on my desk for a while. But after a few months I started trying some things like home automation, IOS print server and automated downloading. That’s where Sick Beard comes in. Sick Beard can turn your Raspberry Pi into an automated download box for your favourite tv-series. You simply select which series you want to download and Sick Beard will look for the latest episodes and download them for you. It can even notify you via e-mail or your smartphone when the episodes are downloaded! Interested in this awesome tool?

First off the legal issues: I’m not responsible for any harm/damage done to you or your IT equipment caused by Sick Beard. I’m not responsible for the creation of Sick Beard, nor am I responsible for reaching your ISP download limit. This tutorial is just a tutorial to show that it is possible to use this software to automate your downloads. I’m not responsible for any private or public use by you and other users. Generally, Sick Beard doesn’t give you any harm and there is nothing to worry about, but hey, you never know. 😉

Requirements

  • Raspberry Pi with OS preconfigured. Click here for a tutorial to install Raspbian OS.
  • An external HDD to store your favourite tv series
  • Maybe a powered USB hub if your external HDD requires it
  • That’s it I guess
My Setup

My Raspberry Pi Setup, not that fancy 😉 From left to right: Raspberry Pi – 5V Powered USB Hub from Icudu – External HDD

Sick Beard - alpha ThePirateBay

Sick Beard Sneak Preview 😉

Sick Beard

There are 2 versions of Sick Beard available:

  • Sick Beard for Newsgroups
    Since downloading with Torrents is so popular these days, some agencies are monitoring Torrent downloads. Torrents are popular but it isn’t that safe (hence, it never was 😉 ) because you download your files from a lot of peers which are uploading that file. So generally, your computer connects to several other computers to download a file. For IT nerds like me, this is a potential danger. Therefore they invented ‘Newsgroups’. With Newsgroups your computer connects to only one server, mostl of the time via a secured connection, and gets the file from that one server only. It is much safer to use Newsgroups, but you have to pay for it. Although some Newsgroups providers give free accounts, the quality of those free accounts will never meet the quality you get from using Torrents. Sick Beard for Newsgroups is the official release of Sick Beard from its creators. But who likes official releases anyway? 😉
  • Sick Beard for Torrents
    As you can guess, Sick Beard for Torrents is the ‘unofficial’ release of Sick Beard but it has really good support too. If you want to automatically download your tv series via Torrents and you understand the risk of using Torrents, then Sick Beard The Pirate Bay edition is the thing you’re looking for! In this tutorial I will explain how to install and configure Sick Beard with Torrent support because it is not easy to find a consistent tutorial on Torrents and Sick Beard. Hopefully this tutorial will enlighten your path. 😉

Sick Beard will look for your episodes and pass them on to your downloader. It doesn’t handle the downloading itself. For Torrents you can use a lightweight torrent-downloader like Transmission-Daemon. Both the installation of Sick Beard and Transmission will be explained in this tutorial.

To download your tv series, you’ll have to have enough space left on your Raspberry Pi. Therefore you can connect an external HDD to your Raspberry Pi via its USB-Port. Some external Hard Disks require 5v to run, since the Raspberry Pi itself runs on 5v it will put all its energy into the external hard disk, unwillingly shutting down itself. If your external HDD requires 5v, I recommend getting an external 5v powered USB-Hub.

Sick Beard’s Features

  • Automatic Episode Downloads – Finds new episodes and downloads them using your favorite client.
  • Rename Your TV Episode Files – Specify your naming convention and Sick Beard will rename your files for you.
  • Generate Episode Metadata – Connects to TheTVDB and downloads TV Show information, including episode screenshots.
  • Communicate via XBMC, Growl, Prowl, Twitter, Notifo, and more – Sick Beard will notify you of newly downloaded episodes via your PC or phone and can update your XBMC library.

Step 1: The essentials

This tutorial assumes you already have an OS running on your Raspberry Pi like Raspbian. From there on you can follow these steps to configure your tiny automated download box.

To keep Sick Beard updated, it’s better to install Sick Beard from source using Python with git as the updater. Open a terminal and type the following code:

sudo apt-get install git-core python python-cheetah

Step 2: Installing Sick Beard

To install Sick Beard, move to your home folder and download a copy of the required files with git as mentioned below.

cd ~
git clone git://github.com/coach0742/Sick-Beard.git .sickbeard

These commands will bring you to your home location and then download a copy of the installation files to the .sickbeard folder. Voillà, Sick Beard is installed on your Raspberry Pi. Now we need to get it up and running.

Step 3: Start Sick Beard

Now that you’ve installed Sick Beard, you’ll have to create autoProcessTV.cfg in /home/USER/.sickbeard/autoProcessTV/:

cd ~/.sickbeard
cp -a autoProcessTV/autoProcessTV.cfg.sample autoProcessTV/autoProcessTV.cfg

To start Sick Beard, use the following command:

python ~/.sickbeard/SickBeard.py -q

If you don’t encounter any errors, Sick Beard should be up and running. Sick Beard runs on port 8081 by default. So open up a webbrowser and type in the IP-address from your Raspberry Pi like below. I will soon post a topic for more information on how to setup an IP-address on your Raspberry Pi and refer to it.

http://{youripaddress}:8081

Example:
http://192.168.1.251:8081

Step 4: Install Transmission-Daemon

To install the Torrent downloader on your Raspberry Pi, type in this command into  a terminal:

sudo apt-get install transmission-daemon

Wait for your system to install the Torrent downloader. Then continue with the next step.

Step 5: Configure Transmission-Daemon

First we will mount the external hard drive. That leaves you with plenty of space to download your tv series. To mount your external hard drive, plug it in your Raspberry Pi and make sure everything works correctly. If so, execute the following commands to make your OS recognize the external hard drive:

sudo blkid

This will display all your connected devices. Look for a device that is connected to /dev/sda1 or /dev/sdb1 or /dev/sdc1 or … you get it. Now you must create a directory on your system in which the external drive can be mounted:

sudo mkdir /home/pi/Media/USB

Then you can mount your drive by executing the following command:

mount /sda1/YOURDRIVE /home/pi/Media/USB

Now your drive is mounted on your system and you can access it via /home/pi/media/USB.

To illustrate the above commands, here is an example:

After I ran the command sudo blkid I get the following screen as output:

blkidsnippet

My drive is a LACIE drive and according to the output it is located at /dev/sda1/. After making a directory to access my drive (e.g. /home/pi/Media/USB/) I mount it with the mount command above. Now my drive is available from my configured directory.

Let’s make some directories for our Transmission-Daemon. First we will need an incomplete directory so Transmission-Daemon can put the incompleted files in there. If we have an incomplete directory, we also need a completed directory to put the completed Torrent files in.
You may be wondering how Sick Beard communicates with Transmission-Daemon? It does so via the watch-dir. As mentioned earlier, Sick Beard will look for your episodes then it will put the according Torrent files into the watch-dir. The Transmission-Daemon will constantly ‘watch’ this directory for new Torrent files. If it finds any, it will download the files.

Type in the following commands to configure the required directories:

DO NOT copy the text behind the hashtag (the thing from Twitter nor the hashtag itself)! This is for your information so you’ll know what you’re doing. 

mkdir -p /home/pi/Media/USB/Incomplete # incomplete downloads
mkdir /home/pi/Media/USB/Completed # completed downloads/seeding torrents
mkdir /home/Media/USB/Watch # Sick Beard will place the Torrent files from your episodes in this derictory. Transmission-Daemon will watch this directory.

Your directories are created! Now we will give them the proper permissions and ownerships. As you may or may not know, an unprivileged user cannot write to a directory in Linux. Therefore we will create a new user for Transmission-Daemon and make it the owner of the directories.

To add a new user for Transmissio-Daemon, type in the following command:

 sudo usermod -a -G debian-transmission pi

Now it’s time to make the new user the owner of our directories so Transmission-Daemon can acces them:

chgrp debian-transmission /home/pi/Media/USB/incomplete
chgrp debian-transmission /home/pi/Media/USB/completed
chgrp debian-transmission /home/pi/Media/USB/watch

We will also be giving the Transmission-Daemon user all rights to the directories:

chmod 770 /home/pi/Media/USB/incomplete
chmod 770 /home/pi/Media/USB/completed
chmod 770 /home/pi/Media/USB/watch

Sow we made the directories with their appropriate permissions and ownerships, now we need to tell the Transmission-Daemon which directories to use. First stop the Transmission-Daemon service:

sudo service transmission-daemon stop

Then edit the configuration file from Transmission-Daemon:

sudo nano /etc/transmission-daemon/settings.json

Look for the lines which say download-dir and incomplete-dir. Type in the appropriate directories.

To add the watch-dir, type the following at the end of the file BEFORE the }!!

 "utp-enabled": true,
 "watch-dir": "/home/pi/Media/USB/watch",
 "watch-dir-enabled": true }

And don’t forget to put } at the end. Your file will look similar to this:

pi@raspberrypi: ~_002

Example of settings.json

Start the Transmission-Daemon service again:

sudo service transmission-daemon start

If you didn’t encounterd any errors, Transmission-Daemon will be running at port 9091. To access it via browser, type in your IP-address again followed by 9091.

http://{youripaddress}:9091
Example:
http://192.168.1.251:9091

Step 6: Configure Sick Beard

Visit your Sick Beard installation via your webbrowser.

http://{youripaddress}:8081
Example:
http://192.168.1.251:9091

Go to ‘General’ and uncheck ‘Launch Browser’. Next, go to ‘Search Settings’ and specify the download location for the Torrent files. This location must be the same as your watch-dir configured in Transmission-Daemon.
Then go to ‘Search Providers’ and select your favourite providers (Pirate Bay, Kick Ass Torrents, …).
Finally go to ‘Post Processing’ and specify the location in which Sick Beard should move your downloaded series to. E.g. the directory /home/pi/Media/USB/Series. Select the type of post processing, I chose ‘move’ and be sure to select ‘scan and process files’.  To add a show simply click ‘add show’ on Sick Beard’s home page.

That’s it! Sick Beard is up and running! It will download the Torrent files, put them in the watch-dir. Transmission-Daemon will then download your torrents and put them in the completed folder. Sick Beard is watching that folder and will post process your tv series and move them in the proper location!

If you reboot your Raspberry Pi you’ll have to start every service manually and remount your drive. In the next post I’ll give a small python script which does all that for you.

Or you can use this link to make your Raspberry Pi mount your drives automatically. Afterwards use crontab to start Sick Beard and Transmission Daemon every reboot.

Any questions, something wrong or not cristal clear? Feel free to comment!

Advertisements

8 thoughts on “How to install Sick Beard on Raspberry Pi

  1. any idea how to change the port that sick beard is using? my raspberry py is running google coder and have the port 8081 occupy.

    • Hi Armando Escandalo,

      Sorry for my late reply. You can look for the config.ini file in the SickBeard directory. Try chagning the web_port entry to any port above 1024 as shown below:

      [General]
      log_dir = Logs
      web_port = 8081 Change to e.g. 5053
      web_host = 0.0.0.0
      web_ipv6 = False
      web_log = 0
      web_root = ""
      web_username = xxxxxxxx
      web_password = xxxxxxxxxxxxx
      use_nzbs = 1
      use_torrents = 0

      If more info is needed, try this link Change Default Port of Sick Beard

      Feel free to let me know if it works or not 🙂

    • Hi mmbdeng,

      Thanks for the info. Sorry for the late reply. Indeed, the github repository used in the article is out of date.
      Changing it to yours now. Did not verify the install instructions, feel free to let me know whether it’s still correct or not.

      Thanks!

  2. Hey man, great tutorial! Really clear. SickBeard TPB Edition is running here without any problems. Unfortunately you forgot to mention the script to run the Python script every boot. I tried it with rc.local and crontab but both don’t seem to work. Could you help me out?

    • Hi,

      Thanks man! Indeed, I did not add another article with the automated script. Currently my Raspberry Pi is not an automated downloader anymore. I attached this fancy touchscreen to it called PiTFT and am trying some things out. More info here PiTFT

      So basically, the script is gone and I have to contact my brain to remember it. (yes, first rule, make a backup of everything 😉 ).
      My Python script did the following:

      1. Check on all ports for a connected USB Device
      2. If USB device found, mount to location of Transmission Daemon’s download location & start Sick Beard + Transmission Daemon
      3. If no USB device found, do not start Sick Beard or Transmission Daemon.

      Crontab ran my script every reboot. The Python script also did some error checking etc. that way I was sure that whenever my USB was mounted, Sick Beard could start downloading.
      The script was expandible like “sent mail when no USB device found” or something similar. You could add several components to interact with the script.

      So I don’t have the exact Python code anymore, but I remember that I made Python run system commands during the script (like the mount command). It returns a specific answer (like “usb mounted” or “error: no usb found”). Based on the return values of those system commands, the script handled accordingly. That’s the idea. Hope you have enough information to maybe start coding or something. Every script generates an awesome feeling 😉

      Or another simple solution is available:
      http://kwilson.me.uk/blog/force-your-raspberry-pi-to-mount-an-external-usb-drive-every-time-it-starts-up/

      This solution does not invoke a script, you just need to adjust the FSTAB of the OS. No harm in doing so. Not sure whether it will mount the USB before launching SickBeard or Transmission Daemon though 😉

      Let me know if this was useful or not 🙂

      • Hey man,

        Great answer. I made a really easy script that just launches Transmission, SickRage & CouchPotato. Everything is running smooth now, thanks for your reply (actually didn’t expect an answer). Favorited your website, hopefully you will make some awesome tutorials in the future 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s