Sunday, April 5, 2015

Windows.Toggle V2

Like the quest for perfect weather itself, looking for the perfect weather app can sometimes feel neverending. - Serenity Caldwell

After I got my Nest last year I wrote a fun little script that checked the outside temperature (Forecast.io) versus the inside temperature (Nest) and told me if it was a good idea to open my windows. Nest didn't have a public API at this point, so it was using hacks against the website URL to make it happen. Since then, Nest released a real API and I got around to updating the script.

I had to think through how I wanted to write it. What I wanted to do was write a Swift script to make the updates, but with both kiddos in my life I have a hard time imagining when I'll find time to figure out how to write a Swift app. So instead I busted out Perl, my old faithful, and go to work. It only took a few days to make the updates.

Now it's all working beautifully. It pushes Growls to my computer which pushes Prowls to my phone which pushes to my watch. Wonderful.

Check it out on Windows.Toggle on Github and read about the awesome home automation devices I've been wiring up.