Fincher's Follies

Yeah… just let someone else host it

Browsing the archives for the Geeky Stuff category.

2017 Ford Fusion Energi – My First 1000 Miles

As a (now former) owner of one of the VW cheater diesels, I finally got the paperwork together to go through with the buy-back process. This means it was car shopping time!  When I got the Jetta, environmental friendliness was high on my list of priorities (little did I know). That remains true, and if anything, has strengthened! So I began my normal car buying process (spreadsheets for the win!).  I focused on hybrids and electrics, though Maricruz preferred a larger car as it would also be serving time as a munchkin carrier.  Not many large hybrids/electrics are available, and those either only get good gas mileage for an SUV (Toyota RAV4 Hybrid – 34/30mpg), are expensive (Tesla Model X – $77k base), or both (Toyota Highlander Hybrid – 30/28mpg and $47k base).  

Given this, I mostly focused on the larger hybrids and settled on the Ford Fusion. I wasn’t sure whether I wanted to go with the cheaper regular hybrid, or go ahead for the Energi (the plug-in version). I decided to go with the Energi SE because not only is the battery larger (ability to drive electric-only and longer range), but being a plug-in could give me a bit of a preview if I decided to make the leap into full electric next time we are in the market. It has been an interesting ride so far!

It took a few days of getting used to, but I have pretty well gotten into the habit of plugging it in when I get home and unplugging and putting away when I head out. Unfortunately, you aren’t supposed to use extension cords (most sites say you can if you get a very heavy gauge one), and our garage doesn’t have many accessible plugs. Luckily, I discovered that the garage door opener uses a normal plug and only uses one of the two available. It feels a little janky having the cable hanging down from the middle of the garage ceiling, but it gets the job done.

One of the things I really appreciate about the car is the amount of information at your fingertips. There are a wide variety of choices for information display (from “leaves” that grow when you drive more efficiently, to breakdowns of how you are doing with regard to different categories of driving and the resulting effects on efficiency), and I always love information! You can do some customization as well. In addition to dash readouts, there are also displays on the main media console you can pull up, like one that gives a diagram of your car and the current direction of energy flow (e.g. the battery is running the electric engine and cabin components, or the gas engine is running and also charging the battery).  I knew pretty soon I was going to have to make a post, because it just felt too geeky not to share! I had initially figured I would write up a post summing up my first tank of gas, but it turns out that was taking too long and I got impatient. So first 1000 miles it is!

I found that having all these readouts about how I was driving had a great effect on my driving style. I tend to like to go fast and drive semi-aggressively, but having so much information in my face indicating how negative an effect that was having has reduced me to grandpa-ness, lol. I definitely am much more aware of my accelerations and braking early, and I have realized some benefits for sure. As you can see in the photo, I averaged a whopping 229.6 mpg for the first 1000 miles, and used about 3/8 of my 14 gallon gas tank. I’d call that pretty impressive! Unfortunately, I don’t have a good method to determine exactly how much electricity it consumed for charging, but all I have read indicates that electric miles are notably cheaper than gas miles. 

With my conservative driving, I am getting pretty close to 28 miles in electric-only mode (which well exceeds the advertised 21 mile electric range). Only downside is that, when I have munchkin pickup duties, my daily commute is closer to 29 miles. So I can almost squeeze it out, but pretty consistently revert to regular hybrid mode near the end of the drive. I’ve explored some options to get that last little bit covered, but so far I haven’t seen a viable one.

One option I have found is to drive to the nearest free charger (~2.5 miles), but that means I have to use close to a full hour for lunch, plus it seems silly to add 25 miles a week to my driving just to charge. Alternatively, I’ve been exploring the solar panel option. While it doesn’t generate much, I think a solar panel in a Florida parking lot could definitely get me that extra mile on most days. It is just a matter of actually getting the electricity generated into that pesky battery! That or see if I can convince my job to put in some EV chargers 😉

Overall, I’ve been very pleased. The trunk is tiny, but I don’t really utilize it much, and the cabin is more spacious than the Jetta was. Plus, knowing that I am pretty confident that I made an environmentally friendly choice this time makes me very happy too! 

Colorizing Bash Command Line Output

Currently, a great majority of my professional development is in Perl.  Additionally, we have had a focus on building more robust unit test scripts for the code that is written.  Especially as the tests have started growing pretty large, I started looking for ways to make the test output a bit more readable.  Since these are built using existing perl packages like Test::More, I am somewhat limited in my customization choices.  When looking for possibilities, most of the answers that I found were code that you could add to your script to do the colorization.  Unless I wanted to build custom versions of the packages we use, that wasn’t the best option.

I also looked into multitail since I had used that for colorizing some log outputs, but it never seemed well suited for taking the output of a single-run script.  Not only is scrolling around a bit awkward, but it doesn’t tend to like to leave the output available after the run. Multitail does ok if you first redirect the output to a file, then multitail that file, but that is a bit more difficult to swing if you don’t want be switching between windows (plus it leaves a file that you’ll need to clean up at some point).

What I ended up going with was this script.  The nice thing about it is that it could be pretty easily tailored for whatever script for which you wanted to colorize the output. As it is currently written, it makes the output of Perl’s Test::More .t files a lot clearer and nicer to look at!

 

 

To use it, I run something like perl test.t 2>&1 | ./colorize.sh which results in output like this.

Screen Shot 2016-07-03 at 5.57.37 PM

I’m sure that I could do some more customization, but I was pretty happy with how it turned out. It colorizes the different statements that we tend to have, and catches kill signals so your colors will reset to normal if you kill the run before it finishes. If I do make any updates, I’ll add them to the gist (which happens to also be my very first gist!)

My foray into cryptocurrencies

BC_Logo_The other day I had skimmed  yet another article about Bitcoins when a buddy of mine sent me a message asking if I had ever done anything with them. I said I hadn’t, but soon started to get interested. I was more interested in the technical aspects than looking at it as an investment. I definitely didn’t want to buy any cryptocurrencies directly but was interested in mining. From what I’ve read, the basic gist of mining is that there are block chains that must be maintained for sustaining the currency. If you calculate the next block (a computationally complex task) you are rewarded with Bitcoins. This process is called  mining. Most of what I read indicated that, at least for Bitcoin, it isn’t really worth getting into mining unless you are going to seriously invest in a large mining rig. If you are are just running some things on your own computer, it is likely that every block you calculate has already been calculated by someone else. In this instance, you are not rewarded the coins. Additionally, people have made great strides to create hardware specifically for the task of Bitcoin mining. This has made it even more difficult for casual miners to get involved. One alternative is to use pools. As the name indicates, a group of users “pool” their resources to try to calculate blocks. There are different ways pools distribute, but the basic idea is that everyone works to calculate a block, and when it is calculated, the resulting bitcoins are distributed to the pool.  Depending on the distribution system, this can be a handy way for someone to get into mining that doesn’t have a lot of resources at hand.

