Google Home vs. Nest Audio: which sounds better?

It goes without saying that the Nest Audio wins this contest hands down. But perhaps it’s not clear just how much better the sound is out of the Nest Audio.

Granted, the Home was released a veritable lifetime ago as far as consumer electronics aging goes. But if you’re sitting on a Google Home or two you’re probably not worried about the age of the device – I mean, it still works and it’s still updated – but rather whether there’s any reason to spend the money to treat your space (and ears) to a sonic upgrade. Basically – is there a reason to upgrade?

Well… yes. Now, full disclosure: I’m not one to upgrade my technology just for the sake of upgrading. There has to be a compelling, useful feature that the upgrade presents that the current device – or devices – does not. And even then the actual decision may be delayed just to make sure I’m not spending impulsively.

So in the case of the Home, it became clear that its audio just wasn’t matching the mid-range and high-range clarity of the Home Max or even the Home Hub Max. This became more obvious as I’ve recently started doing more listening on speaker groups, mostly listening to radio or music on all of the speakers on the main floor. The Home’s deficiencies were on display as I moved throughout the house.

Even so, at CAD$129 it didn’t seem to make sense to upgrade. I can’t believe that I’ve become a deal-seeker, but why not? It also helps to curb impulse buying if one at least waits for products to go on sale, so that’s what I did. And at CAD$99 the Nest Audio is more compelling, coming in at the same price as the Home was when I initially bought in if I recall correctly.

Ok great – but what are my impressions?

Well, first of all I was surprised by two things: the weight of the Nest Audio (considerably heavier than the Home) and the size (smaller than I was expecting, at roughly the same height as the Home). Then once the device was configured and I sent audio to the speaker group, I was again surprised: was the bass I was hearing coming all the way from the Home Max on the other side of the house, or was this little Nest Audio really hitting these impressive lows???

It was the latter. The Nest Audio represents a significant leap in audio quality over the Home. Like, night and day. It’s much clearer over the entire frequency range, and it actually produces discernible, clear and meaningful bass frequencies. Now, it does seem a little quieter than the Home, which seems to be the trend with all of these speaker upgrades that I’ve written about. But the sound is so much better at reasonable listening levels that I really do have to recommend the Nest Audio to anybody who has been holding on to their Homes for a number of years.

Which doesn’t mean that you should get rid of the Homes. Redeploy them if you can, or gift to somebody who’s new to the Google ecosystem or somebody who could use some more sources of audio. The Home is still capable and as I said earlier it is still supported. But if you have particular areas that can benefit from better audio – larger rooms, or primary listening areas – then go for the upgrade.

Now I just have to resist the temptation to upgrade my two remaining Homes before the sale ends 🙂

Google Home vs. Nest Home Hub Max: which sounds better?

A little while back we added a Nest Home Hub Max to our collection of smart home devices. The Hub Max was intended to replace a Home that we use in the kitchen. And given the wife’s preference to blast music on that device, I attempted to do my due diligence in researching the topic:

“Does the Nest Home Hub Max sound better than the Google Home?”

But the answers weren’t forthcoming. Given that one device has a display and the other does not, perhaps it’s the case that the two devices are not often cross-shopped. Regardless, I took the plunge and thought I’d return the Hub Max if it performed poorly.

Before going any further it might do you some good to read about ten paragraphs into this post, where I talk briefly about my experience with replacing a Sony mini bookshelf system with a Vizio SP-70 Crave Pro speaker. Here’s the main takeaway:

Crave Pro […] the music reproduction was something altogether different from the Sony.  Again, the Sony is louder and has boomier bass.  But… but… does that make the Sony better?  Because, truthfully, the Pro actually has a wider soundstage and richer bass at moderate listening levels.  It can’t get as loud as the Sony while maintaining the same composure that the Sony can, but… it can get loud enough

Thing is – my experience with the Nest Home Hub Max and Google Home was altogether similar.

The Home seems to go louder than the Hub Max – but, the Hub Max has a much more pleasing sound. Its bass is richer compared to the Home, while the latter’s is more boomy. And, likely due to the inclusion of the two front-firing midrange/highrange speakers, the mids and highs are reproduced more faithfully on the Hub Max – even when the music is played louder.

