Wednesday, June 19, 2013

Making the Move

While the product has a loyal following, over the years usage has declined. - The Google

It's sad to see the departure of Google Reader. I've been using it pretty consistently since it first appeared as a labs project and loved it. I advocated to all my friends and slowly got the all on board with using. It was fantastic to have that Group of people who would "share" on Google Reader and then it would show up across everyone else's Readers. There was the time in Google history where a privacy bug made it so if your gmail address was on the same thread in a gmail message as someone else, they became your friend in Reader and you started seeing their stories. It was awesome.

Due to this great "feature" many of my friend's friends became my Google Reader friends and I could see the cool stuff they were sharing. It built quite a fun interactive environment. Once I had my reader up when a friend was over and he noticed his sister's name on my computer (because he had sent an e-mail to both us, thus making us Google Reader friends). When I asked why he was starting so intently at my computer he said, "I was trying to determine why my sister's name was on it to see if I should be angry with your or not. I guess not." NOT INDEED!

Of course, eventually Google rolled out Google Plus and removed the sharing feature from reader. In two weeks Reader will close its doors. When Google announced the shuttering months ago I expected the Internet would respond with a half a dozen decent cloud-based RSS readers, but it appears to me that is not going to be the case. I exported all my data from Google Reader… but today I made the decision to never return to Google Reader. All my stuff has moved to Feedly and its working pretty well for me. I'm hoping that Feedly with open up it's API so that my favorite client (Reeder) can run against it, but for now I will continue to use Feedly directly. Someday I expect them to start injecting ads into my stream, but for now, I guess it's the best alternative out there.

Sunday, June 16, 2013

Morning Time is Father's Time

Goooooooood morning, Vietnam! Hey, this is not a test! This is rock and roll! Time to rock it from the Delta to the D.M.Z.! - Adrian Cronauer (Good Morning Vietnam)

Growing up I associated the morning with dad. In the family, he had the highest amount of "morning person" in him. As a small kid I would be blissfully asleep in bed when he would wander in singing one of the many variations of "good morning to you..." and open the shutters on the windows in my room ("good morning to you"). I had a corner room on the north east side ("you look like a monkey"), so the morning sun would come right in the windows onto my face ("and you act like one too").

On lazy weekends we would get up, go grab some cereal, and sit down to watching morning cartoons. *chomp* *chomp* He-Man *chomp* *chomp* Captain N: The Game Master *chomp* *chomp* Mask. Back in the days of only have a half a dozen televisions stations, sometimes historic world events would occur and preempt the cartoons. My father, always crafty, would pull out a VHS tape of cartoons recorded on previous weekends and we were once again back in business!

Moving on to Jr. High and High School the morning routine matured, but I could still count on being woken up to music. Monday through Saturday, he would blast (I mean BLAST) the soundtrack to Good Morning Vietnam though the house at wakeup time. I expect to be able to recite Robin William's opening for the rest of my life. The only "relief" was on Sunday mornings.... "Jesus Christ.... Superstar... Do you think you're what they say you are?"

Tuesday, June 11, 2013

Home Automation

We hope you love your new Nest. - Tony Faddell
For our two-year anniversary Mrs.Chaos got me a Nest home thermostat.  It has the simple benefits of just being a super cool home thermostat with neat features about setting complex schedules and auto-detecting when I leave the house to switch to away mode.  We live in the age when robots should be doing so much more than washing our dishes and clothes - they should be vacuuming and mopping our homes, mowing our lawns, and so on.
I think my favorite "feature" is the undocumented API that is available.  So I can read various settings from the Nest and then do things based on it.  Recently I wrote a script that checks the temperature of the house through the Nest API and then checks the temperature outside using Forecast.io's API.  As soon as it cools down outside below the inside temperature it sends a notification to me to open my windows!
The other script I want to build is to get a few more temperature gauges so that if one part of the house (office, bedroom) is more than five degrees different from the others it I can just kick on the fan-mode to circulate the air.  Awesome, eh?  Yeah!

checkWindowState.php:
 
$forecast = new ForecastIO($api_key);
$nest = new Nest();
$windowStatefile = getenv("HOME") . "/Dropbox/scripts/nest/windowstate.txt";  
 $windowStateString = rtrim(file_get_contents($windowStatefile));  
 $windowState = "closed";  
 if($windowStateString == "open") {  
  $windowState = "open";       
 }  
 // Get the device information:  
 $mode = $nest->getDeviceInfo()->current_state->mode;  
 $insideTemp = $nest->getDeviceInfo()->current_state->temperature;  
 // Get the NEST reported tempurature  
 $locationArray = $nest->getUserLocations();  
 $nestOutsideTemp = $locationArray[0]->outside_temperature;   
 $outsideTemp = nestOutsideTemp;  
 $condition = $forecast->getCurrentConditions($latitude, $longitude);  
 $forecastIoOutsideTemp = $condition->getTemperature();  
 $outsideTemp = $forecastIoOutsideTemp;  
 if($mode == "cool"  
   && $windowState == "closed"  
   && $outsideTemp < $insideTemp ) {  
  $windowState = "open";  
  exec("/usr/local/bin/growlnotify -s --image ~/Dropbox/scripts/nest/nest.icns -n \"Nest\" -p Moderate -m \"It's cooling off, open your windows.\"");  
 } elseif ($mode == "cool"  
   && $windowState == "open"  
   && $outsideTemp > $insideTemp ) {  
  $windowState = "closed";  
  exec("/usr/local/bin/growlnotify -s --image ~/Dropbox/scripts/nest/nest.icns -n \"Nest\" -p Moderate -m \"It's warming up, close your windows.\"");  
 }  
 file_put_contents($windowStatefile, $windowState);