Another avenue is to mine alternative cryptocurrencies (altcoins). There are a large number of other currencies similar to Bitcoin that have been created and new ones are constantly being announced. Some are very similar to Bitcoin. Others use different algorithms to make it more difficult to use specific mining hardware that is popular for other coins. As I started perusing them, I noticed Rubycoin. How can I pass that up!? 🙂 imgresI looked into solo mining, but decided to just start out with a pool. I can’t remember how much I looked around, but dedicatedpool is a site that has pools for various altcoins so I went with their Rubycoin pool. As I was just starting to play around, I kind of alternated between CPU mining with CPUminer and GPU mining with either cgminer (on the machine with an AMD graphics card) or Cudaminer (on the machine with an Nvidia graphics card). As I explored different currencies, I had to find nuances (after 3.7.2, cgminer no longer did GPU mining, sometimes I got a specific build for my OS or for a specific coin, etc.) Anyway, back to Rubycoins, it didn’t take me long before I was approaching 1000 Rubycoins. It might sound kind of impressive, but current market value says that is equal to about $1.43 haha. I’ve gone back and forth with this pool occasionally, but I still just thought it would be cool to have Rubycoins so I’ll probably hold on to those. Next I tried out a Litecoin pool, but I got impatient (probably because Rubycoins are currently easier to generate so I saw results much sooner). Litecoin is one of the most difficult (though valuable) of the altcoins, but seeing my balance just sit at 0 for so long got a little frustrating so I started to look around a bit more.

I went on a wallet downloading spree and was actually surprised that many of them wouldn’t sync. If you recall the blockchain I mentioned earlier, you have to sync with the blockchain to know the status of the currency. If you don’t know the status, you can’t mine or make transactions. Numerous wallets I downloaded wouldn’t even begin to sync (Windows seems most supported, followed by linux, then OSX is trailing), but I ended up with about 8-10 different wallets that did work. I haven’t done anything with most of them, but figured I would keep them on hand for the time being. By this point, I had only been playing around with my CPU and GPU for mining, but thought it might be interested to check out an ASIC miner (used for Bitcoin and those that use the same algorithm). An ASIC miner is an example of the specialized hardware I mentioned earlier. As an example, I can typically calculate about 230 khash/s with my GPU. This ASIC miner calculates 2.4 Ghash/s, or about 10x as many while using much less power than a GPU. I was able to find one on Amazon, and since I had become sufficiently interested, decided to keep a little better track of how things went (once I was sure everything was up and running properly). Obviously, one little miner is not going to be enough to do solo mining so I decided on BTC Guild as my mining pool. Here’s my first experiment. 81VWOnaiZ8L._SL1500_ Bitcoin mining with 1 Antminter U2 ASIC miner

2014-04-17 11:45 starting balance : 0.00023823
2014-04-21 11:45 ending balance : 0.00087594
Total time: 4 days
Total BTC generated: 0.00063771
At time of completion, 1 BTC = $499.80
Total amount of US dollars generated: ~0.32 or 32 cents
US Dollars generated per day: ~0.08
Cost of ASIC miner: $22.87
Assuming uninterrupted usage and stable bitcoin value, time to recoup costs: ~286 days

 

Obviously, that doesn’t exactly sound like a major profit generator. Assuming all things remain equal, I  could recoup costs in about 9 months. Afterwards, I would be making about 29 dollars a year. Due to the nature of how mining works, there isn’t a linear increase in output if you have more miners. If you think about the most extreme case, I could set up a bunch of mining rigs such that my computer power was 10x greater than what exists now. In that case, I would be much more likely to get a great majority of all the blocks. Likewise, if I have very little computing power, it is likely that every calculation I finish has already been done and I could never earn anything. Because of this, I decided to try out adding a couple more miners and see if my computer power is still so small that it appears linear or if I could actually see an appreciable difference in gains.

I ran into a couple of issues during testing of the additional miners, so I decided not to do a full test. I’ll still have them running so I may do a recap, but for now I’m not going to spend time on it. As I’ve mentioned, mining has varied degrees of difficulty. Right as I was trying to test using multiple miners, it appeared the difficulty either increased or the number of people in my pool increased causing my mining to be less productive. Obviously a long term test would be needed to really iron out some of these results. I also had some weird issues with running them on OSX. I can’t really overclock them, they run hotter than normal, and after a while they just cut out (could be related to the overheating). Hopefully, I didn’t damage them in the process of testing, but it is obvious that there is room for improvement when it comes to using these miners on OSX.

While I was doing these experiments, the same buddy I had talked to earlier mentioned a pool called Middlecoin. This pool does what is called “hopping.” Basically, the manager of the pool looks at what altcoin is most profitable to mine and diverts resources to it. When that coin becomes difficult, the resources are then diverted to a less difficult currency. People who are really into mining a specific currency kind of frown on this, but from a profitability standpoint, it does make sense. So the Middlecoin pool operator manages which currency is being mined, then converts it all to bitcoins. The only downside so far is that there isn’t much feedback. Since it doesn’t require registration, it doesn’t keep track of your different “workers” like many pools do. I have found this kind of handy, especially because I have been in and out of mining with Middlecoin, and since I haven’t kept track very well, it is hard for me to give an estimate about how much I am earning vs. the resources I am expending. While I usually have multiple things working with Middlecoin, I figured I would isolate a worker and use them for the profitability study later. logoI also was interested in seeing if there were any altcoins that might be worth mining solo. While it may not be as profitable, it seemed like a logical extension of my exploration. I referenced CoinWarz many times throughout this process, and I used it to find a coin that had a low difficulty.  I ended up deciding on GPUcoin. While they aren’t worth much, the difficulty was low enough that I figured I would at least have a decent chance of actually mining some coins. For this I used my primary graphics card, a GTX 760 which maintained a hash rate of approximately 117 khash/s (the algorithm used for GPUcoin makes this number about half of what you would expect if you were mining a scrypt-based altcoin, which most of them are). My block finding went as follows.

GPUcoin mining locally with GTX 760

2014-04-22 22:37 - Started mining
2014-04-23 2:42  - 4:05 hours of mining
2014-04-23 12:26 - 9:44 hours of mining
2014-04-23 19:36 - 7:10 hours of mining
2014-04-24 2:34 - 6:58 hours of mining
2014-04-24 3:27 - 0:53 hours of mining

I’m glad I left it running as long as I did because the last block I completed was a great example of how there really is an element of luck, along with varying difficulty levels, in the mining process. Obviously, this variance makes it a little difficult to calculate profitability, but here’s what I have (excluding power consumption)

Total mining time: 35 hours
Total coins generated: 120,000
Approximate GPUcoin value: $0.00000511
Total amount of US Dollars generated: $0.61
US Dollars generated per day: $0.42
Annual generation: $153.49

 