My impression has only improved over time, much as it did with the Vizio vs. the Sony. And as with that latter comparison, it has become apparent – again – that music doesn’t need to be cranked to be properly enjoyed.

If only the wife felt the same. Nonetheless, I’ve tried to tune the bass and treble settings so that when she does (frequently) crank the volume past 7, the sound at least holds together as well as can be expected for a speaker of this size.

So there you have it. If you’re looking for better sound, you’ll be happy with the Hub Max. If you absolutely need that boomy bass and are looking to go as loud as possible – stick with the Home.

IPv4, IPv6, NAT NVI, and Google Cast – this fortnight in my world

Yes, it’s been a whirlwind 2 weeks!

First things first – I hope that you and your family are safe, happy and healthy.   I have many thoughts concerning the various trials that we are currently facing – but for now I’ll keep things light and let you know about the fun time I’ve had with protocols, address translation, address prefixes, Apache configs… ya, it’s been fun.

So this all started out with a desire to up my Internet bandwidth game in the hopes of going IPTV.  The idea was to finally ditch coaxial cables and to take advantage of better pricing.

I’ve always run my own router, relegating the ISP-provided equipment to a simple bridging configuration.  However, I’ve been tied to Cisco (!) routers since beyond time, as we use Cisco equipment at work and I like the flexibility – and familiarity – that the equipment affords.  The problem has been that Cisco equipment has tended to have lower overall throughput than the typical router you’d find on a shelf at Best Buy, while costing way more.

And the truth is that my Cisco config is somewhat more complex than a typical home router config.  Sooo…. I stuck with my trusty 881 until I decided to pull the trigger on a 921-4P.  The 921 gave me my full 150Mbps of downstream bandwidth – and then some – so I was in position to go the IPTV route.

That is, until SARS-CoV-2 hit and no self-install option was put forward for Digital TV customers to upgrade to IPTV.

Truthfully it may be a “blessing” in disguise, as I’ve read mixed reviews concerning the reliability of my provider’s IPTV offering.  Most reviews are positive, but the last thing I need is for the WAF to drop due to inconsistent viewings of Island Life on HGTV.

But hey, at least my downloads became about 3x faster!

Switching gears.  The next challenge was to revisit something that had been a thorn in my side for a long time.  See, your typical Best Buy router may do something called NAT Hairpinning, which allows clients on the LAN to access local servers that have been given an address translation on the WAN side.  Basically, you access a machine on the LAN using its translated public IP address.  Cisco routers can do this as well using something called a NAT Virtual Interface – NAT NVI, or just NVI – but it saps performance.  My 150Mbps (sometimes as high as 250Mbps+) dropped to under 100Mbps when running NAT NVI.

Why bother with NAT NVI in the first place?  The truth is that I’ve been making do without it for a number of years now.  I run my own internal DNS server which means that I can answer all DNS queries with the inside IP address.  Why bother?

Google Nest Hub and Nest Hub Max, that’s why.  We have a number of Google Assistant-enabled smart devices in our home, and for whatever reason Google has sought fit to have these devices try 8.8.8.8 and 8.8.4.4 for DNS resolution before trying whatever DNS server you’ve assigned via DHCP.  I’ve worked around this in the past by blocking access to Google’s public DNS servers, but Google got really crafty with the Nest Hub and Nest Hub Max and they started resorting to using DNS-over-TCP (encrypted DNS), and I think they even use the IPv6 addresses for their public DNS servers if IPv6 is enabled.

But wait – why is this a problem at all???  Who cares what DNS servers those devices use?

I care friend.  I care.

Actually, my Cast receiver app cares.  The one I’ve written about ad naseum on this very blog.  The one that’s hosted on my LAN and only really of use on my LAN.  The one that allows me to throw my music around the house in whatever manner I see fit, rather than relying on Google Play Music, Google Flavour-Of-The-Month Music Streaming Service, or YouTube “Do you want to keep listening?” Music.

Running said Cast app requires that the Assistant and Cast devices connect to a server on my LAN.  This requires that they resolve the URL registered with my app to an address on my LAN.  This requires that they use the DNS servers on my LAN.  If they don’t/can’t/won’t do this – like, oh, our Nest Hub friends don’t/can’t/won’t – then I can no longer cast my music to said devices.

So that was the dilemma.

