Carigamers
Tech Talk => Hardware, Tweaking & Networking => Topic started by: woodyear99 on March 26, 2014, 11:47:36 PM
-
So I wanted to put together an automated low powered Torrent/Usenet box. I looked into various standalone devices but they were either very limited or prohibitively expensive. After reading several articles about the Raspberry Pi it seemed to fit my needs...low power, silent, tiny and of course really cheap at $35 USD.
To save time I ended up going with the Canakit Complete Starter Kit to save time, though if you have extra components lying around (hdmi cord, sd card, micro usb power adapter) you could just go with the unit itself.
http://www.amazon.com/CanaKit-Raspberry-Complete-Original-Preloaded/dp/B008XVAVAW
I'll be documenting my progress getting this up and running as well as how it performs with the actual downloads...
The guides I'll be following are as follows ->
*The HTG Guide to Getting Started with Raspberry Pi (http://www.howtogeek.com/138281/the-htg-guide-to-getting-started-with-raspberry-pi/)
*How to Configure Your Raspberry Pi for Remote Shell, Desktop, and File Transfer (http://www.howtogeek.com/141157/how-to-configure-your-raspberry-pi-for-remote-shell-desktop-and-file-transfer/)
*How to Turn a Raspberry Pi into a Low-Power Network Storage Device (http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/)
*How to Turn a Raspberry Pi into an Always-On BitTorrent Box (http://www.howtogeek.com/142044/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box/)
*How to Turn a Raspberry Pi into an Always-On Usenet Machine (http://www.howtogeek.com/142249/how-to-turn-a-raspberry-pi-into-an-always-on-usenet-machine/)
*How to Automate Your Always-On Raspberry Pi Download Box (http://www.howtogeek.com/146410/how-to-automate-your-always-on-raspberry-pi-download-box/all/)
In order to reduce the chance of the SD memory card getting corrupted I decided to Boot from a usb hard drive and place swap on it as well...followed this guide.
http://www.blogdugas.net/?p=269
Easier method for swap file -
http://www.bionoren.com/blog/2013/02/raspberry-pi-crashplan/#comment-97
First, I gave my Raspberry Pi more memory via swap space. Ya, swap space is typically very slow, but for backup purposes, it’s fast enough. Since I have a removable USB drive attached to my Raspberry Pi, I created swap space there. (Do all these as root or under sudo).
Run this once for initial set up (my /path/to/swapfile is on my USB drive):
dd if=/dev/zero of=/path/to/swapfile bs=1M count=1024
mkswap /path/to/swapfile
chown root:root /path/to/swapfile
chmod 0600 /path/to/swapfile
Before you start that swap, see what swaps you already have:
free -h
I think most Raspberry Pi owners will see 100 MB listed in there. That’s a bad idea (I’ll explain why), and we’ll remove it. But for now, lets just add on more swap:
swapon /path/to/swapfile
See if it worked:
free -h
If you have an extra 1 GB of swap space, you’re in luck! Now make this permanent on reboots:
vi /etc/fstab
After your removable drive has been mounted, add this:
/path/to/swapfile swap swap defaults 0 0
Save and exit vi. Then restart the machine with “reboot”. On reboot, run “free -h” to see if you still have your new swap space. It may list 1.1 GB, if there are 100 MB from the first swap and 1 GB from the swap you just made.
Also instead of using sickbeard I went with Nzbdrone instead, it automatically searches, downloads and sorts the latest episodes of my favorite tv shows...
http://www.raspberrypihelp.net/tutorials/52-nzbdrone-raspberry-pi
Nzbdrone is a program like SickBeard. It's always good to have a new kid in town!
How to install:
Add NzbDrone's repository to your software source
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC
[ENTER]
echo "deb http://update.nzbdrone.com/repos/apt/debian master main" | sudo tee -a /etc/apt/sources.list
[ENTER]
Install/Update NzbDrone
sudo apt-get update
[ENTER]
sudo apt-get install nzbdrone
[ENTER]
Start NzbDrone
mono /opt/NzbDrone/NzbDrone.exe
[ENTER]
Open your browser and go to http://RaspberrypiIPadres:8989
I was able to autostart NzbDrone using this method..
https://github.com/NzbDrone/NzbDrone/wiki/Autostart-on-Linux
This Method Provided by: protocol77
This Guide is to help those who would like to use linux to run NZBDrone at time of writing this there is not "Install As Service" option like with the Windows Build so this needs to be done until a better alternative is found i have personally tested it so you should have no issues if you do please post in the NZBDrone Forums (http://forums.nzbdrone.com/) and someone will try and help you.
**First ** make sure NzbDrone is installed you can go here to find out how to do that https://github.com/NzbDrone/NzbDrone/wiki/Installation
Next I created a .sh or batch file to automate the process of type "sudo mono /opt/NzbDrone/NzbDrone.exe" Here is a link to the batch file so it saves you all from having to do this even though it was easy if you open in a text editor you will see
Batch File: (Just Hit Download to grab it) http://goo.gl/4c8yWg
this .sh file just has one line of text
#!/bin/bashmono /opt/NzbDrone/NzbDrone.exe
Next there are two ways of doing this
Method One:
is using rc.local you do this by opening a terminal windows and typing (without quotes) "sudo nano /etc/rc.local" (or if easier you can use a text editor like gedit, pluma, leafpad whatever you have just replace the nano part with what you want
Once this is open go to the bottom and just above where it says "exit 0" type the following for eg.
/bin/sh /home/server/Desktop/NzbDrone.sh
mine was saved to my desktop on my linux machine you will need to edit this to wherever you put the NzbDrone.sh file you downloaded above but remember to keep the /bin/sh first then a space then the rest
I figured out an easier way to get NzbDrone to autostart using the NzbDrone.sh file.
http://blog.flowbuzz.com/2012/07/raspberry-pi-and-autostart.html
using sh file in my home directory and named it start_feh.sh (imaginative), with appropriate chmod +x
Next (and I assume you're doing this all from a terminal/ssh), change to your home folder's configuration folder (cd ~/.config), and make an autostart directory (mkdir autostart).
cd to that folder (cd autostart), then make a *.desktop file for your script (vi feh.desktop) with the following 3 lines:
[Desktop Entry]
Type=Application
Exec=/home/pi/start_feh.sh
That's it -- all it took. So... long story short: On your Raspberry Pi, to start a program after it launches into LXDE, make a *.desktop file in /home/[user profile]/.config/autostart
Finally I installed a DLNA server to view all these movies and shows from my smart tv and smartphones...
http://www.skenderovic.com/2013/06/use-raspberry-pi-as-dlna-server-for.html
This is a quick tutorial on how to setup your Raspberry Pi to serve as a DLNA server using "minidlna". Since I am running Raspbian “wheezy” version, you need to check first that you have latest updates. You do this by running next commands in terminal.
1
sudo apt-get update
2
sudo apt-get upgrade
After you do that, you need to connect your external hard drives that you will be using as a storage for your media files. When connected run this command to list them together with theri UUIDs:
1
sudo blkid
You should get something like this:
1
pi@raspberrypi / $ sudo blkid
2
/dev/mmcblk0p1: SEC_TYPE="msdos" UUID="C522-EA52" TYPE="vfat"
3
/dev/mmcblk0p2: UUID="62ba9ec9-47d9-4421-aaee-71dd6c0f3707" TYPE="ext4"
4
/dev/sda1: LABEL="WD Elements" UUID="bd669137-8990-4852-b922-05708aa050e0" TYPE="ext4"
5
/dev/sdb1: LABEL="One" UUID="53f7239a-cbc8-46bb-9ada-49bc9f04cd4e" TYPE="ext4"
Now you should make directories where you would mount your HDDs, here is an example how to do it:
1
sudo mkdir -p /mnt/One
2
sudo chmod 755 /mnt/One
3
sudo mkdir -p /mnt/Two
4
sudo chmod 755 /mnt/Two
Now you need to edit a "fstab" file to enable automatic mounting of HDDs. Here is what you do:
1
sudo nano /etc/fstab
and add lines for your HDDs (you can use UUIDs or just /dev/sda) i used the following:
1
/dev/sda1 /mnt/One ext4 rw,defaults 0 0
2
/dev/sdb1 /mnt/Two ext4 rw,defaults 0 0
Now you install the "minidlna"
1
sudo apt-get install minidlna
After installation is over, you need to configure the minidlna.
1
sudo nano /etc/minidlna.conf
You add the following lines to the configuration file, with path pointing to your directory layout...
1
media_dir=A,/mnt/One/Music
2
media_dir=V,/mnt/One/Movies
3
media_dir=P,/mnt/One/Pictures
4
media_dir=A,/mnt/Two/Music
5
media_dir=V,/mnt/Two/Movies
6
media_dir=P,/mnt/Two/Pictures
You also change db_dir so that the database is saved across reboots.
1
db_dir=/home/pi/.minidlna
After this is done you can add the service to start at boot:
1
sudo update-rc.d minidlna defaults
You run
1
sudo service minidlna start
to start the minidlna server and
1
sudo service minidlna force-reload
to reload the database.
-
...and when you are finished, you shall build one for me.
I'll send the butler down with the cheque. :)
(http://www.radiosurvivor.com/wp-content/uploads/2011/06/snob1.png)
-
Nice, let me know when you automate your house with it and i'll send my butler XD
-
Lol it's funny you mention that, totally doable with a raspberry pi....
How To Build a Home Automation System with Raspberry Pi and Arduino
http://www.makeuseof.com/tag/how-to-build-home-automation-system-raspberry-pi-and-arduino/
-
UPDATE:
I ended up removing NZBdrone and started using Sick Beard The Pirate Bay edition with torrent support.
http://www.htpcbeginner.com/how-to-install-sick-beard-with-torrent-supporton-ubuntu/
Also I removed Sabnzbd as it is a bit too much for the raspberry pi. Installed a really nice, lightweight application called Nzbget..
http://www.howtogeek.com/162060/how-to-install-nzbget-for-lightweight-usenet-downloading-on-your-raspberry-pi/
-
This little device can be used in many ways, check out some of these...
http://around-technology.blogspot.fr/2014/04/things-to-do-with-raspberry-pi.html
Open your garage door (with Siri)
Lask Arcade Coffe table
BeetBox
Solar Powered FTP Server
Tweets Reader
FM Transmitter
Light Painting
KindleBerry Pi
Netbook
OwnCloud [Dropbox Clone]
BitTorrent Server
Mail Server
Web Server
Car PC
Super PC [Cluster]
Weather Station
VPN Server
GPS Tracker
WebCam Server
Tor Relay
Super Nintendo
Email Notifier
Coffe Machine
Airplay
Shot photos from Near Space
AudioBook Player
Raspberry Pi Wireless Display
Nas Server
Pentesting Box
Advices Machine
Google Glass Clone
Alarm
-
Impressive list.
Keenly following your progress on this project as I have had a macabre interest in low powered machines for some time.
Particularly for the purpose of a low cost, power efficient, always on HTPC and downloading machine
Microtorrent and Vuse running RSS subscriptions works exceptionally well for automated downloads....particularly Vuse which has been trouble free and user friendly. (microtorrent can be a bit quirky with its RSS)
How do you find your current Raspberry Pi setup is in terms of ease of use?
Also...this epic case
(http://mymediaexperience.com/wp-content/uploads/2012/07/IMG_5602-300x235.jpg)
http://mymediaexperience.com/raspberry-pi-xbmc-with-raspbmc/
I'm shocked that they can achieve 1080p output with a US$35 device. Really I am.
-
Case is optional, check out this guy's "case" lol
http://www.youtube.com/watch?v=fGYCrYT114o
The hard part about the Pi is setup, having no Linux experience I had to go through some Raspberry Pi specific tutorials. It wasn't that hard just quite a few steps to go through in terminal. I like the fact that you can use the Pi headless and remote in via SSH. I also have tight vnc running so I can remote into the desktop if necessary. Once everything is setup you can pretty much put the Pi out of sight while it handles downloading any files you want. As mentioned in the previos post there are quite a few other uses for the Pi if you so desire.
I am not using it for torrents since I am a big fan of Usenet. Torrents are definitely supported though with a feature rich client called Deluge (this can be remotely managed as well)
-
hhahaha, that case is EPIC, almost as wicked as the lego case.
I'm no stranger to linux so that isn't a deal breaker for me
How would you rate the ease of use of downloads with your current implementation? automated in particular.
Really happy with the Vuse + RSS solution right now which I'll give a 10 out of 10. Wondering if your setup is going to provide a similar level of convenience?
Can you hazard a number out of 10 at this stage? Or work still in progress?
-
I'd still say it is a work in progress. If you read through the tutorials I posted and check out Sickbeard and Couchpotato you would be impressed. The one downside I'd say is download speeds, I always use SSL so that adds some CPU overhead and reduces download speeds. I get around 800KBps on usenet, if I use my pc I could get 2.8MBps or so. It doesn't really bother me since I have this Pi on all the time downloading stuff in the background. If you want blazing fast speeds you might be better off with something more powerful.
-
It can be used as a HTPC once you keep in mind its limitations in terms of file support.
The Only Raspberry Pi XBMC Tutorial You Will Ever Need
http://mymediaexperience.com/raspberry-pi-xbmc-with-raspbmc/
-
800K is fast enough. Plus it won't saturate your bandwidth so you can still game respectably in the meanwhile.
I'm familiar with sickbeard and couchpotato but the RSS solution was far easier to implement, which is why I kept asking about ease of use...to see if things have changed of recent.
Aye, and I just linked the raspberry xbmc guide earlier, did you miss it? lol
The Only Raspberry Pi XBMC Tutorial You Will Ever Need
http://mymediaexperience.com/raspberry-pi-xbmc-with-raspbmc/
http://mymediaexperience.com/raspberry-pi-xbmc-with-raspbmc/
I'm shocked that they can achieve 1080p output with a US$35 device. Really I am.
-
Yeah I see the limited download speeds as a plus since it doesn't affect gaming or streaming of netflix etc.
https://www.youtube.com/watch?v=LIUgQEKxjNU
In terms of RSS support, the deluge torrent client can do this with a rss plugin such as YaRSS
Check out this - HOW TO TORRENT TV SHOWS VIA RSS USING DELUGE
http://www.bauer-power.net/2013/11/how-to-torrent-tv-shows-via-rss-using.html
-
That is EXACTLY what I was looking for.
+1
Very easy.