So that actually doesn’t sound too bad. It still assumes a non-fluctuating market value and a coarse estimate of rate generation. To actually know how that translates to the real world, I’d have to get some power consumption values. Additionally, there doesn’t seem to be good data on how pushing your hardware this hard can affect its life. Obviously, having something run full throttle makes it very hot and wears out the components faster, but I haven’t seen much about hard numbers. Annual generation is kind of silly to calculate if running the card that hard will likely make it die in 6 months. Also, it really doesn’t make sense to calculate profitability without incorporating electricity costs. If I decide to get into it further, I’ll do more rigorous testing, but since I just picked up a Kill-a-watt to measure energy usage, why not run a few numbers? I didn’t really want to spend a long time testing (and for the peak running I didn’t want to stress my computer too much) so I just did some short tests.

Computer running mostly idle (avg over 13 hours)
0.1294 kwh
Running both GPUs for one hour
0.37 - 0.1294 = 0.2406 kwh over idle
Running all 8 CPU cores for one hour
0.22 - 0.1294 = 0.0906 kwh over idle

 

Now to calculate costs fully, I would have to contact the City of Tallahassee. The rate listed on their site is $0.06682 per kwh, but if I back calculate from last month’s bill I get $0.1247 per kwh.  Since I don’t really know the reason for the discrepancy, I’ll look at both. I’ll also look at the difference over idle to see the effect of mining with my current computer vs. building a dedicated mining rig. Since it is a rough calculation, I’ll just assume 30 days per month.

Full usage
CoT rate
GPU: $17.80
CPU: $10.58
My calculated rate
GPU: $33.22
CPU: $19.75

Over idle usage
CoT rate
GPU: $11.58
CPU: $4.36
My calculated rate
GPU: $21.60
CPU: $8.13

 

Definitely enough of a difference that I would really want to ensure my rate before I knew what I was getting into.  So if I take these numbers along with the GPUcoin and middlecoin numbers, I can do a rough profitability calculation. Now I only used my primary GPU for generating GPUcoin, so the monetary generation is actually a little low, but the primary GPU accounts for 77% of the khash/s so I can adjust it accordingly.

Profitability for solo mining GPUcoin full cost
Calculated revenue per day: $0.545 
Calculated revenue per month: $16.36 
GPU + CoT rate profitability: -$1.44 
GPU + MyCalc rate profitability: -$16.86
Profitability for solo mining GPUcoin over idle
Calculated revenue per day: $0.545 
Calculated revenue per month: $16.36 
GPU + CoT rate profitability: $ 4.78
GPU + MyCalc rate profitability: -$5.24

Middlecoin estimates
Time from start to first payout: 10 days
Average hash rate: ~250 khash/s
Payout: 0.01080921 BTC = $5.00
Calculated revenue per month: $15.00
GPU + CoT rate profitability: -$2.80 (full) or $3.42 (over idle) 
GPU + MyCalc rate profitability: -$6.60 (full) or $6.87 (over idle)

 

Now we see why the electric rates in your area should really be incorporated if you are looking to get into any kind of mining. Obviously, this ignores the possibility of the coin increasing (or decreasing) in value. I was pretty surprised with the middlecoin numbers. I’m sure that there is the same disadvantage since I do not have a powerful miner, but I would have expected that hopping from coin to coin would have been more profitable that a single coin, especially when the single coin was done with solo mining. No matter what, even the most profitable prospect was pretty minor. While it isn’t profitable now, it may eek across the line depending on how much the usage would increase if I would to upgrade my second GPU to something more powerful. Also, there is the possibility that it turns into an investment (albeit a risky one) since the value of any of the cryptocurrencies can change quite a bit.  It also doesn’t look too good for a dedicated rig. Even if I could increase revenue around 5 fold and bring in $75 a month, it would be a pretty large initial investment that would take about a year to recoup and that’s without factoring in the additional power costs. No matter what, it doesn’t look like I’ll be mining myself into a millionaire just yet. 😉

Currently, I’m getting my BTC Guild account high enough to request a payout, then I will probably focus on Multipool. It was apparently one of the first hopping pools and seems interesting to try out. One of the main things I like is that it accepts scrypt (altcoin algorithm better for things like CPUs and GPUs) as well as SHA256 (algorithm for coin like bitcoin, used by ASIC miners). So I can have one site to check to see how any miners I have are doing. I don’t know if it will be the most profitable, but I like the cohesiveness of the experience. I may still occasionally solo mine some GPUcoin or mine some more Rubycoin, but we’ll see how Multipool goes for the time being.

It has been an intriguing exploration thus far. The ASIC miners don’t really have much of a purpose other than mining, so I will definitely keep them going. It is interesting to be sure, but I don’t think I have confidence in the cryptocurrency market enough to really invest much money into pursuing it. One that I will definitely keep an eye on is Gridcoin. What sets them apart is that they are incorporating the BOINC protocol into their mining. BOINC is used for large distributed computing projects like Folding@home, a project to study protein folding. Instead of a researcher investing in computing hardware, they create a BOINC project. Then any user can install the interface on their computer and contribute to the calculations (often having it run whenever the screensaver is running or something like that). It is a kind of cool way to contribute to large, complex computational problems. I really like the idea of incorporating that into the cyrptocurrency, but they are just getting started. Currently, they don’t even have native wallets for anything but Windows and using wine (the program they recommend) I can get it running but can’t update the block chain (rendering it pretty much useless). I’ll definitely be keeping an eye on them as they progress, but until then it will likely stay a pretty small little side project. I have also been surprised at the number of places that claim to give away cryptocoins. The main one I’m keeping my eye on is Qoinpro. They claim to “deposit” a very small amount of bitcoin (and other coins) into your account daily. Then referring people is supposed to give you a multiplier. I haven’t received anything yet, but I haven’t found a reason not to try things like this yet. If you want to give it a try, use my referrral! 🙂 And if anyone is already into cryptocurrencies and wants to reward my oh-so-thorough write-up, below are all the currencies I have wallets for if you want to send some cryptocoins my way.

Bitcoin (BTC) - 1LiA2hkQ7aUuQHuGE9VtnpcGqf1ee1BwjF
Rubycoin (RBY) - Rs8TtxCyfS1QoYrdExPGP3Mc9akuUCJDx6
Digitalcoin (DCG) - DL13tcpiuP7Tx8Hes87FypGJgXVZsfFVT3
Quark (QRK) - QQQtNiLdSviVKXhVi8V8VBGSqHxumhNxaz
GPUcoin (GPUC) - GPSY2dDVRC3XkZTApHAUuQWAMxusKZ1Lyn
Peercoin (PPC) - PEcopdSQVSy547hQZXXzN8TntkoNFHT958
Fedoracoin (TiPS) - ER2nLBEcEDjqLNWRBJ5wnXqHND2jjJb4E5
Litecoin (LTC) - LgP8o7uic7bwgw6HcoFi6PhZFY95Sa6sMy
Betacoin (BET) - B73kCkoawsowwZhf1yoq16kBF7QduyEfDv
Teslacoin (TES) - 5jprXpFPQ81zFxHVvU6DhzMm4YJgcVERtd
Dogecoin (DOGE) - DBpWNr1D7m4SWqv4LFaHLjqsc1Fnp5pehP
Feathercoin (FTC) - 6tPguJ79aDvGcauRDNp1Q8cnajwPYdDpnJ