And I’ll say again – this all worked with NAT NVI.  But I wasn’t willing to take the throughput hit.  It just didn’t seem right.

Also – congrats for making it this far.

You may be wondering: “How does IPv6 fit into all of this?”  Well, IPv6 is something I had ZERO experience with prior to 2-3 weeks ago.  But now?  Hey, I’m running dual-stack my friend!  IPv4 and IPv6 are in the house!  I even rely on IPv6 as a solution to my Google Cast woes while still running traditional NAT and getting back my 150Mbps+ downstream goodness!

Here’s how it works:

I gave up (mostly) on trying to manage DNS for Google’s devices.  If they want to use Google’s public DNS servers, they can use Google’s public DNS servers.  In exchange, they have to resolve my receiver app’s URL using IPv6.  In a nutshell: I changed the receiver app’s URL to one that only resolves to an AAAA (IPv6) record externally.  Internally (on my LAN), that same URL resolves to an RFC1918 IPv4 address.  If a dual-stack device attempts to resolve the URL using a public DNS server, it will get the IPv6 address.  If it resolves using my internal DNS servers it will get the private IPv4 address.

The reason why this works is that IPv6 was designed so that NAT would not be required.  The idea is that every device on the planet can have a unique, publicly-routable IPv6 address.  Since NAT is no longer part of the equation for an IPv6 host, a Nest Hub Max that resolves my receiver URL to an IPv6 address will simply connect directly to the server’s IPv6 interface on my LAN.  A device that resolves the IPv4 address will do the same, using the server’s IPv4 interface.

And any device that resolves the URL externally will hit the router (firewall) and go no further.

Seriously.  That’s it.  It’s crazy how simple it is.

Obviously the implementation is more complex than it seems.  My public IPv4 and IPv6 allocations are dynamic.  I’ve had a solution in place for some time to handle changes to my IPv4 public IP (nothing magical there, just look up Dynamic DNS for more info) but I had to figure out how to deal with changes to my IPv6 address.  This also meant that I had to do some reading to understand how IPv6 works.  As it turns out, my ISP gives me a /64 IPv6 prefix.  This is combined with another unique 64-bit address to form the entire 128-bit IPv6 address for a particular host.  The 64-bit host portion doesn’t change, so I only need to routinely check the IPv6 prefix and update my dynamic DNS entry when the prefix changes.

Things got even more complex because Apache needs to understand if a client is on the LAN or coming in from the WAN.  This also necessitated upgrading my Apache server – which also became a good time to move it to another virtual machine.  I won’t get into how I accomplished everything but suffice it to say that it was the most straightforward problem to solve in this entire mess.

So there you have it.  Check back with me in a couple of weeks to see if everything is still working.

More Cast, more Mobile

Just more development things.

Some of you (who are you?  WHO ARE YOU?!?!?) may have noticed the following in a recent blog post concerning the Vizio SmartCast products:

Whatever transport controls the speaker supports are hidden away as swipe and tap gestures within the ring.

Truthfully there are only two supported gestures: play/pause (the “tap”) and next-track (the “swipe”, which can occur in any direction).  And being the deranged soul I am, and in the name of Progress(tm), I decided to dive down the rabbit hole that would hopefully end in being able to use these gestures to control my (11-year-old-)music system.

Some background.  What I really like about Cast is that it really does provide a comprehensive bridge to the hardware that’s rendering your content.  I talked briefly about the API’s messaging abilities and how I primarily use my own messaging solution to have clients (“remotes”) talk to the Cast devices (as “renderers”).  But I have to say, there was an embarrassing level of giddiness on my part once I was able to turn said ring on the Vizio devices and watch volume level automagically change in my music system interface.

That sort of dark magic is powered in large part by the messaging features in the API.  And the closer you come towards full Cast API compliance, the more your powers level-up:

  • rich media metadata (including images) in the Google Home app and Cast notification
  • a track scrubber that updates in real-time on certain Cast clients
  • interaction via the (much maligned-)Cast nofitication that appears on your Android device when something is Casting on the network

Sooo… like some Dr. Frankenstein groupie I’ve settled on an implementation that mixes Google’s magic with my own amateur code and the result is something wonderful, horrible, and awesome to behold!

Riiight.

