Adventures with Nest


I recently purchased a pair of Nest Learning Thermostats for my new home. Compared to the white brick style Honeywell thermostats that came with the place, the Nest is so much more advanced. It does temperature learning, auto-away, and remote control over Wi-Fi from the web and iOS devices. It also has a color LCD and just generally looks beautiful on the wall in its brushed stainless steel housing.

Installing the Nest is pretty straightforward with a modern forced air heating and cooling system:

  • Remove the old thermostat and mounting plate from the wall
  • Disconnect the wires
  • Patch and paint any holes
  • Install the Nest mounting base and connect the wires
  • Pop the Nest onto the base and configure the software

My initial install went well physically, but not long after, I discovered that the Nest would regularly run out of battery power. I quickly learned that due to how the HVAC circuits are arranged, the Nest can only draw power while the system is running. When the system is not busy heating, cooling, or running the fan, the Nest is left to run under its own battery power. And in sunny California during the springtime, the system doesn’t run often enough to let the Nest keep a charge. Several times per day, I would have to unplug the Nest from its base and charge it over micro USB. Not a great solution.

Reading more about the Nest and HVAC circuitry, I found that there is a solution for situations like this. A “common wire” that provides a path back to the HVAC controller would allow the Nest to draw the power it needs while not running any systems. As luck would have it, my system provided this common wire, but connecting it to the Nest had no effect on the battery. More telling was the fact that the Nest did not detect that the wire was connected.

So, I decided to find out what was at the other end of that common wire. I put up a ladder and ventured into the attic of my home and scouted around the furnace. On top of it, inside an easily-opened steel enclosure, was the thermostat controller, a ZTech ZTE2S. Double checking the wiring diagram and comparing it with the wires on the left (coming from the Nests), it’s clear that the blue common wire is simply not connected to the controller. In the photo below, you can see that it’s clipped short, close to the brown jacket covering the bundle of five wires.


Reconnecting the wire was a matter of disconnecting the wires that were already connected, snipping them all to the same length, and stripping a little plastic off the end so that all five can be connected to the HVAC controller.


A few hours after leaving the Nest installed with the common wire attached and the HVAC controller all closed up, its battery has fully charged and the features work great.

Adventures with Nest

Widerbug No Longer Needed


Good news Widerbug users!

The dedicated Firebug team has just added the widescreen option that Widerbug enables into the core of Firebug 1.9.0, making Widerbug obsolete. You may uninstall Widerbug and go back to using regular Firebug and be able to change the layout using the option seen below.

Firebug widescreen support

This is welcome news to all Widerbug users, I imagine. It’s been difficult to keep up with Firefox’s new fast-track release schedule, as well as continually adapting to the Firebug internal changes. Now you can enjoy widescreen support, with Firebug in one of several locations, without sacrificing new critical updates and feature improvements.

Widerbug No Longer Needed

Apple ID Email Verification Woes

As a longtime Mac user, I’ve had an account on file with Apple dating back to when iTools was available. Only recently has the Apple ID become much more important as a personal identifier. Back then, Apple IDs were mostly a means for me to identify myself to Apple. Now, people find me using my Apple ID for FaceTime, iMessage, Game Center, and more.

Not so long ago, I decided that I wasn’t happy with this Apple ID and created a new one to do everything with. It was, however, long enough ago that Apple IDs weren’t yet required to be in the form of an email address. So, this new one was just a new name.

More recently, I decided that I should switch my new Apple ID to be in the form of an email address like they now encourage, and verify the matching email address with it. Only, the Apple ID management system would not let me do this, reporting that:

Email address is already verified for another Apple ID

I didn’t recall verifying this email address with any other Apple ID. Even using the “Forgot my Apple ID” tool, which searches for Apple IDs given an email address, produced no Apple IDs that had a record of that email address. Even my old Apple ID didn’t list this email address as one of its verified emails.

As it turns out — and this is after trying many different things including contacting Apple ID Support — MobileMe requires a backup email address in the event you forget your MobileMe password. The email address I wanted to verify with my new Apple ID was set as my MobileMe backup email address for my old Apple ID. This counts as a verify, even though it’s not listed as a verified email address on the Apple ID site for my MobileMe account.

Simply setting up a new email account with my provider dedicated to MobileMe — one I’ll probably never check unless I need to — and using that as my MobileMe backup email address freed up the desired email address I wanted to associate with my new Apple ID.

Hopefully this will help someone who may be running into the same issue. Figuring all this out was wildly confusing at times, and even more difficult to explain to Apple ID Support, which is probably why we never got the issue resolved until now!

Apple ID Email Verification Woes

Simulating Slow Internet for iOS Testing

Apple’s iOS Simulator is an acceptable environment for testing development code, but when users purchase your finished app from the App Store, they’ll be running it on real hardware, particularly on networks that are likely much less reliable than your home or office internet.

To ensure your app performs well under real-world conditions, you can load up the code on a device and go outside, but then you can’t debug as easily. And even if you bring your MacBook Air with you, what if your Verizon iPhone is everything you hoped, and it performs admirably on the worst of days? To get around all of this, you can approximate an unreliable network with SpeedLimit. SpeedLimit is a System Preferences pane for intentionally and selectively slowing down specific ports and domains.


Download and install SpeedLimit, add one or more hosts (separated by commas, as seen above), select a target speed, and click Slow Down. Subsequent network requests matching the criteria you set will be throttled, giving you time to go all out testing your app’s performance and error handling. Does it crash when users hit the Back button while a UITableView is loading? Does it lock the UI while downloading avatars or thumbnails? SpeedLimit lets you find out, and be confident in your networking code.

Simulating Slow Internet for iOS Testing

fmTuner 1.1

My WordPress plugin for displaying music, fmTuner, has been updated to 1.1, adding a much-requested album artwork placeholder field, and testing for the latest and greatest version of WordPress.

The upgrade will work seamlessly with your current fmTuner design, but if you visit the fmTuner Settings page, you’ll see that you can now specify a link to a placeholder image, which will be used if comes up short on album art. Leaving this field blank (the default) will simply skip tracks without artwork. If you want to get really fancy, there’s even a fmTuner tag that will print out the path to your current WordPress theme, if you’d like different album art placeholders for different themes.

Download fmTuner from for the latest version!

fmTuner 1.1

Widerbug for Firefox 3.6+

I’ve just updated Widerbug to 1.5.0, once again up to date with the enhancements from Firebug 1.5.0. If you’re running Widerbug 1.3.3 or later, you should receive 1.5.0 via an automatic update. Or, head over to the Widerbug download page to install it.

I know at some point I should attempt to merge my changes into the Firebug codebase and submit a patch (and stop this Firebug cat-and-mouse game), but my XUL knowledge is still fairly limited. If anyone would like to take on the challenge, though, I imagine your patch would be a welcome addition to Firebug’s core!

Widerbug for Firefox 3.6+

How to Find the Right Windows Driver

When setting up a new Windows machine, whether it’s Windows 2000 all the way up through Windows 7, you’ll occasionally run into an issue where you need drivers for a system or PCI device that you just can’t seem to find. To make matters worse, you don’t know which company made the device, so you don’t even know where to start looking for drivers. Should you go to Dell’s site? The motherboard manufacturer? Persistent “Unknown device” entries in the Windows Device Manager are a plague upon even the most seasoned techs. Here’s a tip to get your driver hunt moving in the right direction.

Find Out Who Made the Device

Figuring out which company made the device(s) in question is the first step towards getting it working. Start by opening the Windows Device Manager. My preferred quick way of doing this is clicking Start -> Run -> type “devmgmt.msc” -> press Enter. Once there, choose the device in question and right click it, and select Properties. Select the Details tab to see something like the view below:


Note the PCI “VEN” and “DEV” 4-character identifiers. PCI, USB, and many other system devices have Vendor and Device IDs. The Vendor ID is specific to the manufacturer, like Broadcom or nVIDIA. The Device ID is specific to the particular make or model of device you have. These are expressed in hexadecimal (0 through 9 plus A through F), so don’t be surprised to see letters there, as well. Some common Vendor IDs are 8080 and 8086 for Intel, 0A5C for Broadcom, 10DE for nVIDIA, 1002 for ATI, and many more.

Look Up Vendor and Device IDs

A common way to express both the Vendor and Device IDs in a single string is 1022:2000, Vendor ID first. Combine your Vendor and Device IDs in this manner, and wrap it with quotes: “1022:2000”. Google that, and you should quickly figure out who made your “Unknown device” and what model it is. With this knowledge, you can either find the appropriate driver on your computer manufacturer’s website (Dell makes a good note of which manufacturer’s devices they use for a particular system), or you can visit the device manufacturer’s website directly.

I hope this information can help those looking to simply get their hardware working under Windows, whether it’s running on a Mac or PC.

How to Find the Right Windows Driver

Dig into iPhone Apps

So you’re curious about the contents of iPhone and iPod Touch apps, including artwork, sounds, and more? Here’s how to dig into an application and see what goodies are hidden inside. Standard copyrights still apply.

Sync Your Apps with iTunes

Assuming you already have the target application on your iPhone or iPod Touch (just “iPhone” from this point forward for brevity’s sake), simply sync your iPhone with your Mac or PC. Doing so will backup your device and transfer any purchased applications in both directions. With the target application now on your computer, navigate to your iTunes “Mobile Applications” folder, where iTunes typically does its own file housekeeping. Under Mac OS X, the default location is /Users/yourname/Music/iTunes/Mobile Applications/.

Unzip an App

Copy your target .ipa-suffixed application to a different location, ensuring that the original stays in the Mobile Applications folder to keep iTunes happy. To get inside the application, rename its extension to .zip. Open the zip file, and you will have access to the guts of the app (except the source code, of course).

High-res App Artwork

Directly inside the unzipped application folder, you’ll find a file named “iTunesArtwork”, with no extension. A hex editor revealed that the file is typically a jpeg image, so rename it to include .jpg at the end, and you’ll end up with the same 512×512 pixel artwork displayed by iTunes when browsing downloaded Applications.

To get at other resources, open up the adjacent “Payload” folder, and you’ll find a .app file — the application bundle that runs on the iPhone. Right- or Control-click on the .app, and choose “Show Package Contents” to open up the bundle.


Sounds are typically found among the many resources directly inside the application as files with extensions like .caf, .mp3, .aif, and .m4a. At this point, the organizational structure is up to the application’s developer, so you may need to look around a little. Leopard’s QuickLook feature is a boon in times like this, helping assess a file’s purpose without opening half a dozen applications.

Other Graphics

Also nestled inside iPhone applications are many of the graphics used throughout the app. It’s possible that some may be drawn by code, but complex graphics are generally stored as images. However, viewing the images isn’t as easy as renaming the files as before. This will be a bit trickier, as the iPhone works some magic on the images before finishing the app build process, leaving images in an iPhone-optimized state. Fortunately, the process can be reversed with a little bit of Terminal trickery:

  1. Copy all .png images to a new folder elsewhere. Images of other formats (.jpg, .gif, etc.) should be readily viewable.
  2. Download David Watanabe’s modified iPhonePNG command-line application, unzip the archive, and open up Terminal from your /Applications/Utilities folder.
  3. Type cd , then drop the iPhonePNG folder into the Terminal, and tap Return to switch to that folder.
  4. Type ./iPhonePNG , drop the folder of encoded images into the Terminal, and tap Return to decode the whole folder full of images.
  5. The output folder sites beside iPhonePNG, so type open . and tap Return (open space dot) to open the current folder (a dot, in Unix terms) in the Finder. Open the decoded images folder and have a look around!
Dig into iPhone Apps

MacBook Pro Insomnia

For the past several weeks, my MacBook Pro had been occasionally waking up during periods where it was expected to be in sleep mode. Even with the lid closed, it would briefly wake up, illuminate the screen and Apple logo, then fall back asleep moments later. Seemingly random, it would sometimes happen only once every other day, and other times it would happen sequentially with only seconds in between cycles. I had no idea if the issue was hardware or software, but it didn’t seem major enough to warrant an AppleCare call.

A quick trip to the Console application in the Applications > Utilities folder reported dozens of instances of “USB caused wake event (EHCI)”, which gave me some initial Google hits. The obvious answer is that a USB device was waking up the computer, however I rarely had USB hardware plugged in when the random awakenings were occurring.

As it turns out, others have had this problem before. As indicated in the previous links, Mac OS X keeps its power schedule inside /Library/Preferences/SystemConfiguration/, but this file didn’t exist for me, apparently “confusing” Mac OS X. Without it, it would exhibit the symptoms I was encountering.

Following suggestions, I opened System Preferences > Energy Saver > Schedule, where you can schedule system sleeps and wakes. By toggling on a scheduled wake, clicking OK, then disabling it, the was re-created, and left with no scheduled sleeps or wakes. So far, this has cured my MacBook Pro’s insomnia!

MacBook Pro Insomnia

How to Combine ICO Files into a Windows EXE

Lately I’ve been working with Mozilla’s XUL platform under xulrunner, and found that I needed to make a properly branded Windows application, but had no tools or knowledge on how to “glue” standard .ico icon files together, or insert them into an already-compiled .exe file. After some research and a little trial and error, I found a method that works. Assuming you have some prepared 16, 24, 32, and 48 pixel images suitable for an icon set, here’s how to go about getting them from Photoshop into a Windows application, using only free software.

Photoshop to Multiple .ico Files

The first step to branding a generic executable with your own icons is to get them out of the graphics program and into .ico format, which is the standard for Windows software icons and cursors. IcoFormat, a free Photoshop import/export plugin for handling .ico files, will easily handle the task. Once installed to your Photoshop plugins folder (and Photoshop subsequently restarted), you can save each of your icons as a .ico file using “Save As…”, and choosing ICO from the Format menu in the resulting dialog. Repeat for each icon size you wish to embed (or, if you’re ambitious, try recording a Photoshop action to automate the process).

Multiple .ico Files to One .ico File

To allow Windows to display the best size icon for the current folder view, it’s best to combine the desired .ico files into a single file. The free Icollator program will take in multiple icons and produce a single .ico file ready for embedding. You may need the Java Runtime Environment to run Icollator, if you don’t already have it. Like Icollator, JRE is also free download.

Embed the .ico File

The last step is to embed the single .ico file (containing two or more icons) into the .exe. Launch the freeware Resource Hacker utility, and Open the target .exe. Then select Action -> “Add a new Resource…”, and pick the combined .ico file you made in the previous step. Give the resource a simple name like “ICONS”, and click Add Resource. Save the changes to the .exe, and switch to Windows Explorer. You’ll notice that the .exe now has the embedded icon set, and Windows will show the correct size icon for the current view mode. Also, you’ll notice that Resource Hacker made a backup of the .exe before embedding, just for safe keeping.

Also potentially of interest: Getting application name and icon right with XULRunner from the AdBlock Plus blog

How to Combine ICO Files into a Windows EXE