Hackintosh

I have recently noticed that I am starting to have a few issues with my current iMac. My hard drive is nearing full (and it is a pain in the ass to replace with a larger one) and my optical drive died (I have been using a cheap external). Since iMacs are not very upgrade-friendly, I decided to check out the offerings from Apple. If I got a new iMac, it would cost quite a bit for (what I consider) a pretty marginal upgrade. The new mac pros that were announced look pretty awesome, but dadjum are they expensive! I started looking around and found that I could get something with more than enough power for less than half of what I would pay for a mac pro so I decided to go the hackintosh route. I started with this guide from lifehacker, and tonymacx86 has been an amazing resource. When figuring out what kind of hardware I wanted, I pretty much stuck to the list provided by tonymacx86 since most of those components had been tested so I would be less likely to encounter incompatibility issues. I hadn’t build a computer since the media server, and that was the first one I had built in many, many years. Thus, there were several times that I’d forget the order of a few key things (e.g. I always forget to install the little coverplate in the back before I install the motherboard), but otherwise it came together fairly easily. Since this was a larger build, I decided to put the basic components together to test them before I installed them in the case, and sure enough something wasn’t working! The motherboard would just power cycle and never boot even to BIOS. First I thought it was the power supply, so I picked one up at Best Buy to try and it gave the same result. I tried with varying numbers of RAM chips and still nothing so I assumed the motherboard was bad. After I returned it and received another one, I had the same thing happen. Initially, I thought it was the processor, but I decided to test the RAM a little more thoroughly and, sure enough, one of the ram chips was bad. Doh! So I got that return processed and then I had working components, and it was time to put this bad boy together!

Getting everything hooked up and tested

Getting things hooked up and tested

RAM looks so much cooler than it did back in the day

RAM looks so much cooler than it did back in the day

Video cards are also ridiculous behemoths compared to those when I started building computers

Video cards are also ridiculous behemoths compared to those when I started building computers

More testing

More testing

Getting the main hard drive situated

Getting the main hard drive situated

Getting everything in place

Getting everything in place

Nice removable hard drive shelf helps with installation

Nice removable hard drive shelf helps with installation

For the most part, the installation of OS X went according to plan. I had to tweak one graphics setting that was keeping it from booting up, but otherwise it pretty much went as the guide described. Gotta love it when things just work!  I left a partition on the main drive in case I want to dual boot. I’m thinking about throwing linux on there for now, then switching it to Windows so I can try out some PC gaming.

And we have OS X liftoff!

And we have OS X liftoff!

Way more badass looking than any mac I've ever seen ;-)

Way more badass looking than any mac I’ve ever seen 😉

The next thing I have to tackle is how I want to set everything else up with regard to my hard drive. Since I have both an SSD and a traditional hard drive, there are a number of ways I can set things up to best utilize them. One option is to just change the location of my home directory to reside on the hard drive. This would mean applications and system files would all be on the SSD, and I would have the large drive for all my music, movies, etc. The downside to this approach is that any applications that use temporary storage would use a directory in my home directory and would, therefore, not utilize the speed of the SSD. Another alternative, the one that I have chosen, it to leave my home directory on the SSD and have my large directories reside on the hard drive. This is fairly simple to set up because you just delete the folder (e.g. Movies), create a folder on the hard drive for all the files, then create a new Movies folder in your home directory that links to the one on the hard drive (e.g. ln -s /Volumes/BigHardDrive/Movies ~/Movies). Because programs don’t differentiate between an actual directory and a symbolic link, all application behaviors should remain unchanged. The other downside to this method (that wasn’t mentioned in the first descriptions of possible setups) is that you can’t use the Migration Assistant in the same way. Typically, I would use a Time Machine backup and import all my files and settings to the new computer. When you try to do this, it won’t let you merge the imported user with an existing user. Therefore, any symbolic links that you set up won’t be utilized when the data imported. Because of this, I can’t import because my SSD doesn’t have nearly enough space to hold everything, even temporarily, so I can set up the directories again. Additionally, what I have read indicates that you don’t want to try to copy files directly out of a Time Machine backup. The organization isn’t the same as just regular files. So I had to use an external hard drive to copy over all the large directories (in a couple of batches because the hard drive isn’t that large). It is a bit annoying because, had I known this was the approach I was going to have to take, I could have started transferring things a while ago and had them ready to load up as soon as the hackintosh was built. Live and learn I guess! 🙂

It is looking like I may also use this opportunity to upgrade some of the iLife applications I have been using. I suppose another downside to building your own hackintosh is that the iLife suite isn’t automatically loaded. Now that OSX is free, there is definitely no chance of a bundle.  I haven’t updated any iLife apps since 2009, apparently, so I imagine some improvements have been made in the past 4 years 🙂 I’ll probably just start with iPhoto then look into iMovie when I have some movie editing on the horizon. I debated just switching over to Aperture for all my photo organization, but my version is also at least 4 years old and a new version is like $80 vs. $15 for iPhoto. Luckily, the newer versions of these programs actually share a library, so what I have read indicates that switching to Aperture in the future would be pretty seamless. Here’s hoping! I figured I would put together a little spec sheet. If anyone stumbles upon this and has questions or wants more specifics, feel free to contact me. Just wanted to give a basic overview here.

  • Quad Core processor
  • 32 Gb RAM
  • 240 Gb SSD as primary drive
  • 4 Tb storage drive
  • Video card with support for up to 4 monitors
  • bad ass ATX tower case

So far, I am not seeing much that I feel like I will be missing out on with the hackintosh approach vs. traditional mac. There are a couple of tiny things I won’t have (camera, everything built into my monitor, etc.), but a couple of things I have gained (multiple easily accessible usb ports, easy modification/upgrades in the future, etc.)  Yes, putting it all together was more difficult than just ordering a mac, but if you only choose proven hardware, it was pretty straightforward. Now the only real thing I have to be concerned about is any future OSX or application updates being incompatible with something in a hackintosh, but I think that’ll be pretty unlikely (or I can just not upgrade anything for a while, haha).

Self-Watering Plant via Arduino Uno

As I mentioned in my Geek Christmas post, one of the fun toys I had received was the Arduino Uno. It is a simple little open source microcontroller. This past Father’s Day, one of my presents was time to finally tinker with projects, so I finally learned to solder! Once I had done that, the first project I had in mind was to put the Uno to use to help make sure our little Charlie Chavez the Traveling Christmas Cactus was well taken care of.  Things have been pretty hectic lately, and even when they are not, I’m not the best about remembering to water plants (I killed three bamboo plants at our last apartment). So when I saw this Instructable describing the use of an Uno to make a self-watering plant, I knew what my first project should be!