Sparing the hyperbole: I got to the end of the rabbit hole, and can now use the Vizio gestures to control the music system.  I’m listening for the transport messages (as defined by the Cast API) coming from the Vizio devices and acting upon them.  These tend to map directly to the transport controls that would otherwise appear on the web player, but which are hidden when the player is running on Cast.  I’m also responding to Cast status requests that various clients send (including the Vizio devices).  And to top it all off, in the case where a Cast-capable client is actually connected to an existing Cast receiver session, I’m using the Cast messaging API to send transport messages to the receiver app directly – again, these map to the hidden transport controls on the receiver.  This happens in place of using my remote/renderer messaging solution.

Cool.  What else?

Is that an app in your pocket, or…?

Accessing the music system while out and abroad has taken on many, many, many different forms over the years.  Names that come to mind:

  • GSPlayer
  • XiaaLive
  • Winamp

All of these things were eventually replaced by the web player powered by HTML5’s AUDIO tag.  And that’s great and all, but for mobile in particular I’ve wanted something more streamlined and purpose-built.  Plus it’s been an ongoing battle going up against things like “Gesture requirement for media playback” and Chrome’s tendency to kill timers on tabs that have been backgrounded for some time.

I’ve toyed with writing an app to resolve this but – newsflash – I didn’t write one, and I still haven’t written one.   What I have been angling for instead is to backdoor my web player into some container that would let it have all the rights of a native-app citizen, kind of like I backdoor’ed the web player into Cast as a receiver app.

And the good news is that there’s a lot of work underway to make first-class citizens out of web apps. Progressive Web Apps, Instant Apps, even the old “mobile-web-app-capable” meta tag that started it all.

So to that end I’ve finally gotten to a point where most pages are presentable/usable on mobile.  And, crucially, the web player will pin to the bottom of the page and stay there while you navigate the site.  And boy was that fun.  Remember, I’m not a design guy – so getting this thing to work in portrait/landscape wasn’t pretty (and the CSS/JS still isn’t pretty, but whatever).

Anyhow we’ll see what container this thing eventually ends up in (Cordova app?  Tasker app? PWA? Is “Add to Homescreen” enough?)  I’ll report back here once I know more 🙂

Display-capable Cast UI

I mentioned in some other post that I’d post a picture of the UI I designed for display-capable Cast devices playing music from my music system. So here’s an example:

This is taken on my tablet set to impersonate a Cast device, so the UI is a little more cramped than it appears on a TV.

Pretty much sums up the experience though.

(Vizio Smart-)Cast All the Things

So the music system has been running really well with the various Chromecast Audio (and regular Chromecast) devices sprinkled throughout our house.  No complaints really on interaction, responsiveness, usefulness, etc.  However… Progress(tm).

I’ve probably alluded to my ongoing quest to reduce and de-clutter my living space.  This is and probably will forever be a source of intrigue, excitement, and cash drainage.  Technology marches forward and enables ever-smaller devices to fill the role that myriad other devices once filled – or at the very least, that much larger devices once filled.  And in some cases devices become virtualized and move into the realm of bits and bytes, losing their corporeal selves and existing in “the cloud”.

Riiiight.

Back to music.  When I first began the home audio aspect of my Home Automation ambitions 11 years ago, the unanswered question was: how to bridge the digital world and physical world?  Digital, in that I was writing the software that would form the basis of the home audio system, and physical in that you need hardware to produce the music – and also to control it.  It’s interesting reading the old articles chronicling those first steps, and then reading the machinations I went through as I struggled with concepts and financial constraints to realize the system I was aiming to build.  All of this reading is available on Piper’s Pages, if you’re interested.   Even then, the two big questions were: how to physically interact with the system? And: what will produce the music?

It’s the latter that I’m focusing on in this post.  The early system’s intentions were so cute, in retrospect.  Multiple sound cards, running outputs of cards into inputs of other cards, worrying about card addressing.  So quaint.  And then we moved to another house, and those sounds cards haven’t done a single DA conversion since.  Nope… the new, temporary solution was to use smartphones or tablets connected via AUX or Bluetooth.  The remote/renderer capability of the system made this a little more bearable, in that you could purpose a tablet as a renderer and have it tethered to an amp via AUX/Bluetooth, then control it with your smartphone running as a remote.  But again… so quaint.

