Saturday, October 15, 2016

Google Music Plex Plugin on Linux

The wife and I use our Rokus for media consumption on the TVs in our house, and as cord cutters we wanted to be able to access South Park episodes and Google Music recently through the Roku. The way to do that is with plug-ins on your plex server streaming to your Roku. You can get the South Park plugin easily through the Plex channel area. The Google Music plug in is a community deal with multiple versions floating around out there. I tried both, and neither worked for me out of the box as of October 14, 2016 on Linux Mint 17 (analogous to Ubuntu 14.04  Trusty Tahr)

The two variations of this plugin are by jwdempsey (last commit 9bea5fb Apr 1, 2015)and pablorusso (last commit d8145ee Sep 13, 2016).

The jwdempsey version doesn't currently work with google play music because of some auth changes I believe, so in the web interface to plex it will show you messages such as "This Channel is Not Responding" and have a message in the plugin log saying "raise NotLoggedIn" even if you put in the right credentials.

The pablorusso version has enhancements to handle this, but at the time of this writing his version only worked for Windows because Pablo stated that there wasn't an updated version of pycryptodomex binaries for Linux or MacOS [source].

Luckily, using the pablorusso plugin version and by compiling pycryptodomex to get the required shared object library files using instructions found here, I was able to get everything working.

Solution (Linux):
  1. Go to your plugin directory
    1. cd /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/
  2. Pull down (clone) a copy of pablorusso's plex plugin using git which you will have to have installed on your system
    1. git clone
  3. Go to a different directory like your home directory and create a new subdirectory there to download and compile the python Cryptodomex package
    1. cd ~
    2. mkdir pycryptodomex
    3. cd pycryptodomex
    4. wget
      1. this is just the URL from the latest verison of pycryptodomex on pypi 
    5. tar xzvf pycryptodomex*.tar.gz #decompress it
    6. cd pycryptodomex-*/
    7. python build            # compile it
    8. cd build/lib.linux-x86_64-2.7/Cryptodome/Cipher   
    9. cp *.so /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/GoogleMusic.bundle/Contents/Libraries/Shared/Cryptodome/Cipher/
    10. cd ../Util/
    11. cp *.so /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/GoogleMusic.bundle/Contents/Libraries/Shared/Cryptodome/Util/
    12. cd ../Hash/
    13. cp *.so /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/GoogleMusic.bundle/Contents/Libraries/Shared/Cryptodome/Hash/
  4. Lastly we'll need to adjust the ownership of the files so that Plex can use the plugin
    1. cd /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/
    2. chown -R plex:plex GoogleMusic.bundle
Now you should have the plugin working in Plex. Enjoy.

Thursday, December 3, 2015

Dual boot Linux and Windows 10 with UEFI

I have had issues in the past trying to get Windows 8+ to coexist with Linux Mint on a machine with UEFI.

The following steps worked for me on an Asus q400a laptop.

  1. BIOS has CSM on and fastboot off
  2. Within Linux I used gparted to format a USB stick with a GPT partition table as fat32. Then I opened the ISO file for the windows installer and copied all the files onto the USB stick.
  3. I caught the bios with f2 and move up the boot device for UEFI: My_USB_stick (it was ADATA in my case)
  4. I installed Windows and then subsequently upgraded to Windows 10 which is still currently free for 7 and higher users.
  5. Shrink the drive for Windows 10 to free up some spare space. The Linux installer I used was not aware of the Windows 10 installation so it couldn't shrink it for me.
  6. Using the same GPT partition table USB stick, delete all the files from it and then extract the files from your Linux ISO onto it. 
  7. Windows 10 made it so I couldn't get to the bios, so I used the instructions here to go into troubleshooting mode
  8. Once in the BIOS, I again selected the UEFI: My_USB_stick and ran the Linux live installer.
  9. In the installer I selected the "do something else" partitioning option and created a primary ext4 root mount "/" using all but 8GB of free space (the amount of my RAM). I then created a logical swap partition containing the rest. I also set the device to "use as bootloader" to the EFI partition Windows had created.
  10. I rebooted and grub popped up letting me pick my OS as I see fit.
  11. Just to be as "secure" as possible, I disabled CSM in the bios so only UEFI is allowed. The only thing this seemed to change is that I get the windows loading circle below the ASUS logo as it launches Windows 10.

Missing windows key sticker