Initially, I figured I would just follow all the directions to the T, but as I got into it, there were a few modifications that I felt comfortable making. Otherwise, I pretty much tried to stay with the plans since there was a lot of stuff involved that I had little to no prior experience with. On to the documentation!

One of the biggest changes I made was the power to the Uno. In the Instructable, the author decided to use a 9V battery to power the Uno. This seemed pretty silly to me since the water pump was already going to have to be plugged in so it wouldn’t have been wireless anyway. I initially thought about just running a standard power adapter to it, but then it seemed silly to have everything it in this nice little project box but have to take up two electrical sockets. I had a charger that I had specifically procured for use with the Uno, so I figured I would just use my newfound soldering skills to make the build a little more cohesive.

Taking apart the charger

Taking apart the charger

Looks pretty simple to wire

Looks pretty simple to wire

FIrst, I got the pump situated.

FIrst, I got the pump situated.

Then figured out the placement of the other components so I could drill the holes

Then figured out the placement of the other components so I could drill the holes

Getting things soldered

Getting things soldered

Had to improvise since I couldn't find appropriately sized spacers

Had to improvise since I couldn’t find appropriately sized spacers

Started to connect the charger guts, the realized that the cables were so short it probably wasn't going to work very well.

Started to connect the charger guts, the realized that the cables were so short it probably wasn’t going to work very well.

Much better with some new wires

Much better with some new wires

Getting everything situated

Getting everything situated

All done!

All done!

Ready to keep Charlie happy!

Ready to keep Charlie happy!

I DID do it myself with Arduino ;-)

I DID do it myself with Arduino 😉



I had a bit of an issue at first with the code provided because it was definitely to too low of a threshold for deciding Charlie was dry and ended up pumping way too much water and overflowing! Luckily I was just doing testing instead of just setting it and leaving so I was able to catch it all with a towel. I also changed it a bit so that it polled a little less often. The original author had it taking a reading every 5 seconds, which seemed a bit excessive for just seeing if a plant is a little too dry. I decided once an hour was plenty. Here’s my modified code.


/*
Self-Watering Plant
by Randy Sarafan
Modified by Justin Fincher

Reads a soil moisture sensor and turns on a relay that controls a water pump.
The soil moisture sensor involves a 10K resistor between pins A1 and ground,
and a probe connected to pin A1 and another connected to +5V. These probes
are embedded and inch apart in the plant's soil.

For more information, check out:
http://www.instructables.com/id/Self-Watering-Plant/ or
http://www.justinandrewfincher.com/2013/06/30/self-watering-plant-via-arduino-uno/
*/

// Analog input pin that the soil moisture sensor is attached to
const int analogInPin = A1;

// value read from the soil moisture sensor
int sensorValue = 0;

// if the readings from the soil sensor drop below this number, then turn on the pump
int dryValue = 400;

void setup() {
   pinMode(12, OUTPUT);
   // initialize serial communications at 9600 bps:
   Serial.begin(9600);
}

void loop() {
   // read the analog in value:
   sensorValue = analogRead(analogInPin);
   
   //Turns on the water pump if the soil is too dry
   //Increasing the delay will increase the amount of water pumped
   if(sensorValue < dryValue){
      digitalWrite(12, HIGH);
      delay(10000);
      digitalWrite(12, LOW);
   }
   
   // print the sensor to the serial monitor:
   Serial.print("sensor = " );
   Serial.println(sensorValue);

   //slow your roll - I mean... slow down the code a little
   delay(3600000); // once per hour
   //delay(15000); // every 15 seconds
}

Additionally, I thought it would be kind of interesting if I could actually save some of the data, so I currently have it plugged in via usb. This seemed simpler than trying to just store it in the on board memory of the Arduino because I would have to open the box and plug it in to get the data anyway. I then found a small program that monitors the serial port and I modified it to store the read values in a simple data log.  Since this is situated in the same shelf as my media server, I just have it plugged in to that to do the logging.


#!/usr/bin/python
#
# Python script to monitor a serial input from, in this case, an
# arduino uno and store the values that are output into a .csv
# file

import sys, os, serial, threading
from time import localtime, strftime

def monitor():

ser = serial.Serial(COMPORT, BAUDRATE, timeout=5)

while (1):
   try:
      line = ser.readline()
      if (line[0:9] == "sensor = "):
         # remove return character
         line = line[:-2]
         time = strftime("%Y-%m-%d %H:%M:%S", localtime())
         
         # write to file
         text_file = open("watering_data.csv", "a")
         line = line.split(' ')
         text_file.write(time+','+line[2]+'\n')
         text_file.close()
   except KeyboardInterrupt:
      print "Stop Monitoring"
      sys.exit(0)

""" -------------------------------------------
MAIN APPLICATION
"""

print "Start Serial Monitor"
print

COMPORT = "/dev/ttyACM0";
BAUDRATE = 9600

monitor()

Here’s a snippet of the log. You can see at 14:50 it was below threshold. Sure enough, I heard it turn on the pump!

2013-06-30 13:50:17,406
2013-06-30 14:50:29,397
2013-06-30 15:50:32,484

So far I am pretty happy with things! I haven’t had it up and running for long, but so far it seems like all the values are appropriate. Now I just have to occasionally remember to check Charlie’s big water jug and he should stay a happy little cactus! 🙂

Baby Monitor Review: Dropcam HD

I posted this in our baby blog, but since it is kinda geeky-related, I figured I would cross post it to my blog as well. 🙂

I wrote a post a while back about the beginnings of my research for baby monitors so I figured I would follow up with my decision and a review of how it is working so far. I only posted about a couple options initially, but I continued to do my research and was constantly amazed by how expensive some of these monitors can be! Especially those that had any kind of internet connectivity, which is something I wanted since both grandmas are far away.

Dropcam_Hero_oblique

As you can guess from the title, I eventually settled on the Dropcam HD. For only $150, it had all the features I figured we would want including night vision, audio, and internet accessibility. It was pretty simple to set up as all I had to do was create an account with Dropcam and tell the camera which wireless network to use. After that, I could log in via computer, iPhone, iPad, Android phone, etc. and view our camera! Right now we only use it to monitor her while she naps, so we haven’t done the full setup with the Grandmas yet, but we will probably do that once she is sleeping in a more consistent place, like her crib. Here’s my basic breakdown review.

Pros

  • Good quality video and audio feed
  • Ability to digital zoom on one of 5 sections so camera placement is pretty lenient
  • Cost – I saw pretty simplistic monitors without many features that were as or more expensive
  • Dropcam offers a DVR service where you can record and also get notifications of events like movement. Not really necessary for the baby monitor, but means it could easily double as a pretty good security camera
  • Ability to talk back – From an app or the website, I can talk and it will play from the cameras speaker. I don’t think it is enough to help settle a waking infant, but it could definitely be a handy feature depending on your usage
  • Internet connectivity means access from just about anywhere

