GoogleCL on Synology DiskStation

Some time ago I decided I would not upgrade my SOHO server (the dearly beloved Zeus, a Windows 2003 box acting as a file/print/mail/etc server) but to move these services to the cloud. Despite my mainly Microsoft oriented professional background, I choose Google Apps rather than Microsoft Office 365. I buried the server, reluctantly concluded not to use Active Directory any more (nor any other directory service)  in this heterogeneous environment of Windows, Linux and Mac clients (and plenty of other devices). As far as storage is concerned, I bought a Synology DiskStation DS212+ NAS to safeguard my personal and business files. In short: less is more.

I’m using Google Docs intensively now. Despite my beliefs and unconditional trust in the cloud (and Google in particular), the paranoid control freak in me wanted to have a local “backup” of what I’m storing in the cloud. So here’s a little post on how to copy files from Google Docs to the DS212+.

Prerequisites

Enable Secure Shell on the NAS first if you haven’t done so yet:

By doing so we’ll be able to connect by ssh from a Linux or OSX terminal session (or PuTTY if you’re running Windows). Connect to the NAS with root (which has the same password as admin).

In the next following three steps, we’ll 1) bootstrap the Synology NAS to install ipkg (the Itsy Package Management System), 2) install Python, the Google Data APIs Python Client Library (gdata-python-client) and the Command Line Tools (GoogleCL) and finally 3) Test GoogleCL.

Bootstrap

In order to install ipkg (via a bootstrap script), you need to figure out the CPU of your Synology NAS beforehand because these scripts are specific to the processor. In my case, the DS212+ CPU seems to be a Marvell Kirkwood mv6282.

On this page, you’ll find URLs to download each specific script (xsh) and straightforward instructions on how to install it, follow these carefully. In short: download the xsh file, execute it and reboot (there is a reboot command available in Synology’s BusyBox).

After rebooting, ipkg should be functional. First thing to do after rebooting is to update the package repository by executing ipkg update. There is no need to upgrade (as stated in this article) as we don’t have any packages installed yet.

Python

In order to install Python, we’ll check which packages are available first:

ipkg list python*

Install the Python 2.7 package (ipkg will automatically download and install dependencies):

ipkg install python27

Next, test if Python is working properly:


If Python was installed successfully, download, extract and install Google’s gdata-python-client first, then GoogleCL. Builds 2.0.15 and 16 of gdata-python-client seem to be broken (at least they didn’t work on my box – AttributeError: 'module' object has no attribute 'DOCLIST_FEED_URI' error upon testing GoogleCL), so I advice to download build 2.0.14 available here:

wget http://gdata-python-client.googlecode.com/files/gdata-2.0.14.tar.gz

Decompress the tarball:

tar xvf gdata-2.0.14.tar.gz

And finally, install the goodies:

cd gdata-2.0.14/
python2.7 setup.py install --record=files.txt

Check files.txt if you need to troubleshoot and eventually delete the source files downloaded and extracted here if the installation succeeded.

Repeat the same procedure for GoogleCL, latest version, available here.

Test

Time to test GoogleCL! google should be installed in /opt/local/bin. Try to execute google and invoke help:


Done for now, in a next post we’ll create a (cron)job to backup files from Google Docs to the Synology DiskStation automatically on a daily or weekly basis.

BMI on #RunKeeper

Another suggestion for the clever girls and boys at RunKeeper: why not introduce a Body Mass Index measurement?

Next to the weight and body fat (BF) measurements – which are indeed ideal quantities to report on – a private BMI ticker would be significantly interesting. This private ticker could be colored from green (value from 20 to 25) to red (less than 20 or higher than 30) and shades in between.

Throw in enhanced reporting on both weight, BF and BMI, just like the FitnessReports on Body Fat Percentage already available today. The icing on the cake.

I ♥ #RunKeeper

Since more than five months now, I’m a very loyal, energized user of RunKeeper. Both the site and the app have compelling, best-designed UIs, functionally and graphically, a pleasure to work with. I’ve tried many other apps out there, including Endomondo and MapMyRUN, but I keep coming back to RunKeeper.

In some strange kind of way RunKeeper acts as a personal motivator and gets me going. Submitting an activity after the hard work of completing a workout seems somehow compulsively rewarding.

App

The free RunKeeper Pro app (available for iPhone, Android and Windows Phone 7) lists activities and allows to edit or create them manually. In practice, I use the app merely as a GPS activity tracking tool. It’s my regular partner for running and cycling activities. Unlike the Garmins and Polars out there, the process of tracking activities with RunKeeper is ultimately simple: push the Start button when beginning an activity and push the End button when completing. All data is automatically uploaded over 3G or WiFi (whatever is available) to the site. There is no need in synchronizing through a PC, messing with cables etc. Convenience for the win.

Whilst sporting, you can listen to music playlists, predefined or randomly generated. You can walk, run or cycle routes, which can be found on the website or which you can create and publicize yourself.