This was certainly a stopgap solution.  I had envisioned a full-fledged Sonos setup for the move, a dream that was never realized due to cost and unanswered questions of how to get my music to Sonos.  Would I be back to utilizing sound cards and piping music to the Sonos network via AUX?

At some point we gained Cast integration, and that was a Good Thing(tm).  Cheap to implement, could repurpose existing amplifier/speaker hardware, and it brought with it the software challenge of how to integrate my 11-year-old software project with something that was both modern and surprisingly sensical in its approach (I’m speaking of the technology that underpins Cast).

But…… Progress(tm).

The system has certainly been capable.  Multiroom is a thing, mulitple audio streams is a thing, Bluetooth headaches are not a thing.  What became evident through is the divide between interaction models.  You can get as far as casting audio to a destination, but then you have to switch mindset and think of the destination itself: is the amp on? is it on the correct input? do I control the volume in software or hardware? is the Harmony remote in the right mode?  It’s a conceptual disconnect.

Still, Cast certainly seemed like the right way to go.  And Google eventually launched the Chromecast Built-in program, which seemed to address most or all of my problems.

Which brings us to the real reason for this post – my experience with Vizio’s SmartCast products.  Specifically, the Crave 360 and Crave Pro.  And I have to tell you, I’ve really been on the fence about the move to Chromecast Built-in, much less Vizio’s own implementation.  Truthfully, moving to built-in represents more of a sideways move than a forward move: same Cast technology, same Cast integration, same music in the same physical locations (probably).  You’re spending money but on the face of it the only thing you’re really addressing is the “disconnect” issue.  Unless, of course, the new hardware does better at music reproduction.

In my case the Sony bookshelf that the Crave Pro was to replace is a pretty good system.  It’s louder than the Pro, it has boomier bass.  What irks me is the “disconnect”.  And the wires.  Man, the wires.  Getting the Sony into the music ecosystem means four physical devices (1 amp, 2 speakers, 1 Chromecast Audio), 5 wires, and 2 power outlets.  In this age of appliances I really wanted a single integrated device with a single wire going to a single power outlet.

Sooo… Crave Pro.  It really is my first experience with the amplified-speaker age that we’re in now.  And… I was disappointed.  The Cast aspect was fine, really.  But the music reproduction was something altogether different from the Sony.  Again, the Sony is louder and has boomier bass.  But… but… does that make the Sony better?  Because, truthfully, the Pro actually has a wider soundstage and richer bass at moderate listening levels.  It can’t get as loud as the Sony while maintaining the same composure that the Sony can, but… it can get loud enough.

I’m aware of the danger in trying to convince yourself of something.  And I definitely vacillated on the Pro.  The 360, on the other hand, went through one night of uncertainty but then became a firm “yes” after applying a software update which solved strange Cast disconnect issues.  The 360, unlike the Pro, is a new entrant – having a portable speaker that can be used in the yard or the garage.  It fills that role and it fills it well, so it got to stay.  And so did the Pro, honestly, once I decided that insane volume no longer has a place in our house.

That’s right folks.  Apparently I’m maturing… who knew.  The Pro is the right answer for the intended application.  It’s different than the Sony – in all the ways previously mentioned – but it turns out that it’s the right answer for the particular application.

So ya… the march goes on.  The music system is evolving.  I’ll spare a paragraph to say that what I like about the Crave 360 and Crave Pro are their simplicity: an amplified speaker with a physical volume knob (actually a ring) which itself is very thoughtfully integrated into the design of the unit.  Whatever transport controls the speaker supports are hidden away as swipe and tap gestures within the ring.  Music reproduction is nice – and actually impressive on the 360 given its size – at anything below 75% volume.  Which, frankly, is just fine when you remember that these things are not meant to be concert speakers but rather are intended to fill a room with music.

I’m happy.  They can both stay.

Music – now with Google Cast integration

So it’s taken me the better part of two weeks to implement and many months of contemplation, but I finally have a fully-functional Google Cast implementation in the music portion of my home automation system.

Why two weeks?  Much of it was spent doing research.  Most of it was spent spinning my wheels before realizing that a lot of the pieces I’d need to complete the project were already in place.

