12/19/2014

Control a PC from Android Wear

So I'm now the proud owner of an LG G Watch.  After reading all the flame wars on whether Android Wear was the greatest thing since sliced bread or the worst thing since un-sliced bread I decided to be conservative and opted for a first gen watch before dropping too much cash on the "newest-greatest".  I'm not going to add to the already gigantic pile of Wear reviews, suffice to say I'm satisfied with it for what it is and what I paid for it.

But that's not the point of this post.  90% of the reason I bought the watch wasn't for what it did, but rather what can I make it do???  So I got it, rooted it, and started sideloading apps (xda).  What I ended up with was an android smartwatch that could:
  • Play a movie (QQPlayer + ES File Explorer + Bluetooth Headset)
  • Run an NES Emulator (NES-FC Lite + Bluetooth controller)
  • Open my garage door (V1_Bluetooth_Arduino app + my bluetooth/arduino garage door setup)
None of these were really way out there as far as plausibility so I continued my hunt to push the limits of what this thing can do.

The one place I feel Android Wear falls short is the 'control' aspect of things.  It is a fantastic little devices for providing you with information, but at the end of the day I should be able to tap the thing on my wrist to control my every day life.......

The closest thing I could find right now is the IFTTT integration.  Bravo in general to this website and moreso for making it compatible with wear.  They get it.  Tap a button to cause an action somewhere in the real or digital world.  

So after playing around with existing recipes (https://ifttt.com/android_wear) I remembered a post I saw a while ago about controlling your computer with IFTTT and Dropbox vis SMS.


The premise is exactly the same except instead of using SMS as the trigger, you'll use android wear as a trigger.

On the PC side, you'll still use the same script that monitors a dropbox folder for a specific txt file and if it is found, will trigger the appropriate action.  

But to make it work with your Wear devices, you'll create a different recipe.

  1. Create a new recipe 
  2. Choose Android Wear as the trigger
  3. Choose Tap Button (which is the only option)
  4. Create trigger
  5. Select action
  6. Choose Dropbox
  7. Select "Create a text file"
  8. Enter an appropriate file name and folder location that you will have your windows script look for in the dropbox folder
  9. Call the recipe by a name you will recognize on the watch

Now that all that's done, setup the windows side script in accordance with the link I mentioned above and setup a scheduled task to run that script as often as you'd like.

Remember to modify the windows script to match the file/folder you setup your IFTTT recipe for.

FUN FACT: By default, windows won't allow you to run a scheduled task for anything less than 1 minute...........But what you can do is create 5 scheduled tasks set to run every minute 10 seconds apart (or 11 tasks 5 seconds apart, etc).

What can you do with this? Technically anything windows can do, but hey....it's Christmas!!!  Voila!!! My watch turns on the Christmas tree light show.


video