Cons

  •  The last pro is also a bit of a con. It is SOLELY internet connected, which has caused some issues with us. If the internet gets spotty, the feed can easily cut out a good amount which can be extremely frustrating, especially since it always seems to happen at the exact moment she starts seeming restless
  • Night vision – It is great if you can place the camera near the baby, but since it relies on the built-in infrared light, subjects that are not right in front of the camera still remain pretty dark. On the auto setting, it also switches to night vision a little early so there have been times where we could actually see better without it. Luckily, you can manage whether it is on or off from anywhere you are viewing the camera
  • Zoom changes are enacted for all viewers. If I am viewing the cam on my computer and MC is watching on an iPad, my view changes if she decides to zoom in on a section. Since it is just a digital zoom, I don’t see why each viewer couldn’t manage it individually
  • The mount is a little finicky. The round cam fits snuggly in the hole of the metal mount, but there are no clips, snaps, etc. to really hold it in place so you tend to have to do some cable placement finagling to get the cam to stay exactly where you would like it
  • The only way to turn the camera off it to unplug it. It fits fairly snugly, so this can be a bit annoying. I ended up taking the wireless remote AC cord that we had been using for the Christmas tree lights and plugged the camera into that so we can easily turn it on and off with a little remote.

Overall

So far it has still been a really good monitor, and we have enjoyed having it. It would be really nice if we could connect to the camera directly. Our internet is usually pretty good, but I am not the hugest fan of the idea that our baby monitor would become useless if our internet were to go out.

The other minor thing I would like to see is a “guest access” feature. You can allow other users to access your camera, but from what I have read they then have as much control as you do. They could change any settings and do things like talk back through the cam just like we can. It would be nice to give a limited access so someone could view without having full control.

Overall, I am definitely happy with it, and we get a lot for the money. The minor gripes I do have could possibly be remedied with software updates (or possibly hacking in the case of intercepting and decrypting the stream) so there is at least hope that they can be fixed in the future.

My Geek Christmas

My posts on this blog have been pretty few and far between now that we’ve had the little one join us, but I thought it would be fun to do a post about some of the geeky presents I received this Christmas. Not just to catalogue, but for the possibility of input about future projects that could involve said gifts or recommendations on how to use them. 🙂

SmartStick

SS-4GB-2

The SmartStick was one of the first geeky gifts that I received for Christmas from my parents. As you can see, it looks like a really big usb thumb drive, except that instead of USB it is HDMI and it is a fully functional little Android computer. Snazzy things can sure come in small packages! 🙂 This was definitely one of those geek toys that I thought would be really cool to have, but I didn’t have a very specific need/task for it. It is just cool, haha.

I have only played with it a bit, but I think it will be pretty easy to find some usefulness for it either in the guest room or as a travel item that will give me a lot more options on hotel TVs. So far I think I only have one real complaint and that is the lack of bluetooth. To me that is a glaring oversight. This is a device that will most likely plug in to the back of a TV, and you make the remote an IR remote with a little corded IR receiver that I have to place somewhere? The thing is definitely bulky enough that adding the bluetooth hardware would have had a negligible effect on the size of the unit so I really don’t understand.  Also, using the interface with the simple little remote was a bit cumbersome so, if it looks like I will be using it a decent amount, I will likely invest in the full keyboard + touchpad remote that they have for sale (which is, funnily enough, bluetooth but comes with an adapter to plug in to the unit).

Arduino Uno

ArduinoUno_R3_Front_450px

I had a couple of microcontrollers on my wish list and this was one of them that Julie got me. It is supposed to be one of the best for beginners, and seems like it would be something pretty fun to play around with. There are tons of different projects that I have found that sound interesting, but it is hard to know what to choose! It might be interesting to do something basic with robotics, but to do what? I’m not sure if I want to find some really cool project to just play around with things like servo motors and led lights, or if I should try to find something that would actually be pretty useful, like an internet controlled thermostat. Anyone have any thoughts?

Fitbit One

simple.b-dis-png.h47e3210a910010717f0d5ec74009f261

This is a little monitoring device from my parents to help you learn about your movements, habits and sleep. Sounds like a pretty interesting idea and might definitely be interesting to monitor how my lifestyle is while keeping up with little Ruby. 😉 Unsurprisingly, I haven’t had a chance to play with this either, but it definitely looks like it could provide some interesting information.

Moga

PowerA-Moga

I found this when I began looking at using one of my old android phones as a mobile gaming device.  Gaming tends to eat up a lot of battery life so it can be really annoying when you are traveling and you have to choose between your entertainment and the possibility of killing your communication device. So I figured I would just set up an old phone with games. While I was at it, I thought I might as well go old school and put a few emulators on it so I could play some more classic games when traveling. I actually had a bit of luck connecting a PS3 controller to a phone via bluetooth, but it still made for a bit of a cumbersome gaming platform. Enter Moga. Moga is a controller made with a mount to hold your phone.  So it is made to do exactly what I was looking to do! It also connects via bluetooth, which opens up some possibilities. Not only can I connect it to a tablet for a larger screen, but the phone I will likely use has a mini-HDMI out so I could plug it in to a regular TV and use it as a full console. Sounds pretty snazzy to me! Julie got this for me and now I have to find a trip where I actually have some free time to play with this (which might be a bit difficult with a 2 month old, haha).

Raspberry Pi

Pi-board

Along the same lines as the Arduino Uno is the Raspberry Pi that Julie also got me. Raspberry Pi has been growing in popularity (I have heard of CS programs using them as a platform to develop on through a range of courses and a buddy of mine has one set up to be a home media server), and have a good bit of power for such a tiny little device. Just like the Uno,  the main problem arises with how to decide on the project!  With this one, I am likely to tinker around with it a bit and get a feel for the development environment before I actually lock it in to a single use. That will also give me time to get familiar enough with it that I can better know what types of projects I am capable of handling and give me some time to think about how best to put it to use. I see a soldering iron purchase in my very near future. 😉 Any project ideas/suggestions are greatly appreciated for this as well.

Now if I could just find some free time to play with all these fun gadgets! 🙂

Repurposing an old Android phone as a portable gaming device – Part 1

Recently, I have been interested in a platform for mobile gaming.  I kinda lost interest in my old DS, and my Droid 4’s battery life goes from shoddy to downright abysmal with just a little bit of gaming. I heavily considered a PS Vita, but it is still a bit more of an investment than I’m willing to make at the moment. Then I found this guide on Lifehacker for turning an android device into a media/gaming center.  I didn’t necessarily need everything described in the guide, but I figured it was a good place to start using my old Droid 3.

First I decided to focus on setting up the NES emulator first. I have played around with a few in the past that worked pretty well, but both the software controls and using keys on the hardware keyboard were lacking. I rarely use both my PS3 controllers, so I decided to see if I could use the one that is starting to wear down with my phone. So I decided to try out Sixaxis Controller by Dancing Pixel Studios. It is handy that is has a free app that tests your device then the actual app is only $1.99, which is pretty reasonable.

