Install Sabnzbd on Debian Linux

Sabnzbdplus is a classic newsgrabber written in python. It works very well with Couchpotato, Sickbeard and Nzbdrone for building your automated PVR system. This site has moved to HTPC Guides

Install

We need to add repositories

echo “deb http://ppa.launchpad.net/jcfp/ppa/ubuntu precise main” | tee -a /etc/apt/sources.list
apt-key adv –keyserver hkp://pool.sks-keyservers.net:11371 –recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F
apt-get update && apt-get upgrade

Install sabnzbdplus

sudo apt-get install sabnzbdplus

Fire up WinSCP, browse to and open etc/default/sabnzbdplus and change the following

USER=root
HOST=0.0.0.0
PORT=8080

Restart the service

service sabnzbdplus restart

Sabnzbdplus will automatically start on boot J

Configure

Advertisements

Turn Android Device into MPD Music Server

I had an old android device laying around and wanted to turn it into a wireless music player for my bedroom.

It is an old Desire HD which I managed to root and install Cyanogen Mod 10.1 so it was compatible with aMPD.

There is already mpd for linux devices and luckily tguillem has ported mpd to android! The device must be running at least jelly bean.

 

Installation

Grab the latest aMPD apk onto your android device through a browser.

Install it by browsing to a file manager.

Alternatively grab it from the Play store

Done!

Configure Storage

You have two options for storing your music

  • locally on an sd card or through a usb hard drive connected to your phone
  • remotely on a NAS or samba share

If your collection is not that large then a large enough microsd card will suffice, you can skip to the next section

If your collection is quite large and stored on a NAS or htpc, I suggest mounting the network share using Mount Manager

Configure Mount Manager

Go into settings first

Change the following options to match the screenshot below

Click back and now add the network share

Type in your share path

//Ip.address/Sharename

Let the mount point stay default

Check Auto Mount

If you need a username and password to access the share press the green plus sign twice

Enter the username and password and press Ok

Now the mount should look like this

Tap it and the greyed out checkmark should turn green

Configure aMPD

Change the options to match below but change your music directory to the local or mounted solution

If you have problems with skipping audio you can uncheck Use Mixer.

Try connecting using an mpd client (LINK) and start streaming music from your old android phone J.

Mounting drives in Debian linux

This guide will cover mounting drives for your htpc media server: samba shares on windows machines and local ntfs formatted hard drives connected via usb to your box running Debian.

Samba

This is for mounting a network drive samba share. This can be a drive or folder shared on a Windows machine you want to access from Debian.

First make sure cifs-utils is installed

sudo apt-get install cifs-utils

Now make sure you can access the samba share

smbclient \\\\remotemachinenameorip\\sharename -U usernameonwindowsmachine passwordonwindowsmachine

If you did not get an error all is well try and list the folder’s contents

ls

Now create the mount point, in linux you create a folder that you want to act as a symbolic link for the network drive

mkdir /path/of/folder/on/linux

Now we mount the network drive, remember your network drives are case sensitive

mount –t cifs //networkip/share /local/linux/folder –o username=usernameonwindowsmachine,password=passwordforwindowsmachine

Make this network drive automount on boot

Fire up WInSCP, browse to and open /etc/fstab and add the following line

//networkip/share /local/linux/foldermountpoint cifs defaults,username=usernameonwindows,password=passwordonwindows 0 0

Make sure you press enter after pasting this line or you will get an error on boot

NTFS Local Drive

Make sure you have ntfs-3g installed

sudo apt-get install ntfs-3g

Now determine the sda path of the usb drive.

Plug in the usb drive and you will see some messages on the debian box

[ xxx.xxxx] sdc 3:0:0:0: [sdc] Assuming drive cache: write through

[ xxx.xxxx] sdc 3:0:0:0: [sdc] No Caching mode page found

At this point it is safe to assume that the drive is sdc1 (but see below)

Create a mount point to act as a symbolic link for the drive

mkdir /place/to/mount

Mount the drive, sdc1 should be replaced with the sdx you found when you plugged in the drive

mount -t ntfs-3g /dev/sdc1 /place/to/mount

Now you can make it automount on boot

Fire up WInSCP, browse to and open /etc/fstab and add the following line

/dev/sdc1 /place/to/mount ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0

If on reboot the drive fails to mount it may be because linux assigned it a different letter when it was plugged in.

Since you will probably be keeping this drive plugged in at boot, you can go to the /dev folder and find how linux is assigning it

cd /dev/ && ls

You will get a screen like this. sda is used for the primary hard drive so look for the first sdb or sdc that is unassigned. Here it is sdb1.

Go back and edit /etc/fstab and change the sdx1 to the correct identifier you just found.

Make a Debian Music Server to Stream using MPD

We are going to install mpd (Music Player Daemon) so you can listen to music anywhere in your home you have set up an old computer to run linux.
This is another way I’m turning an old Dell Mini into something useful. I can now listen to music stored on a NAS (minidlna server)
by streaming it though the Dell mini and It plays music in my kitchen through speakers.

This assumes you are running Debian wheezy and have already mounted your drives that contain your music.

If you need to mount your drives follow this guide (LINK)

Install mpd

First install alsa-utils which you may need later to control your volume

sudo apt-get install alsa-util

Then install mpd

sudo apt-get install mpd

Configure mpd

Time to configure the mpd server so you can connect to it with a client

Fire up WinSCP and browse to and open /etc/mpd.conf

You will mostly be deleting #s

Choose the location of your music database

music_directory        “/path/to/music”

if you don’t’ want to enter a username when connecting comment out user by adding a #

#user                “mpd”

Make the mpd server bind to all available network addresses or alternatively specify an IP address.

bind_to_address        “any”

Doing this you may get an error when you restart the service that says:

mpdlisten: bind to ‘0.0.0.0:6600’ failed: Address already in use (continuing anyway, because binding to ‘[::]:6600’ succeeded)

This is harmless and the mpd server will still work J

Make the mpd server listen to port 6600 (default)

port                “6600”

You can enable metadata so your mpd client player will look appealing

metadata_to_use    “artist,album,title,track,name,genre,date,composer,performer,disc”

If your library updates frequently consider enabling autoupdate by uncommenting (removing #) for this line

auto_update “yes”

You can password protect the mpd server using this line, change passwordyouwanttouse

password “passwordyouwanttouse@read,add,control,admin”

All done, hit save in WinSCP and restart the mpd server from PuTTY ssh.

service mpd restart

Now grab a client, I have a list of popular clients here (LINK) and enjoy streaming your music through that old laptop.

My volume was very low when playing music from this mpd server which I fixed with alsamixer.

alsamixer

You will get a funky screen like this

You navigate by using the keypad, whichever box has red text is the one you are controlling.

Use left and right to switch between devices and up and down to turn up the volume.

I recommend maxing Master until it turns red and either your speakers or the headphone jack (or both) to the same level.