I wiped my OEM installed copy of windows from my ASUS laptop (to install Linux) and deleted the recovery partition. Also, the key is missing because it rubbed of the sticker. I wanted to put Windows on in addition to Linux.


  1. Use Linux to extract the key from your laptop firmware. It's still in there, and that is how the OEM disk gets it when you re-install. It just takes a single command run as root to get at it. With that key you can then install a generic copy of Windows which you can get from Microsoft. So either boot up linux on the computer or run it from a live disk (no install required).  Then run sudo hd /sys/firmware/acpi/tables/MSDM
  2. Next go and download the installer for your version of Windows. In my case I needed windows 8. This could get into a bunch of other issues since the installer I could get from MS is really an 8.1 installer which may not take my 8 OEM key. The solution in that case may be to install with a generic key first and then swap in my OEM key. The subject is well explained in this reddit post. I lucked out though, and it picked up my OEM key no problem (this may have been because I upgraded to 8.1 at some point in the past).
  3. Now install and enjoy.
  4. And if you are still in the Win 7 or 8 upgrade window, maybe consider upgrading to Windows 10.

Wednesday, April 8, 2015

HOWTO: GIT Subtree Merge

This one is a quickie. If you need to merge the contents of one git repository as a subdirectory of another project, you can use this strategy.

Saturday, March 28, 2015

HOWTO: Set up an awesome OTA DVR [Tablo]

I am nearing the end of my contract with Dish, and I have finally convinced my wife to get on board with getting rid of traditional TV for good. There are a lot of ways to go about this with various products and streaming services. We ultimately decided to use Amazon Prime (which we already use for shipping benefits), Netflix, HBO Now (after the Apple lock-in ends), and a DVR system for over the air (OTA) TV.

The over-the-air DVR was a necessary to avoid paying for pricey series which could be obtained for no cost beyond that of the system used to acquire and record antenna signals. I mean, they are literaly in the air around us. For example, the first season of the Flash was almost $40 on Amazon when I checked. We also wanted iZombie, The Blacklist, Grimm, Last Man On Earth, Front Line, and Law & Order SVU, 60 Minutes.

I initially tried out a roll-my-own system with MythTV and the hdhomerun connect tuner, but it proved to be a painful setup. That tuner also sent a large mpeg2 stream to the MythTV backend for recording which had to either be transcoded after recording or on-the-fly by the Plex software I used to serve it up to my streaming devices. The problem was that my hardware was not powerful enough to support recording and transcoding too much at once, and it led to choppy playback. On top of that, I wanted something a little simpler to manage that would work with my Roku 3 and Fire TV Stick (and my Chromecasts to a lesser extent).

Anyway, it turned out better than my satellite DVR in many ways, and I would like to spread this information so people can enjoy such an awesome device and awesome savings. One thing to note is that you will want to factor in the cost of the program information in the electronic program guide (EPG). While the device can do timed recordings without it, it really makes the Tablo shine as far as finding content and making the unit easy of use. The folks at Tablo currently charge either $5/mo, $50/yr, or $150/lifetime (your lifetime, not tied to the device) for such subscriptions. These subscriptions are pretty standard and can be found with alternatives like MythTV, Simple.TV, or Tivo's devices. For me this wasn't a huge deal since even the lifetime subscription was only twenty bucks more than my highest ever satellite bill towards the end of a two-year contract (with HBO).

The Antenna

Initially I tried a little flat AVANTEK antenna similar to the popular Mohu Leaf after antenna websites recommended that something this was all I really needed. While these may work well for many other folks in many situations, it came up short for me even when I mounted it in the attic. It picked up very few channels perfectly, and it was missing ABC entirely. Also, I had intermittent distortion which may be related to living near an airport under a flight path.

I did a lot of research after that, and eventually settled on the affordable RCA ANT751with a run of quad shielded which I got in a two pack of 25 ft lengths from Cable Matters to reduce signal loss and interference. After I mounted it in the attic (which is where I had my previous flat antenna) I went from 10 channels to 53. 

Antenna Installation

In preparation for selecting your antenna and aiming it if it is directional, websites like TV Fool or Antenna Web can be very helpful. Specifically for aiming, TV Fool's signal locator tool can provide the appropriate heading of where to point your antenna for the best results. The term for this directional heading given in degrees is azimuth.  Then take the azimuth value and punch it into a free aiming app. Antenna Pointer for Android was quick, free, and easy to use for this.

In my case, my antenna required some assembly as far as unfolding some of the poles on the mast, attaching end caps on the mast, putting together the base, attaching a transformer with the coaxial output.

After reading about the importance of mounting your antenna as high as possible for avoiding obstacles and receiving a clear signal, I mounted the base high up one of the structural beams under my roof with some screws placed into pilot holes drilled into the wood. Then I followed the instructions to make sure the upright tube coming out of the base was level before attaching the antenna mast. While tightening the mast to the upright, I placed my phone flat on top of it with the top of the phone pointed towards the small end of the mast. I nudged the mast left and right and adjusted while tightening watching the azimuth readout in the Antenna Pointer app, and I was reading within a degree of my specified 126 degree azimuth.

The Tablo