To pair the controller with my phone, I had to install libusb then use sixpair to tell the controller the ID of my phone.  It was pretty simple and painless.

Then I started playing with a few emulators. Initially, I wasn’t having any luck with using the controller in the emulator, but it turned out that I just didn’t really read the Lifehacker guide that closely, haha. Basically you have to go into the sixaxis setting and map the controller buttons to actual keys.  Once I figured that out, I tried out NESoid (my fav of the ones I tried) and everything worked perfectly! I only have a handful of ROMs (the format the games come in) at the moment, but if this becomes my consistent mobile gaming platform I’m sure that collection will soon grow. 😉

Next I figured I would play around with putting it on a larger screen. That probably won’t be part of its main function, but why not!? A little while back I ordered a mini-HDMI to HDMI cable so I was able to plug my phone directly into my second monitor (or any TV that has HDMI) and voila! It was just like having an NES but with snazzier controllers!

Booting up some Mega Man 2!


I played a few games, and the controller was pretty responsive and a great step up from playing on my phone. My phone was fine for games like Dragon Warrior where it is never necessary to act quickly. One game of Tecmo Super Bowl and I realized how subpar trying to use the keyboard actually was. So with pretty minimal setup and $1.99 I had a nice little emulator that I could hook to any TV with HDMI and play with a wireless controller. Nice!

Phase two of making this into a DS/PS Vita alternative will be fashioning a mount like the Gameklip. While it really isn’t too expensive ($15 + a likely shipping charge), I believe I could put together something fairly easily that would cost me a lot less.  My first thought is to just refashion my car mount to connect to the controller.  It may be a little bulky, but I’ll sacrifice a little space for it being practically free! (or pre-paid I guess, haha)

Additionally, I imagine I should be able to get at least a SNES emulator running, maybe Genesis too. There’s also the standard Android game library (Angry Birds, etc.) that I can use. If I think I’ll be using those much I may want to put a little more thought into make the mount for the PS3 controller fairly easy to remove. The only real thing that is lacking, which is pretty minor, is that the PS Vita ties in with your PSN account for trophies and such. While I admit it is kinda silly, I can’t say I would be disappointed if some kind of trophy system was released for Android. Or even better, Sony released a tie-in so Android developers could actually earn PSN trophies!

Building my own media server

First, I’m going to go ahead an apologize for the sheer text in this post. I was so focused on getting everything together that I didn’t really take any build pics so this will be mostly text.  Sorry about that! Continue at your own risk 😉

Background

I have a growing media collection on my home computer and I have been looking at better ways to disseminate it to other devices in my home. Since I have a PS3 and my DVR can access DLNA servers, I spent a little time trying to get a server running on my old mac mini using TVMOBiLi.  It seemed to work ok for a bit (though the way files were organized was sub-par), but then I started having issues.  They likely stemmed from my mac mini dying, but I had reservations about TVMOBiLi anyhow since the free version actually had a data cap for streaming.

Since I don’t usually need to watch movies immediately, I just set up a script to generate a web page of links to movie files then accessed the webpage through the PS3 browser.  Then I would just download the file beforehand, watch it locally on the PS3, then delete the file.  While it only took 20-30 minutes to download a ~2 hour movie, the playback if I tried to watch while downloading was abysmal. So that was pretty much the way things worked for a while. Then my iMac started filling up!  I figured it was just about time to set up a separate media server, preferably DLNA-compatible so that I could more easily stream to our TVs.

The Build

I started with the small but more costly from this guide on Lifehacker. I really wanted a small form factor box, but wanted to put at least 2 drives in it so I could have a primary and a backup since I’d be moving a lot of the media off my iMac, and it is never good to have anything you want to keep stored in only one place. So the basic breakdown of what I got was as follows:

  • ARK ITX/CS-CI03 Black Mini ITX Server Chassis
  • ASRock A75M-ITX FM1 AMD A75 Motherboard
  • AMD A4-3400 Liano 2.7GHz Dual Core Processor
  • 4 GB DDR3 RAM
  • 2 Western Digital Caviar Green WD20EARX 2TB hard drives

It had been a while since I built a computer myself (probably since the one I built while I was at Auburn in 2003), but I managed to get everything packed in to the tiny little case and it booted up on the first try! If I had really been thinking about it, I would have taken build pics, but I was too focused on trying not to break anything, :-). Now the truly tricky part was finding a software configuration that was (hopefully) free, yet gave me all the functionality that I want.

4 Hot-swappable drive bays are handy

One might call me a cable management guru

The Setup

I had previously read about several programs that ran on linux so I figured I would start out with a basic linux installation and go from there.  Since I don’t have an optical drive, I had to install via usb flash drive. I thought this would be pretty simple, but it didn’t go as smoothly as I had hoped. I downloaded the Ubuntu Server iso and tried to load it following this guide. I never got the result of that to boot, so I looked around some more and switched to using UNetbootin to make it and had much better luck.  I got Ubuntu server installed, then was playing around with it some and decided I’d rather have a little more than a command line while I was first getting things set up so I switched to the standard Ubuntu install.

The first program that I had read about was PS3MediaServer. I actually got it up and running fairly easily. I copied a few movie files over then tested it out through the PS3. At first, I thought the files weren’t appearing, but further inspection turned them up a few directories below where I thought they’d be. A lot of the videos I have are .m4v files, which are playable on the PS3 and shouldn’t cause any issues.  For some reason, PS3MediaServer had them in a subdirectory labeled “transcode” as though it was having to convert them on the fly. That, plus the fact that the basic organization was pretty crappy (lots of different folders and subfolders to look through to access any of the movies) spurned me to evaluate some other options.

The next thing I looked at was GeexBox. Instead of just a program that you run, GeexBox is a full mini-OS to run. I obviously didn’t read all the documentation because I tried for a while (to no avail) to install the OS over my Ubuntu install when, it turns out, GeexBox is meant to be run from the usb drive. They are working on the ability to actually install it like a typical linux distribution, but that is only in the development build (though I couldn’t get it to actually install). Since that was coming, I decided to try it out as it is currently meant to run and it was ok. It looked like running XBMC on linux and the organization was ok from what I could tell, but ultimately I wanted a little more freedom and definitely didn’t want to have to keep a usb drive plugged in all the time. If I had been setting this box up to be directly connected to the TV, I think I would have given GeexBox a little more testing, but for the goal I had in mind it didn’t quite handle my needs.

Thus I decided to revert back to Ubuntu to try more application-based options. The next one that I tried was MiniDLNA. This sounded appealing because it is a pretty bare-bones DLNA compliant server so it seemed like organization would be up to me and, therefore, I would have more freedom to set things up like I wanted. Unfortunately, I could never get it to share the actual media. I changed the config file, shutdown and restarted the server, shut down and restarted the computer, and it would still just display basic “Music,Video, Photos” folders (that were empty) when the config only had one directory where my movies were stored. As you have probably guessed, I wasn’t in the mood for posting in forums and waiting for an answer. I DID look in forums and documentation for issues I had with each server, but none were helpful and I wanted something that came much closer to working right off the bat.

