Tuesday, February 9, 2016

Homebridge It

Tomorrow, and tomorrow, and tomorrow, creeps in this petty pace from day to day, to the last syllable of recorded time - Macbeth

When Apple announced HomeKit at WWDC it sounded awesome. I have been slowly getting my house onto the Internet of Things (IoT) over the past few years, much to my delight, and perhaps to Mrs.Chaos' annoyance. I have a lot of apps on my phone to control all the different Things in my home and the promise of my beloved Apple solving the multiapp problem was amazing.

Then months and months and months passed and none of my devices were becoming HomeKit enabled. Tomorrow, and tomorrow, and tomorrow, brings forth this petty pace. Then came the vendor leaks that Apple was imposing stringent security requirements on devices for them to be certified for HomeKit. Which in the grand scheme of things is fantastic - we were heading towards a future where every device in home was connected to the Internet and they all had a password "admin/admin." Apple is forcing real passwords and real cryptography, but it means that none of my legacy unsecured devices had any hope of making into HomeKit.

I learned about an open source project called Homebridge - which is a server designed to wrap older devices with HomeKit APIs. Homebridge isn't HomeKit certified, so it means when you connect to it, Apple gives you the BIG warning that it's not certified, is probably not secure, and could be malicious. But of course I did it.

The result was that magically my WeMo-controlled fan, coffee pot, garage lights, my Nest thermostat, my MyQ garage, and my Netatmo Weather Station all appeared like magic! MAGIC! I bought the highly recommended Home app immediately to start taking advantage of it.

There were some holes in my home internet of things - my TCP Connected lights don't show up. The August SmartLock doesn't show up. Sad, right? Whatever to do.

Well ya know what? Homebridge is written in Node.js and the modules that run the devices are just Node.js packages. I know how to write JavaScript. How hard could it be?

I installed Charles Proxy to proxy my iPhone traffic and started running the apps that control my lights, garage, and lock - and you know what? They all use pretty clean and simple REST APIs that are easy to understand.

The result? I wrote a module that controlled my TCP Connected Lights - it probably took about 8 total hours to do. Because my only personal development time when the kids are asleep, 8 hours of work took over two weeks of my time to do - but hey, it's up and it's working!

Now I can say, “Hey Siri, goodnight” and the bedroom lights turn off and the bedroom fan turns on.  I can say, “Hey siri, open the garage” and the door opens. The temporal forces are trying to rip my home apart, because I am living in the future!

Friday, January 1, 2016


Mrs.Chaos’ iPhone stopped correctly syncing music a couple months ago. We disabled music sync, let all the songs get remove, and turned it back on and it barely put songs onto it. She left it with me one night to fix and I realied what was happening is that the sync would timeout after 2 minutes which meant it would only sync 10-20 songs each time it sync’ed. I did the obvious thing… wrote and AppleScript that just looped for ever and triggered sync every 3 minutes. After an hour or so - all the songs were back on! Problem solved.

Except last week she wanted to add more songs onto the iPhone. When I talked about the process of the sync loop she gave me, “you’re kidding me.” Look. Finally she said, “Look - you’re my techie husband, and you need to solve this for me.” When she asks for tech help on things she can figure out, I tell her, and she handles it on her own. She rarely asks for tech help that’s truly behond her, so when she asks for real, I gotta help.

The plan was to was to wipe and restore - but backup failed with “Device has been disconnected.” AHA! A hint! I tried a backup on my computer and it worked find. AHA! I deleted the local backups and the lockdown files and BOOM, everything working again.

Monday, December 28, 2015

Wallet Zero!

Around three or four years ago I ditched my wallet and I've never looked back. It has been such pleasure to only have to carry my phone (with credit card and drivers license). One fewer things to worry about and it means I'm really good about always having both my phone and wallet.

With each new phone (4s, 5s, 6s+) I've bought the Hex Wallet case and it's been amazing, the first one was smooth leather and the next two have been a weird fake snake skin texture, but it is the slimmest wallet case I have ever found and it has an open bottom so that all the various chargers and docks connect without issue.

I continue to scan all of my other wallet cards and keep them in a sync'ed photo album. Barcode scanners seem to work just fine on the cards on my phone. I recommend you give up your wallet too.


Sunday, December 20, 2015

The Times, They are a Changing