I don’t recall how much detail I’ve gone into in this blog about the technical details of my web-based music system, so I’ll just summarize.  As far as playback is concerned there are two ways to actually listen to music on my network; either via a SHOUTcast server, or by accessing the music files directly over HTTP. SHOUTcast was the method of choice in the early years of development and eventually it became possible to add transport control functionality to control the SHOUTcast stream.  As a result the entire experience resembled a web-based player and the tunes were on-demand.  But it wasn’t really a web-based player, so the next phase of development was to implement a real web-based player that accessed the music files directly.  And as is the case with all modern web “apps”, that player uses HTML5, Javascript and CSS to work its magic.

So that’s the history.  When implementing Cast I followed much the same path; the first crack was to use the Default Media Receiver and have it stream from SHOUTcast.  This worked – surprisingly – but again the limitations of such a setup (mostly a result of buffering lag) proved onerous.  I deliberated, and researched, and deliberated some more, before deciding that the Cast device had to access the music files directly.  How?  Where to start?  And then it hit me.

IFRAMEs.

I don’t remember what came first; the Internet(tm) or my own “Aha!” moment.  The Internet(tm) said that it was possible to browse arbitrary websites on a Cast device by loading those sites into an IFRAME.  My “Aha!” moment came when I realized that my web player – the HTML5, Javascript and CSS player – used the very technologies that underpin Cast’s receiver “apps” and should therefore be able to run directly on a Cast device.

Put your web app in an IFRAME and by George you have it

Of course there was some “glue” to sort out.  Most important to a Cast implementation is that the receiver app stays resident, otherwise Bad Things(tm) happen.  Well, more like Undesirable Things(tm): the Cast device may go back to its default state, or at the very least your sender will lose connectivity to the (non-existent) receiver.  So I had to code a small receiver and get a little creative on the host side to make sure that the web app and receiver stayed in sync.

But mostly – it just kinda worked.  The web player runs in an IFRAME and the receiver app runs in “top”.  The web player – if left to its own devices – will just trundle through the server’s playlist until there are no more songs to play.  Or, with the correct settings, the player can be controlled from any other device accessing the music system.

How to control your Cast audio player

This is the interesting part.  Obviously you can’t interact with a web app running on a Cast device.  The Cast APIs have a robust messaging system that allows two-way communication between the sender app (which you can interact with) and the receiver app.  This is great, and I imagine it works well for transport control.  But I didn’t use it a great deal for two reasons:

  1. I had already developed a way for a “remote” to control a “renderer” in my music system (see the last couple of paragraphs of this post).  That is, any device – the “remote” – can access the system and see a representation of another device’s web player – the “renderer”.  The remote queues commands on the web server which are subsequently picked up by the renderer, effectively making transport controls available to the remote.
  2. While I appreciate Google’s concept of senders and receivers, my only desire is to have a device load the web player onto a Cast device and then have the Cast device communicate with the web server directly.  I don’t need the sender to maintain connectivity to the receiver.  This mirrors the existing status quo where any device – smartphone, tablet, PC – is just a client to the code running on the server.

I do use the messaging API to setup the receiver app and load the IFRAME.  But once the web app is loaded on the receiver, all messaging goes through my code running on the server.

So ya, add in some housecleaning and Bob’s my uncle.  I even designed a new web player interface specifically for display-capable Cast devices; something that looks a little more presentable on a TV.  The audio-only Cast devices just run the same player that any old smartphone/tablet/PC web browser gets.  I may reduce this to the bare essentials at some point but it’s really not necessary to do so.

I may post some pictures at a later date.  You know, if the adoring masses that frequent this blog demand as much.

More [home automation]… more more more!

(trying to conjure my best Agent Smith voice)

The never-ending journey continues.  First there was music.  Then came cameras.  Finally, a thermostat.  And now… [drumroll] Lights, camera, action!

No… literally: lights, cameras, actions!

That’s right, I’ve finally added lights to my little home automation system, courtesy of Belkin’s WeMo line of WiFi-connected peripherals.  Specifically, I’ve got a Smart Switch and a Light Switch, with potentially more to come (and definitely more to come if Belkin introduces a 3-way Light Switch)

The upshot: welcome-home lighting!  Among other things obviously…

