Airpods (or “Why Should I Pay A Hundred and Sixty Bucks for Wireless Headphones That Will Fall Out Of My Ears”)

Today was Apple’s big Fall 2016 New Product Introduction and Pancake Breakfast Jamboree. As is traditional, we got treats and surprises that are no less welcome for being predictable and indicative of solid – if relatively unremarkable innovation.

The Watch got an update to make it officially waterproof (as opposed to being unofficially waterproof) and it got a GPS chip, a brighter screen, and a faster processor. Great. I love my Apple Watch dearly because it’s an extremely useful adjunct to my iPhone 6 – which on a very practical level is pretty much my default computer these days.

The iPhone 7 was introduced to a public that had known about it for weeks if not months in advance. To be honest, I didn’t pay a lot of attention to the specs, so I’m going to play it safe and say that we probably got new colors, a better camera, more powerful processor and more storage. Oh, and a design tweak so that it doesn’t look like the 6s.

Much ballyhoo has been made of the lack of a headphone jack, and I’d really hoped for some nice wireless headphones in the box. Nothing exorbitant; I have a few pairs of cheap Bluetooth headphones that are solid and dependable and have excellent audio quality and battery life. I think they cost me about $15 a pair on special at Amazon. That would have been great. Instead, we got these:

…for $159.

This in itself would be okay with me – after all, there are plenty of fancy bluetooth earbuds out there that are cheerfully in that price range, and these do feature some nice Siri integration and probably sound very nice indeed. Plus, there’s a charging carry case for them that could be very handy. No, what I’m peeved about is what’s missing; to whit – a wire connecting one to the other.

Let me explain. Apple thinks that everyone has a head like this:

Observe, if you will, the classical profile and proportional elegance of the noggin. This model has ears that can cheerfully accommodate the squished grape shape of the Airbuds/Apple Headphones, which are designed to fit snugly into your ear canal without any of those tacky silicone bits that other folks put on the outside. Where this all falls apart is when you’re dealing with people like me, who have enormous, ungainly ears. If I put Apple headphones into my ears I can get about four steps without the things falling out, and the only way I can get them to stay is by corkscrewing them so deep into my ear canal that I run the risk of some kind of internal cranial bleed.

Now, the falling-out-of-your-ear thing is a constant issue, but not really too bad considering that A) my super-cheap earphones have silicone tips which greatly ameliorate the problem and B) they’re joined by a wire so if one falls out then it’s not going to bounce away across the floor never to be seen again. Also, they cost $15. Meanwhile, the AirPods cost ten times as much, and if one of them falls out while I’m running/walking/mucking horses then I’m willing to bet that that’ll be $159 I won’t see again…

MAC OS X AND TESLA API (PT. 2)

When it comes to loading and working with with third party APIs for your car, it kind of goes without saying that there are some caveats to be considered. For one thing, Tesla’s servers don’t take kindly to being spammed into oblivion if your computer decides to be a Chatty Cathy – if you’re sending a ton of requests on a constant basis then that’ll put a load on the servers, and they’ll probably respond by blocking your IP address. Secondly, you’re tinkering and tampering with a big, heavy, complicated and expensive machine, so consider what you’re doing and don’t decide that it’d be neat if you could heat your house by cranking the temperature up on the heater and leaving all the doors open or something equally asinine. You should exercise common sense regarding activities that might reduce the efficacy of the battery or other systems of the car.

Also remember that if you’re tinkering with the locks and remote starting the car then you’re also practically rolling out the red carpet for someone to steal your car. It’s perfectly possible for me to be in my office and remotely unlock the car and start it up so that any passerby could just get into the thing and drive it away. I don’t do that because that would be dumb, and I’d hope that nobody else would either.

With that out of the way, let’s get on to the good stuff.

You’ll need some kind of environment that’ll allow you to access the REST API. There are some ways of doing it in Python (which is very tempting), but the simplest method is to use a Javascript runtime like nodejs. That can be downloaded from nodejs.org.

Once that’s installed you’ll use the npm to install the Tesla tools, thus:

Sudo npm install -g teslams

Every time you query Tesla’s servers you need some kind of authorization. On the car (and on the official client) that’s handled with an oauth token, but the simplest way to handle authentication in this case is to just use the raw credentials. Yes, I know it’s a bad idea.

There are a bunch of commands built into the API and there’s good documentation out there about what it all does (see here for a good rundown). Each requires a -u username and a -p password flag. I don’t really want to be able to unlock the car or flash the lights, but it might be nice to have a simple way to see how much charge is in the thing, so I added this line to my .profile (credentials changed for obvious reasons):

alias charge='chargebar -u myemailaddress@emailaddress.com -p mysupersecretpassword'

Firing up Terminal and typing in “charge” gets me this:

…which is pretty neat. Now I just have to find the time to get that data periodically pulled down into a .json file so that I could throw it up on something like Panic’s StatusBoard…

MAC OS X AND TESLA API (PT. 1)

I bought a Tesla Model S a couple of years ago, and have only recently started shutting up about it. This has been a herculean effort all things considered because it’s absolutely the most incredible piece of tech I’ve ever owned. Sure, the iPhone is pretty remarkable and you can make a lot of solid arguments about the value of the personal computer of your choice, but can those things make you giggle like a five year-old on a regular basis as you mash the accelerator down and feel gravity put its hand on your face and push? No.

Also, it’s pretty and well-designed and comfortable and roomy and… I’m doing it again.

As it’s a nice modern car with all the bells and whistles and connectivity that you could hope for, it’s also stuffed with gadgets and gizmos that report who you are, where you’re going and what you’re doing. Every time someone crashes their Tesla and claims that Autopilot made them do it Tesla invariably releases a statement an hour or two later to the effect that they looked at the data from the car and can definitively prove that the person had their hands on the wheel or just hit the accelerator instead of the brake. They’re able to do that because the car continuously records speed, location, altitude, temperature, what systems are engaged and disengaged and reports that all back to Tesla’s servers. It would be creepy if it wasn’t so neat.

And if it wasn’t open. You see, the really neat thing about that data is that it’s not just locked away for Tesla’s own digestion and enjoyment; while the official Tesla API is still under lock and key there are plenty of other ways to get at that data. There are a few excellent iOS apps that will give you access to the controls of your car (some allowing things like Summon, which will wake your car up and make it drive to you), and a couple of excellent third-party Mac apps that will allow you to look at and control some of the more elementary functions of your car, such as VisibleTesla.

What I’m after, however, is something faster and more command-line accessible, so I’m going to spend the next couple of posts running through what’s required to get quick access to some essential information and functions through the Terminal on OS X.

Of course, if I mess it up then it’s not like I’ll brick my car. At least, I really hope not…