In 1999 I was in college and you couldn't really pre-order movie tickets online (or even in advance); you had to go to the theater the day-of. So you people camping out FOR WEEKS to buy Episode I tickets.
On opening night a friend called me around 7pm, "so they're showing it 24x7 at the big theater and basically ALL THE SCREENS. Why don't we just go and get the first tickets we can?" So it was that I saw Episode I at 3am on opening night. 
30s skip forward a few times to 2015 and Episode VII has been out for 3 nights and I haven't seen it. Because, you know, life is in the way with kids and work and Christmas and all that fun. Also, in my old age I've learned the actors in movies tend to give a pretty consistent performance, even if you don't see it opening night. 

Saturday, October 10, 2015

Being in the Plus Club

The only thing that's changed is everything. - Apple
I've had my new iPhone 6s+ for a few weeks now and it was an awesome choice. When it first showed up it seemed enormous and two weeks in, everyone else's phone seems tiny. It fits fine in all of my pant pockets - I mean, it's huge, but it doesn't fall out or feel like it's going to bend. I was really curious if I felt I could replace my iPad Mini with it - the jury is still out on that one.

The number one issue I have with trying to use this beast as my primary casual computer is the number of apps that don't work in horizontal mode or work bizarrely.  I'm looking at you Google Hangouts!  The Google Hangouts contact list only works in vertical mode, but when you're in a conversion with someone it works fine in horizontal. Really? REALLY! This type of insanity is everywhere. That means that I can't consistently hold the phone horizontally and be happy and I really want to do that.
Ignoring that horizontal gripe, it's great. I was worried I wouldn't be able to use the phone with one hand, but I use the cool double-tap feature to bring the top of the screen down ALL THE TIME, because I so often have a baby in my other hand and it's perfect. It makes this monster phone work fine one-handed.
I really wish all of the multitasking features worked on the phone so I could do PiP video, split screen, etc. But for now I'll work with what I have and see if I care about upgrading my iPad mini. I'm super-happy that I have unlimited data on the phone and I really want just keep burning through it.
Sadly - SADLY - I'm writing this on my laptop because Blogsy works on the iPad, but not the iPhone, and because Google Blogger only runs in vertical mode.  I am just now thinking I might have been able to pull this off in the web version... but nah.

Finally - reading comics on the big phone is plus ungood compared than reading them on the iPad mini.

Tuesday, September 29, 2015

Throw Away Your Memories

I ended the work day and stepped out of the office to find that my wife had taken all our movies and CDs out of the cabinets. "Hey, could you figure out if there is anything in here worth keeping, and we'll just donate the rest."

My childhood movie collection: "Secret of Nimh," "Flight of Dragons," "Dark Crystal." All on VHS.
My highschool music collection: "The Murmurs," "Peter Murphy," "They Might Be Giants." All on CD.
The thing is - we don't have a VCR in the house. We don't even have a CD player in the house.  All I could say is, "I need a moment." I got emotional.
My rational and emotional sides needed to have a conversation. Because in reality I know that I am never going to watch those VHS tapes or listen to those CDs again. The movies? The songs? Sure - I'll definitely watch those movies on Netflix and listen to those songs on Spotify, but I will never use those physical copies of it again. So rationally, I should just give them up so that we can use the space to hold crafts for the kiddos. Crayons, pens, coloring books, etc., make a lot more sense to store these days than decades old media I can't play.
It's hard to give up the totems. There were hard times in my past on those things helped to carry me through them and it feels like that imbued those actual physical items with gravitas.  THIS HERE!  This here?  This CD holds a hundred nights of wandering in the dark pondering the meaning of life. It holds a piece of me inside it.
In the end - it's almost all going to go on to new homes. I'm keeping The Murmurs. I'm keeping the Sailor Moon CD. I'm keeping ALL the VHS tapes. Beyond that, I'll make due creating new totems in my life.

Friday, September 25, 2015

Just Attach It on the Side

My new iPhone 6s+ didn’t show up today. I ordered at it 3:17am EST on pre-order day with the expectation it would show up on day one, but I got a notification from AT&T saying it would be late. Sad, right? There’s no people visiting my town or anything. I was excited that I did get a ship notification this morning with the FedEx delivery day for Monday. So, a little late, but not much - I think I’ll manage. Nothing like the Apple Watch fiasco where I had to wait an entire month!

Anyways, before I go the earlier ship notificatio, I was feeling bummed about having to wait a few weeks to get my phone and so to tide myself over I did some shopping therapy an order myself a couple of Mounties so I could side-mount my devices on my computer. This is pretty awesome, right? Running Duet on my iPad to give me an external display, and then running Reeder in full screen mode - AWESOME!

When I take the train to the office this week I am going to be able to mount my enormous iPhone on the side of my computer and watch movies on it. I’m super excited about this.