I won’t get into the current use of the Smart Switch, but the Light Switch is currently connected to my front porch lights, and the most useful rule that I’ve coded into the automation system is intended to turn on those lights if somebody is enroute after sunset.  This will happen even if, for example, one spouse is driving home while the other is already at home.  As the coming-home logic is already a staple of the home automation system, the real challenge was getting the system to actually communicate with the Belkin gear.

To that end you can follow some of the discussion in my Twitter feed – but honestly there’s not much there.  Ultimately I went with the Python ouimeaux library – after much gnashing of teeth given my Windows environment rather than the favoured Linux environment – and it was Job Done(tm).

So all credit to Radio Thermostat and Belkin for your cloud services and mobile apps, but… I’m a control freak; I’ll take a RESTful API over a mobile app any day.  (And I’ll take your devices too, of course!)

Latitude is (almost-)dead – how do I go on?

I’ve espoused the virtues of Latitude as it relates to my Home Automation obsession.  While Google’s Location service once provided a critical means to validate home/way state, it was always critical in the determination of “occupant prediction” – that is, setting up a home-automation posture in anticipation of homeward-bound residents.

It’s no news anymore that Google is shuttering Latitude on August 9th.  It’s something that I predicted on my twitter feed, and I wasn’t alone in feeling that the end was near.

Google attempted to placate the masses by adding a Location feature to Google+, but from a developer perspective it was the retirement of the Latitude API that hurt the most – never mind the giveth/taketh soreness that has come out of Google’s decision to maintain Location History but close it off to 3rd-party developers going forward.

Whatever.  That ship has sailed (or soon will).  The bigger question for me was – how the heck do I keep location-awareness as a staple in my home-automation system?

I was pretty sure that 3rd-party solutions would crop up, ala the Google Reader debacle.  But unlike RSS feeds, there’s something very personal about location data.  Obviously I was (am) placing a large amount of trust in Google to hand over my location data to them, but I was very loathe to do the same for any other entity on the face of the planet.

So I enlisted my go-to man Tasker to fill the void.

Tasker always had a close relationship with Latify on my smartphone.  Tasker would determine which of three Latify profiles were most suitable at any given time.  So it wasn’t a huge stretch to rip out Latify and have Tasker poll location itself, sending that information to my home server so it could Do Something(tm).

And in a nutshell… that’s all there is to it.  With the help of the Tasker App Factory, I’ve produced an .apk that’s been installed on the wifey’s phone and – voila – the home automation system will remain location-aware after August 9.

So that’s part one.  And a very important part it is.

Part two encompasses what to do about sharing location information with friends, whcih is what one traditionally thinks of when they think of Google Latitude.  And in all honesty, I’ve only ever really seen that as valuable in the context of family, where each member probably wants to know where the other is for safety reasons.  To that end I whipped together a page on my intranet which takes Tasker’s reported location data and puts it on a lovely map.  As with all things intranet, this page is accessible from the Internet at large – for authorized users – and works on a laptop as well as it does on a smartphone.  It uses the Google Maps API for all the map-py stuff, AJAX so that locations update dynamically, and it’s generally Very Cool(tm).

So there it is – I’m quite happy with the current solution.  So a heartfelt “Thanks!” to Google for $crewing developers the world over once again.

What have I been up to? (“Home Automation” edition)

Apologies for the dearth of updates.  The silent masses have been wailing my name incessantly as a result.  I hear you, your screams are defeaning.

(WTF?)

Things have been… different… this year.  That’s about as much as I can say at the moment.  The lack of a stable “all systems OK” comfort zone has basically meant that I’m in maintenance mode more than anything else.  Hence – little in the way of blog updates and other reckless indulgences 🙂

Anyhoo, on to the subject of this particular post.  And this will likely be quick.

You may recall that, to-date, the home automation system consists primarily of surveillance, hvac, and music.  Much hasn’t changed in that respect, but I have been able to make some changes that have increased the reliability, efficiency and usefulness of the system.

Surveillance first.  The most notable change here has been the inclusion of HTML5-compatible transcoded video.  For some time I’ve relied on Flash to allow for remote viewing of archived surveillance video – but having upgraded my phone to Jelly Bean and settled on Chrome as my browser of choice, Flash is no longer an option on that particular device.  To that end, the backend transcodes video into both Flash and x264 formats.  The format available to you is in the browser is determined automagically.