The app comes with audio cues, configurable via de settings tab. During a workout, RunKeeper keeps you informed of key statistics such as time, distance, average pace and speed. These audio cues can be played on demand (by shaking your phone) or periodically, i.e. at a timed interval (e.g. every 15 minutes) or distance (e.g. every 5 kilometers) – or a combination of both.

And yes, battery consumption on my iPhone 4 is very acceptable if the RunKeeper app runs in the background.

Site

The website is the main place where you’ll find stuff like recorded activities, reports, routes and races. It groups all of your sporting activities by month. You can easily track and set your goals. Reports are rather limited unless you upgrade to RunKeeper Elite, after which you’ll be granted discounts on FitnessClasses (coached workout courses) too.

You can edit and share existing activities and enter activities manually. I always enter my swimming activities manually on the site.

Social

RunKeeper has a social aspect: street teams connect RunKeeper users with whom you can complete workouts or comment on completed sporting activities. You can opt to share your activities including a map with street team members only rather than publicly for privacy reasons.

Upon completing and submitting activities, RunKeeper allows you to push updates to Twitter and Facebook.

Foursquare

Connect your RunKeeper account with Foursquare and you can earn up to 4 compelling, RunKeeper-exclusive badges by achieving different milestones.

  1. Warm Up – Rewarded when completing your first 3 activities
  2. 5K – Upon completing a 5km GPS tracked running activity
  3. 26.2 – Acquired when completing a marathon
  4. Over Achiever – When having completed 5 different activity types

Feature Requests

RunKeeper brings improvements and new features quite regularly; nevertheless here’s my personal feature whishlist for the iPhone app:

  • Suggest calories burned when entering an activity manually (calculated by taking the type of activity, duration and weight into consideration)
  • Optionally push a tweet when starting an activity; not only when completing an activity
  • I would like to use RunKeeper to keep track of all my sporting activities. So add more (team) sports, even “distantless activities” such as tennis, badminton, soccer, basketball, etc.
  • Turn-by-turn navigation instructions on routes would be a killer feature and make you think twice before buying a Garmin EDGE.

And last but not least… It would be very cool if Garmin Connect and Polar Personal Trainer could talk directly to RunKeeper or vice versa. If you’re sporting with an advanced Garmin, Polar or other device and still want to keep track of a wider range of activities centralized in RunKeeper, it is quite cumbersome having to…:

  1. Upload activity data to Garmin or Polar
  2. Download GPX/CTX file to computer
  3. Create a new activity in RunKeeper manually
  4. Upload GPX/CTX or other file back to RunKeeper

So if all parties could provide a nice API, it would make sports tracking life much easier.

iPhone Annoyances

As a seasoned Nokia (Symbian) and HTC (WinMo) smartphone user and -more recently- a quite satisfied iPhone 3GS (iOS4) owner, I’d like to share some of my annoyances with Apple’s smartphone, both hardware and software related. I believe all of the following applies to the iPhone 4 as well.

Notification LED

Why isn’t there a front LED indicating missed calls, new messages and upcoming appointments when the phone is in stand-by mode? I cannot recall having any phone before without. Coming back from a meeting, I’d like to see -without even touching the phone- if I have a missed call. Why isn’t there a LED or other visual notification?

Speaker

The speaker and in particular its position is not well thought of, resulting in too silent or even inaudible rings under certain conditions. For instance: if the phone is deep in your pocket, the speaker will touch the end of the pocket and will be silenced. Combine the weakness of the speaker with the poor vibrator and you’ll often end up with missed calls.

Cable

Why doesn’t Apple come up with a plain, standard USB cable (with mini or micro connector) instead of that horrible proprietary cable?

Multitasking

iOS4’s pseudo-multitasking (background apps are paused in the best case) is a welcome start but what’s missing is effective cooperative multitasking allowing background downloads and apps updating while running another in the foreground. Ideally true multitasking should come with a functional task manager which among other things visualizes allocated system resources and allows to terminate all apps at once to free up memory.

More advanced and granular settings

For the sake of simplicity some settings have been oversimplified. I want to fetch new mail every 30 minutes during work hours and every 4 hours outside work hours. I’d like to choose between more than 6 New Text Message sounds and upload custom ones. I would like to choose a New Mail (custom) sound. Sure, I could jailbreak my phone or perhaps there’s an app for that but in my humble opinion, such features are basic and should be available out-of-the-box.

E-mail attachments

The Mail app doesn’t support adding attachments to an e-mail. Say what? You can’t attach a picture, PDF or any file to an e-mail. Unbelievable.

iTunes

It’s unfortunate that iTunes (the perfect definition of a bloated application if you ask me) is required to be able to properly interface with the smartphone, even for trivial things such as read/write access to the phone’s internal storage. It is even more painful that only a single iTunes instance (PC or Mac) can be configured to do so. An ActiveSync-like approach would be the better choice for basic operations.

%d bloggers like this: