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!

Server upgrade? [update: 2012-02-17]

Ah, the life of a consummate hardware tinkerer.

Blog devotees will know that my “Home” server is the guy whose job is to run the house – in-so-much as the house can be run by a computer, that is.  More commonly noted in these journals as “Home Automation”, the Home server is primarily responsible for surveillance, HVAC, Whole Home Audio, TV show transcoding, and a host of other support services.

Said server has had a long history of service, although the only original parts are probably the case, power supply, and some hard drives(!).  And after just over 3 years with its current hardware configuration, it would seem that a significant shift is about to occur.

So significant, in fact, that I’ve had to come up with a new “P”-prefixed name for said server.  Yes, *all* of my computers are named with a “P” as the first character…

Anyhoo, this started about a week ago when I noticed some “previous system shutdown was unexpected” messages in the event log.  And some quick investigating led me to conclude that hardware was – again – the cause of the problem.

I was left with three choices:

  1. Retire the Home server and move all functionality to the remaining (“Internet”) server.
  2. Troubleshoot the problem and replace the failing component.
  3. Start from scratch with a new server

My “best practices” principles ruled out option #1.  And with time at a premium these days – and given that the Home server is based on technology that’s over a decade old – I decided to take the $$$ plunge and build a new system utilizing modern(ish) technologies.  Some things I’ve wanted for some time – like RAID1 drive redundancy – and other things I’ve had no experience with and wanted to have at least some passing familiarity (like SATA… yes, *all* of my drives are PATA!!!)

I also decided that I wanted to go with an Intel motherboard and processor solution.  In all of my professional and personal years dealing with computer hardware, I can’t recall one time that an Intel product has failed (especially motherboards).  I may be unique in this experience, but I decided to pay the extra money and go Genuine Intel.

Unfortunately I may have been too presumptuous during my decision-making process, as I opted for any old Intel board that had the hardware features I wanted (among them, 3 PCI slots) and didn’t spend too much time worrying about the “***DESKTOP***” branding that graced the packaging and product designation.  So it was that I came home, spent an untold amount of time putting the hardware together, and found myself unable to install my server software due to driver issues – all of which were arbitrary on Intel’s part, wanting their DESKTOP boards to have no business running SERVER software.

So it took a few nights and early mornings to finally get Windows Server 2003 installed and recognizing the DZ68DB board’s many features.  Thanks to Google and these pages for the invaluable assistance.

That was the first hurdle, and I knew that the software setup would be a multi-day affair.  Unfortunately I’ve run into another (temporary) roadblock, which is that the act of promoting this Windows 2003 Server to a Domain Controller has been foiled by Exchange 2000-related issues in my Windows 2000 AD schema.  Argh.  And while I value the learning experience, at this point I just want to get to the point where I can start moving services to this new “Home” server from the old “Home” server.  I’m really looking forward to the significant increase in speed that this server should bring, particularly with respect to show transcoding and database operations.

So I’ll update this post when I have more to report.

[update 2012-02-17]

So I’ve surmounted most (all?) of my AD-related issues, and the server is chugging along quite happily.  Girder gave me some issues – particularly in the area of launching processes – but this was resolved by changing the window parameter from “hide” to “show”.  Had to do it for both the open process and kill process (this is more a note to myself for future reference…)  I was also pulling my hair out over mixer issues until it dawned on me that the references to the hardware on the old server were probably causing Girder to get mired in some thick mud.

Anyhow I can say that services are smoking fast; DivX transcoding is limited by the speed of the network transfer from the PVR machine (which is currently the Internet server but will soon become the Home server).  The responsiveness of the whole-home audio interface is likewise much improved, as is the whole set of intranet pages (particularly noticeable when looking at archived HVAC and surveillance data).

I’m still in the process of moving my network-stored movie images from a local disk on the old Home server to a local disk on the new server.  This task’s painfulness is exacerbated by the insistence of the old server to spontaneously reboot whenever I try to initiate such a file transfer over the network – which certainly would seem to mimic the original problem which started this whole process in the first place.  The question still remains as to why this causes a server reboot.

Anyhow, I’m using the external 1TB drive (thanks Mark!) to sneaker-net the files from the old server.  However, we’re talking about something like 40GB of data (or is it 80GB?), which is very slow to transfer using the old server’s USB 1.1 ports…

Other than that, I’ve finally got full data redundancy thanks to Second Copy (thanks Daniel!) and that very same 1TB drive.  NTBackup is backing up the system and data drives on both servers, saving said backups to the external drive; and Second Copy is doing one-way replication to the external drive of all media on a nightly basis.  To Centered Systems – the cheque will soon be in the mail 🙂