This is a quick set of instructions on how to install PlexConnect as a daemon in a jail on FreeNAS.
Why do I want it?
If you have an Apple TV (the black ones that are the size of a hockey puck) and you want to be able to access your Plex Media Server content on it, this howto is for you. If your Apple TV is the new one (late 2015) with the app store, this is not really applicable, because there’s a nice Plex app available.
What does it do?
PlexConnect replaces the Trailers channel on an Apple TV with your Plex Media Server’s library. You can access your Plex content and you don’t have to jailbreak your Apple TV.
- You have a working Plex Media Server on your local network.
- You have a working PlexConnect for Linux installed somewhere. If not see the PlexConnect Install Guide Linux.
- You know a bit about using the web gui of your FreeNAS.
- You know what DHCP is and what static IPs are.
- You can use vi enough to add some stuff and change some stuff in a text file.
Setting up the jail
- In your FreeNAS web GUI, open the Jails tree item on the left hand side and click Add Jail.
- Call your jail something sensible, like PlexConnect.
- Click OK. The jail will be created.
- In the Jails view (click on Jails in the toolbar on top if you’re not there already) click on your newly created jail and then the wrench icon (settings), and if you don’t want keep fiddling with the settings in your Apple TV, give it a static IP address by changing DHCP to an IP address. Alternatively, in your router, give it a DHCP reservation so it always gets the same IP.
- Get into the jail’s command prompt, by selecting the jail and clicking on the command prompt icon at the bottom. A shell window will open up.
- Update the jail by typing “pkg update && pkg upgrade -y”. This will update all the packages in the jail.
- Get a directory listing of the /usr/local/bin directory. I don’t know why, but it probably contains /usr/local/bin/pyton2.7, but no /usr/local/bin/python. Since this is quick and dirty, I didn’t bother to figure out why.
- Link the python2.7 executable to python, so the PlexConnect scripts can find it: “ln /usr/local/bin/python2.7 /usr/local/bin/python”.
- Install the bash package. The PlexConnect start/stop script needs it. “pkg install bash”
Get PlexConnect installed.
- Take your whole PlexConnect directory from your working install on your Linux box, and copy it inside the jail to /usr/local/share/PlexConnect. You could use scp, or whatever other means you have to get stuff into your FreeNAS box. For reference, the root of the filesystem of the jail is visible inside the FreeNAS primary environment under /mnt/<your volume>/jails/<name of your jail>.
- Edit the file /usr/local/share/PlexConnect_daemon.bash using vi.
- Change #!/bin/bash to #!/usr/local/bin/bash
- Change the line that starts off with INSTALL_DIR to INSTALL_DIR=”/usr/local/share/PlexConnect”
- Change the line that starts off with PYTHON to PYTHON=”/usr/local/bin/python”
- Link the PlexConnect daemon, PlexConnect_daemon.bash, into /usr/local/etc/rc.d/ This will make it automatically start and stop with your jail. “ln /usr/local/share/PlexConnect/PlexConnect_daemon.bash /usr/local/etc/rc.d/PlexConnect_daemon.bash
- Try to start the service. “service PlexConnect_daemon.bash start”. The output should be something like Starting PlexConnect…
- See if it’s running. “service PlexConnect_daemon.bash status”. The output should be something like PlexConnect is running.
- PlexConnect will now start automatically whenever this jail starts.
Setup your Apple TV
- Go into your Apple TV’s General settings, under Network.
- Where it says DNS settings, change the DNS server to the IP address of your PlexConnect jail.
- Test by trying to go to the Trailers app on your Apple TV. It should load your Plex Media Library.
We had an old Sun x4500 that needed repurposing, and I wanted an easier-to-manage user interface for storage management. I decided to install FreeNAS 9.2.0-RELEASE on it, which is a converged storage platform based on FreeBSD.
The x4500 has a whopping 48 disks, and two of those disks are bootable. The bootable disks are the ones connected to controller 4, port 0 and controller 4 port 4. When it’s running Solaris, the devices are enumerated as c4t0d0, and c4t4d0. FreeBSD uses a completely different numbering convention for SATA disks, so the only real trick to getting FreeNAS installed on these boxes is to know which disk to put the operating system on.
The two bootable disks show up in FreeNAS as devices ada24 and ada28. The one on ada24 is the default boot disk that Solaris called C4T0D0. When you boot the FreeNAS install CD, eventually you are asked to choose a disk to install FreeNAS onto, and the list has disks from ada0 to ada47. If you choose ada24, and let it finish its install, everything will work out as expected, and your Thumper will boot into FreeNAS when you restart it.
I used to have an old set of Koss K6/ALC headphones when I was a teenager. They were big, loud, and suprisingly good. I used to have a 15 foot extension cord for them, and I’d listen to them in my recliner in my room, playing Pink Floyd and Beethoven, which A Clockwork Orange hooked me on.
I recently was browsing around and discovered that the higher end Koss headphones made at that time, the Pro4AA, are still made, are available new. While I was buying something else on Amazon.ca, these popped up on sale, because Amazon is insidious and prompts you to buy stuff after you’ve looked at it, so I ordered a pair.
I plugged them into my recently acquired FiiO E09K headphone amplifier, and settled them on my noggin. They really only weigh half a tonne. I’ve been listening to Pink Floyd all afternoon, with a little Vangelis thrown in for variety, and these things are as awesome as I remember my old ones from the ’80s being.
They’re also built like a tank. I expect that lifetime warranty is not as hard to live up to for Koss as one might think.
It was a good purchase. Plus, they’re the best sounding headphones you can get for under $200, and they can be had for $60 if you find a sale.
I recently received my Raspberry Pi computer after months of excited waiting. It arrived in this nondescript package.
In the tradition of people buying and opening beautifully packaged new Apple devices, I thought I’d produce an Unboxing blog entry.
Inside the envelope, there was a page of compliance testing statements for numerous countries, a packing list, and the elaborately packaged Raspberry Pi. I must say that the Canadian emissions compliance statement is the most concise and reasonable of the nations represented.
After opening the small box, I had to take back the “elaborately packaged” comment. The packaging consists of an anti-static bag in a box that’s about as robust as one for playing cards.
Here’s the Pi in all it’s minimalistic glory. It’s even smaller than I expected, despite the designers taking up a couple of square centimetres for the Raspberry Pi Foundation logo.
Here it is compared to my moderately large hand for a size comparison. These things are tiny!
Somebody asked me about this on Twitter, so here you go:
Some whiskey drinkers love the purity of the flavour of their whiskey. They may want it chilled, but they might not want the pure beverage to be diluted by melting ice. A company has tried to come up with a solution to this problem with a product called Whiskey Stones. They are small ice-cube sized cubes of soapstone, that a whiskey drinker chills in the freezer, and then puts in his glass of whiskey to chill it. It’s a neat idea, but how effective are the stones at chilling the drink compared to regular ice cubes?
Presuming that we take a standard two ounce shot of 80 proof whiskey, which is about 55 grams, from a bottle at room temperature (19 deg C), and then use a standard freezer at -15 deg C to prepare both ice and the Whiskey Stones, what is the difference in cooling of the beverage? I will use the same volume of Whiskey Stones (which are 11 mL each, so I’ll use 3) and ice cubes in my two scenarios. 33 mL of Whiskey Stones are about 96 grams, and 33 mL of ice cubes are about 33 grams.
When you take two things with different temperatures, and put them together, energy will flow from the warmer thing to the colder thing, until both things are the same temperature. This is one of the implications of the second law of thermodynamics. If you have a perfectly-insulated glass, all the energy that comes out of the whiskey as it chills is transferred to the ice as it warms up and melts, or to the stones as they warm up, until a temperature equilibrium is reached.
The amount of energy it takes to warm something up depends on the material it is made of. For ice, it takes 2.11 joules (J) of energy to warm up 1 gram (g) by 1 degree C. For water, it takes 4.18 J. For whiskey, which is a mixture of alcohol and water, it takes about 3.4 J. Conversely, as something cools, it gives up energy according to the same figures. Water gives off 4.18 joules per gram as it cools one degree.
Additionally, as a solid melts into a liquid, it also absorbs energy, without changing temperature. It takes 334 J of energy to change 1 g of ice into 1 g of water at 0 deg C.
Any energy that comes out of the whiskey goes into the ice, water or stones.
To see how much energy is absorbed by the ice, I will calculate how much energy it takes to warm ice at -15 degrees up to zero, and then melt it all into water.
First, assuming 33 mL of ice starting at -15, it takes 15 x 33 x 2.11 = 1044 J to warm it up to zero degrees. Next, to melt that ice into water, it takes 334 x 33 = 11022 J. That means that to convert all the ice to water, it takes 12066 joules of energy.
How cold does the whiskey get if we remove 12066 joules of energy by transferring it into the ice? The change in temperature is equal to the energy transferred, divided by the specific heat of whiskey times the mass of the whiskey. T = 12066 / (55 x 3.4) = 64 degrees of temperature change. If we started at 19 degrees, the whiskey can’t drop all 64 degrees, because the second law of thermodynamics says that energy will flow from a hot thing to a cold thing until the two things are the same temperature. That means that the whiskey will reach 0 deg C before all the ice melts, and then it will stay at that temperature.
For the stones, I have to take a different approach. I know that any energy that comes from the whiskey as it cools, goes into the stones as they warm up. If the final temperature is called F, I know that 19 deg -F = the change in energy of the whiskey, divided by the whiskey’s specific heat multiplied by the mass of the whiskey. I also know that 15 deg + F = the change in energy of the stones, divided by the stones’ specific heat multiplied by the mass of the stones. In both equations, the change in energy is equal but opposite, so that allows me to solve both equations for F, which turns out to be 7.6 degrees C.
That means the coolest the whiskey can get using the three stones is 7.6 degrees, but with the ice, it’s zero degrees C.
We are currently evaluating some Riverbed Steelhead WAN accelerators for our network. I arranged to get two larger ones and one smaller one, for three of our offices. I went on a road trip to install two of them today.
My experience so far is that 1/3 of them were DOA. Of course, that’s working with a sample size of 3, so it’s not statistically significant. The other thing I found out is that Riverbed’s technical support is extremely responsive (at least in the pre-sales phase, but I have no reason to suspect it’s different after you buy them). They can also deliver a replacement under an RMA for a dead unit in less than 24 hours to our offices. That’s pretty impressive.
brought it to me to look at yesterday. It’s a surprisingly nice little
device. It felt solid, and the user interface was pretty responsive.
The email program connected to her Blackberry smartphone, and
apparently the email only supports working through a
bluetooth-connected Blackberry, so that’s a severe limitation. There was a web browser that could be used to get online through the
connected Blacberry as well, but the included Gmail, Yahoo Mail and
Hotmail icons didn’t work that way. Those apps can only connect via
Wi-Fi. That seems to be another very stupid limitation. It came with Documents to Go, which provides Word, Excel and
Powerpoint, and it also has an Adobe Reader app, so you can access
your office documents. Plugging it into a computer makes it show up as
a USB hard drive, so you can just copy your files onto it. For
business use, that makes it superior to the iTunes-centric philosophy
of the iPad, in terms of files. The Adobe Reader app seems to have a
foolish limitation that renders it almost useless: It can’t search
within a PDF file. If you open a 500 page PDF, you can’t search for a
word and jump to that page. For big engineering contract documents,
that severely limits it’s utility. I think the future models that have integrated 3G will be more
compelling. Either that, or they could make the bluetooth internet
connection through the Blackberry smartphone more fully featured so
that apps that work over WiFi also work over the Blackberry
connection. She’s going to use it for work for a while and then
hopefully I can talk to her again about how it’s going. We need to figure out some kind of a strategy for tablets. More users
are starting to ask about them.