That pic is my wall-mounted Tablo in my home's central networking cabinet located in my laundry room. Since it is a network device and not something that attaches directly to the TV, you can stow it somewhere out of the way in contrast to other products like the Channel Master DVR+ devices made to be used directly attached to a TV.

The Tablo is available in a 2-Tuner model or 4-Tuner model with a price difference of around $100 when I purchased mine. I opted for the 4-Tuner version after reading that a tuner is used to transcode video for streaming out over the internet. However, a tuner is not used for streaming recorded content within the home since it is transcoded to a usable format for local streaming at recording time. Aside from the remote streaming scenario, tuners are used while a program is being watched live or recorded.

For storage, you will need to attach your own USB hard drive since the Tablo does not use built-in storage. This means you will need to factor an additional cost if you don't already have an external USB 2 or 3 hard drive which is compatible, but it also means you don't have to crack open the Tablo to replace the hard drive when it fails. The drive failed in my Dish Hopper last year, and I had to wait for them to ship me a new unit to be able to record programs again. In the future, I could just go out and buy a compatible replacement drive. For compatible drives, check their guidelines. In my case, it just so happened I had a compatible spare WD Elements 2 TB USB 2.0 Desktop External Hard Drive laying around.

Anyway, you need to connect the Tablo wirelessly or via ethernet. I would strongly recommend ethernet for something making such heavy use of the network to serve up streaming content. On that note, you will need to have a good quality home network for streaming around the house and out to the Internet in general. I recently upgraded from an old Linksys E2500  to a NETGEAR Nighthawk R7000, and it easily handles the streaming. If you were considering an upgrade to a newer router like those supporting 802.11ac, this would be an ideal time.

Per the manufacturer, you will need to connect it to the same router or network segment used to connect to the Internet. I initially attempted to connect it to a switch connected to my router, but it did not work.

After connecting to the network, attaching the storage, and connecting the coaxial from the antenna it is ready for power! Connect the power cable and turn it on. You should see the port on the router light up orange. You can continue the configuration with their mobile apps, or just use a computer like I did. Go to and it will walk you through formatting the drive, scanning for channels and downloading the channel guide data, enabling remote streaming (very easy since it configured port forwarding automatically via UPnP on your router), and updating the firmware. The firmware updates showed me a changelog with significant enhancements, so you really will want to update it.

During my inital setup, mine got stuck at "Downloading" during the firmware update at 0%. I waited five hours hoping it would work itself out and not wanting to brick it, but then I found a relevant community post describing how a reset could resolve it, and I decided to go for it. It came back up on the old firmware just fine. After that, everything worked normally and I was then able to update it later.

From there, the OTA world is your oyster. You can now watch live or recorded programs on your smartphone, Chromecast, PC, or Roku (the newer the better). The folks behind the Tablo should be finishing up with the redesign of their Roku channel, and an app for Amazon Fire TV products (including the stick) is also forthcoming. It was supposed to come out in Q1 2015, so the schedule must have slipped. That beta interface they are demoing is like a virtual Cable/Satellite DVR right on your existing streaming devices.

As it is now, adding and finding shows and movies for recording is dead easy. You can search for shows or movies. You can see available airings organized by genre, prime time, etc. You can see information for airings, record all or only-new, and pick and choose specific episodes to record or not. Guide data is only available for 14 days out so a series cannot be added if it is not airing within that time period.

Anyway, welcome to the future fellow cord cutter.

Sunday, February 22, 2015

Customize splash screen on Kenwood DDX7701HD, DDX8901HD, and DDX7071BT