Other small changes have been the regular code cleaning that occurs when you realize that the way you did something a year ago makes absolutely no sense and – there – this makes much more sense.  For now.

The next notable change/improvement actually touches on HVAC as well, so it’s a good segue.  You may recall (but probably don’t) that the automation system is occupant-aware.  When we’re home, certain things happen – like telling the thermostat to target a comfortable temperature, or telling the surviellance system not to pepper me with event notifications.  Previously, occupant detection relied on Bluetooth and its rather short range.  And while I had dreams of hacking unsightly 2.4Ghz antennas onto cheap USB Bluetooth adapters, I woke up recently and decided to use WiFi for the same purpose – which also makes sense since our phones are connected to WiFi whenever we’re home.  Well, Shelly’s Nokia wasn’t always connected, by her loaner phone (my Desire Z) is as is my Galaxy S III.  It was just a matter of course before – no changes in usage or increased battery consumption.

This has simplified matters greatly, in addition to greatly increasing the reliability of the detection code.  The method is actually straightforward – check the wireless access point’s association table to see if particular MAC addresses are connected.  C’est tout.

Also within the spherical roundness of occupant-detection (???) is the news that the system can now get updates from the alarm system.  This is very useful, as it leads to very dependable home/away information that is actually more reliable (in some cases) than the wireless detection method.  The automation system is also configured to simulate motion/audio events on all cameras if the alarm notifies it of a perimeter breach.

Now over to HVAC.

Again – more code cleaning.  I spent a little bit of time thinking I could simplify the “Smart Logic” – the stuff that determines if the system should be off or on and what mode and when to run the fan and blah blah blah – but that turned out to be more painful than just leaving it the way it was so left it I did.  However, the system now has the ability to pre-condition the house if the next program calls for it.  This is one end of a multi-month effort that involved the automated collection of efficiency information.  The system keeps track of how long it takes to heat/cool the house – and currently maintains these statistics seperately for various absolute inside temperatures as well as inside/outside temperature differences – and if the next program calls for more heating or cooling, the system will start doing just that so that we hit the desired temperature just as the next program becomes active.

Admittedly this is not a novel concept.  Some thermostats have been doing this for years.  Something they can’t do is take the efficiency data and determine when to start pre-conditioning the house once it has been determined that occupants are on the way home.  And in the name of openness – my system can’t do this either.  But presently that has more to do with niggling concerns rather than a dearth of information or ability.  Any claims to the contrary would be blasphemy – you’ve been warned.

???

Anyhoo, the reality is that the current pre-conditioning only happens once a day – and perhaps twice a day in the cooling season.  Mostly this is due do the fact that I’ve “flattened” my thermostat’s programs, so that we basically have an overnight setpoint and a not-overnight setpoint (like I talked about here).  I’ve been able to do this because:

  1. the HVAC is much more efficient now than it was before (since we’ve moved)
  2. occupant detection can lower/raise the setpoint appropriately
  3. occupant prediction can target the “home” setpoint before we get home

We tend to keep a “cool” house when we’re asleep, but it absolutely sucks to wake up in the morning to cold floors and cold everything-else-too.  Otherwise, there’s really no need to program the thermostat when the pieces are in place to make more effective decisions automatically.

So ya, that’s HVAC.  Last (and perhaps least?), Music.

Admittedly there hasn’t been much development there.  Not to say that I/we don’t use the system – in fact I used it this past Thanksgiving when we entertained family.  I just haven’t had occassion to spend oodles of time on it.  As it is now, it Just Works(tm).

What I have done, though, is to bring some HTML5 usefulness to the streaming aspect of the system.  As with video in the surviellance system, there has been a browser-embedded solution for some time to stream music via a Flash player.  Got the job done, but again – Flash’s days seem numbered and are basically done and done in the mobile world.

To that end I added HTML5 Audio, and it gets regular use when I’m at work.  Not so much in the car (also known as “not at all in the car”) but that’s because Chrome (and perhaps others) will not allow for background HTML5 audio.  If the screen turns off or the browser is pushed to the background: sayonara streaming audio.  So I still rely on a bonafied SHOUTcast client for streaming in the car, and truthfully I’d love to be able to run the browser-only solution as it requires much less in the way of security concessions.

Aaaaaaand….

….that’s it!