The next option turned out to be the one I am sticking with for the time being, Serviio. It is free, though you start with a 15 day trial of the $25 Pro version, after which you just revert back to the free version. From looking over the list of features, I believe that the free version will suit all my needs (though the MediaBrowser web-based player and API for access over the internet could come in handy). It started up without fuss and had a nice GUI console to modify settings and such. It actually listened when I added folders to be included and seemed to keep things fairly organized.  One of my favorite features of Serviio was that it queries a database for metadata based on the name of the file. This is handy because it means that I can browse content by information that I would never take the time to input (year released, director, etc.).

I’ve encountered a couple of glitches, but for the most part my test files were found without much incident. The first glitch was with the movie X-Men.  Now if you have a file named X-MEN.m4v, you would think the logical match would be for the movie X-Men, but the database kept identifying it as X-Men:First Class. I tried multiple variations and the only thing that worked was to rename it to X-MEN(2000).m4v so it would use the release date. Some of the misnamings are super random. For example, I had a file name PATCH_ADAMS.m4v and when Serviio tried to automatically determine what movie it was, it chose 101 Dalmations II- Patch’s London Adventure.  That’s not even close! The other glitch was with season 1 of Star Trek: The Next Generation (as if this post didn’t sound geeky enough). I  tried numerous different naming schemes, but was never able to find one that enables it to find the appropriate entry in the database at first.

I decided to go ahead and transfer all my regular movies over and, unfortunately, it did a pretty abysmal job in automatically finding the metadata.  One thing that really irks me is that underscores seem to trip it up and it likes spaces instead. SPACES!? I am on a linux box, not some stupid windows POS. I don’t put damn spaces or parentheses in my file names.  If I have to escape characters to reference a file, THAT FILE IS NAMED INCORRECTLY! How annoying. I found a file renamer called FileBot that queries the online databases then provides options. It has it’s own issues, but it let me get a lot of my files in a different naming state which seemed to help Serviio get a lot more of them correct. It also seemed to fix the issue I was having with Star Trek TNG, so that’s pretty awesome. Luckily, I found a forum post where a user manually updated the derby database storing the file information for the files. I haven’t tried it yet, but I’m hoping that allows me to correct all the errors in movie identification that I have left.  It got enough of them done that I think I’m just going to gradually repair everything and be more cognizant of my naming scheme for future movies.

Other than the movie misidentifications, the only other thing I have found with Serviio that I don’t like is that my Moxi doesn’t seem to be able to view it. I am not sure why, and it doesn’t really matter since the PS3 and Moxi are connected to the same TV. I just found it odd because I thought the Moxi looked for DLNA servers, but perhaps TVMOBiLi that I used initially actually offers more protocols and that is why it was accessible. I have enough going on that I don’t really care to try to find out. If I make any significant changes to my setup, I will put together another post about it. 🙂

Final Tweaks

After I got the server in a (mostly) working state, there were a few things I wanted to go to make its use run a little more smoothly. The first couple were the obvious things like set up Serviio to run upon boot and set up my iMac so it can communicate back and forth with the media server without a password (useful since the iMac will still be my primary ripping computer and I can set them up to automatically sync). Then I found this guide to using avahi to allow me to use an actual name for the media server. I may end up setting it up for more general file hosting and it will be nice to not have to deal with ip addresses for access from various devices.

While I will probably do most administrative stuff through ssh, I went ahead and set up a VNC server so I could pull up a remote desktop if I felt like it. Pretty simple to set up. I also set up a new directory for DVD rips and set up a cron job on the media-server to check that directory daily and grab any new files. For now I will just deal with clearing them out on my own once I’m sure everything else is working well.

One tweak that I thought would be minor but turned out to be a pain the ass was getting the media server to shut down when I shut down my iMac.  Whenever I am out of town, I always power down my computer and, especially since I’ll be running the server headless, I wanted to save me the step of trying to remember to shut it down before I shut down my iMac. I knew that I could send the shutdown command remotely from my iMac, so I figured it should be pretty simple to call a script on shutdown/logout.  Turns out that isn’t simple at all. I tried using rc.local.shutdown/rc.shutdown.local, adding a service to StartupItems, and played around with launchd. None of these would call the script upon shutting down.  After wrestling with it for a bit, I decided to approach it from the other side and actually got it running fairly quickly. While the ip can change because it uses DHCP, the name of my iMac (its .local address) seems to stay pretty consistent. So I set up a cronjob that calls a simple script that I wrote. The script simply pings my iMac and if the ping fails I assume the iMac is off so it shuts down the computer.  Hopefully my internal network is consistent enough that this won’t be an issue, especially since it just checks once an hour, but my initial testing shows that it is working fine.

At home in the cubby

To Do List

  1. Clean up the metadata so all the videos are displayed with the proper information
  2. Transfer and organize the other videos I have on my computer
  3. Set up media server to back up all files onto 2nd drive
  4. Figure out why the fans on the case seem to be running constantly even though it isn’t overheated
  5. See if I can have the iMac automatically boot the media server on startup (i.e. when I get back from out of town I only have to start the iMac)
  6. Work on organizing and ripping more of the TV seasons that I have
  7. Set up basic webserver so that any device on the network can at least access/download files

Random Thoughts/Ideas: In-dash car dock for smart phones

So I had this idea a while ago and thought I would share since it is something that I really would love to have and am surprised it hasn’t been created yet. The basic idea is that, instead of having an in-dash GPS and stuff in your car AND a smartphone, integrate the two! I love the form factor of stock GPS systems with touchscreen controls for audio and such, but static information (I’ll be damned if I’m going to pay over $100 just to update my maps from last year) is a major bummer.  I love the functionality I get with my phone, but even in the car dock, it just isn’t as nice to interact with. I want to use all my phone’s snazzy functionality but still have my dash look something like this.




I really thought this would be a fairly simple idea, so I did some digging and there are some strides to make it happen. This unit is basically an in-dash dock for your phone. While that is cool, it really isn’t that much different that what I have with my car dock and my tape adapter (yeah, I’m old school haha).

What I would really like is my phone’s screen to essentially be mirrored to the larger in-dash screen. Toyota has done some work in this direction, but it is looking more like an external display for your phone, not 2-way communication (I hope I’m wrong). So my ideal scenario would be an in-dash unit that, while connected to your phone, basically behaves exactly like a larger version of your phone, touchscreen and all.  That would sure make road trips more fun (and GPS always up-to-date). I would think this would be a fairly simple mapping of touches and display and thus, not too difficult to implement. It could even be designed to have basic radio functionality and stuff when there isn’t a phone connected so a smartphone wouldn’t necessarily be a requirement for use. Sounds easy enough, yes? So get on it car unit manufacturers! 🙂