I want to customize the boot up/splash screen on my Kenwood car stereo to something a little more vehicle-specific than the default startup screen. I couldn't find specific instructions for my headunit model, but there was information for similar models. I have the DDX7701HD, but the other models listed in the title are very similar and use the same manual, so they should be able to use the same method.


  1. Prepare the files:
    1. Format a USB drive as fat32 
    2. On the USB stick, save a bitmap image of 800x480 pixels with 16-bit full color and RGB color settings of R5,G6,B5 (a free program like Gimp can do this if you choose File > Export As > select BMP > Save (a dialog will pop up after you hit save) > Advanced > Select R5 G6 B5 under the 16-bit heading 
    3. On the USB stick, create a text file named OpeningCustomize.txt containing the text shown here
      1. This file must be created using Notepad. Linux-style line returns will not work.
      2. Make sure to change your_file_name.bmp to your actual bitmap image file name.
  2. Prepare the stereo:
    1. If you don't want to lose your settings, back them up in the Setup -> System -> Setup Memory menu.
    2. Get a paperclip ready to press the reset button (red lighted triangle on lower left corner)
  3. Perform the customization:
    1. With the stereo on, press the volume down and menu buttons (you will keep holding these two only), and quickly press the reset button.
    2. The stereo will power off and then turn back on. Release the volume down and menu buttons only after the buttons on the bezel illuminate
    3. When the customization menu appears, plug the USB drive into the USB port connected to the stereo's USB cable.
    4. Touch the button labeled "Opening Customize" and it will say "Customization OK"
    5. Now power the unit off and on via the Menu/Power button, and it should come up with your new splash screen

Monday, November 17, 2014

[REVIEW] Life With the Jawbone UP24

This is my review of the UP 24. This is not a problem/solution post like I generally put on here.

I have been using the UP 24 for a little over a month now, and I really like it. Below I'll discuss my opinions of the features.

Workout/activity feature

This gives you a way to start and stop tracking before and after a workout and then later specify what the activity was to get a better calorie burn estimate.


This lets you set the UP to a more exact estimate of distance by using the activity tracking feature for a walk of known distance and then telling the up what the actual distance was after you are finished. After doing this, I saw about a 20% decrease in distance so this may be important for other tall folks like myself.

Food tracking

I haven't used the built-in food tracking, but the integration with My Fitness Pal is really solid. The up can update your totals in MFP and add extra exercise calories for you to know when you have more room to feast that day. Your food gets imported into the built-in food tracking so you can get tips and advice about your diet there.


This is not really a running tracker by itself, but I'm happy to report that it integrates really well with other services and (indirectly) devices. There is integration with Runkeeper, Strava, and MapMyFitness to name a few. I used to use a smartphone with Runkeeper to track my runs, but I moved to using a Garmin Forerunner 110 GPS Watch with Heart Rate Monitor which is one of the cheaper heart-rate chest strap/GPS watches I found at the time.  The way I sync is by uploading from the Forerunner to MapMyFitness (through their site with the Garmin Express browser plugin). MapMyFitness syncs with the UP and feeds in my workout data so the UP knows that all the steps during a certain time were really part of this run which has a presumably more accurate calorie burn estimate with GPS/HR data than steps alone. This activity then generates calories adjustments in my food tracker app of choice (via Up Integration). In this sort of setup, it is important to connect each app to up without connecting them to each other to avoid double counts such as Map My Fitness -> UP -> My Fitness Pal and  Map My Fitness -> My Fitness Pal counting the same exercise.

I do wish I had a GPS watch with bluetooth so it could automatically upload to my phone rather than having to go sit at my desktop, but that is not a failing of the UP. In fact, I notice it so much because the UP quietly syncs all the time via its low power bluetooth. When you track runs through a third-party app, you don't have to start/stop the activity timer on the up. I wear it to keep my step count accurate, but it just passively monitors and then gets updated with the activity.


The up can track your sleep pretty nicely. It will show you when you are up, in deep sleep, or in light sleep. They claim the MotionX tech allows it to be about 95% as accurate as a professional sleep study in this regard because it was calibrated against actual sleep study data. I thought this was pretty cool before I got it, but now I would say it alone may justify buying the UP 24. It makes you very aware of how much or little you are sleeping AND the quality of that sleep. Seeing a graph of your actual deep/light sleep time is infinitely more useful than just asking yourself if you feel tired or awake that day. It allows you to know when your sleep is bad so you can make some adjustments to your exercise, bedtime, eating, or caffeine.

To activate this feature, you just hold the button until the moon lights up on the band. When you wake up, just hold it down again. The Caffeine app allows you to track your caffeine consumption and can advise you on intake based on how it impacts your sleep. This app does not yet exist for Android, but it is on iPhone.

You set a goal for nightly sleep, and the app will tell you what percentage of that goal was achieved.

Smart Alarm

This feature allows the band will vibrate to wake you within a certain number of minutes of some time that you set in order to wake you up when you are at a lighter point in your sleep cycle. This supposedly leaves you feeling more refreshed. You set the time range and the wake up target time. You also set the days of the week this alarm should fire. I use this instead of a regular alarm clock now, and my waking is usually more pleasant. 

Power Nap

This allows you to take a short nap and get woken up by vibration. To activate, you tap and then hold the button until it lights up.

Step Tracking

The step tracking seems fairly accurate, and it displays the frequency of your steps in periods throughout the day as a graph of yellow to red bars on a histogram. It shows you percentage of your goal steps and lets you know when you are on a multiday streak of meeting your goals which can be motivating.


It uses a customized USB cable with a headphone adapter to charge. It charges very quickly, and can run for about 15 days maximum. I usually charge it one or two mornings a week while I shower.

Activity Feed

The app will give you tailored recommendations and tips based on sleep, food intake, and exercise. So far, it has pointed me to some pretty good information about running techniques, diet, and general health.


I've been quite happy with the UP, and I would recommend it.