With all the backyard startups in Palo Alto, Calif., a good garage can be hard to find. But behind an uninspired, blue Craftsman-style home long since converted into offices, Nest Labs founders Tony Fadell and Matt Rogers came across something even better: a bad one. "It was a pull-up garage door, not the best design," says Rogers, the company's 31-year-old vice president of engineering. "But the charm was that this was a really scrappy, early company, and this was a good place to start it."

During Nest's first summer in 2010, the small, stealth team frequently worked with the door open; birds and squirrels often invaded the space. Their then-secret product, the Nest Learning Thermostat, with its brushed-metal casing and LCD display, was still far from the slick device the world knows today. Instead, the gadget was a giant green printed circuit board mounted to the wall. A victim of the garage's draftiness, "it would run super hot, then super cold," Rogers says. "Good times."

Four years later, good times have never been better for Nest. With just two products, the Nest Learning Thermostat and the Nest Protect smoke and carbon monoxide alarm, the company has quickly emerged as a leader in the connected-home space, and in January the startup was bought by Google for the staggering sum of $3.2 billion.

"While we were in the garage that summer, there was an article on Gizmodo about how the days of the hardware startup in garages in Palo Alto were dead," Rogers says. "We were laughing about this because, obviously, they had no idea we were coming."

Nest Learning Thermostat

Product photos courtesy of Nest

The Apple effect

Of course, Nest wasn't Palo Alto's first multibillion-dollar company to launch in a garage, though it might be the most appropriate one. Nest's founders got their start at Apple, perhaps the most famous company to ever occupy a carport. Fadell, the former head of Apple's music-player development team, is widely known as the father of the iPod. Rogers, meanwhile, began his career in 2004 as an Apple engineering intern, perched by the printer outside Fadell's door. (Fadell, working on his next big thing, was on paternity leave and unavailable for comment on this story.)

As the popular version of Nest's origin story would have it, Fadell left Apple, decided to build a smart thermostat and roped in Rogers to help. But the real tale isn't so straightforward. For years the pair had worked together closely, and one day, after Fadell had been traveling, they met for lunch.

"I mentioned that I was thinking about leaving and doing something in home automation," Rogers says. "He basically said that no one wants to buy home automation. It's a dumb idea. It's not a product." The dismissal smacked of Jobs-ian rhetoric and misdirection. But then Fadell revealed he had been building a home in Lake Tahoe, Calif., packed with gadgets and technology. And before long, that friendly check-in turned into a spitballing session, and the idea to build Nest was born.

Apple gave Nest a playbook for disruptive innovation. Just like Apple didn't make the first MP3 player, Nest's founders wouldn't pioneer the thermostat--they'd reinvent it. Each year, Rogers says, some 10 million thermostats are sold in the U.S. According to 2012 U.S. Census data, there are more than 130 million homes, nearly all with heating regulators. That market size alone was enough to give Nest space to innovate.

But aside from heating, as a Trojan horse into the connected home the Learning Thermostat has the potential to be a game-changer on par with iTunes. With this Wi-Fi-connected device serving as a brain for the smart house--and saving energy--Nest can reach far beyond climate control. And just as Fadell turned MP3 players into industry-upending music stores by putting iPods in pockets worldwide, he might be able to turn a planet of dumb houses into smart ones, one thermostat at a time.

First, though, the device had to be built. "The first thing we asked was, ignoring every product ever shipped in this industry before, how would we do it?" Rogers says. Before mentioning the idea to anyone, he and Fadell spent six months researching the answer to that question. They bought and installed competing products. They explored alternate sales channels and business models. They considered how their experience in building 18 generations of iPods, five iterations of iPhones and the original iPad could give them a leg up.

That's when the idea of a "learning" thermostat became obvious. "Why should a user have to go and program a thermostat?" Rogers asks. "It doesn't make any sense."

A plan emerged. With their intimate knowledge of iPhone innards, the pair could cobble together innovative products from commodified cell-phone parts, open-source software and other technologies. In fact, yesterday's iPhones had everything they needed to create the home of the future. "I use the biking analogy," Rogers says. "We are drafting behind the cell-phone industry."

Heating up

As fast as Rogers thinks and talks, it's hard to imagine him drafting behind anything. "When he gets excited about something, his speech accelerates to two times his normal speed, which is already kind of fast," says Boris Sofman, co-founder of Anki, a San Francisco-based artificial intelligence and robotics company. Sofman has known Rogers since 2001, when the two were undergraduates in Carnegie Mellon's electrical and computer engineering program.

"Why should a user have to go and program a thermostat? it doesn't make any sense."

--Matt Rogers

Back then, Sofman says, they would tease Rogers for being "the ultimate Apple fanboy," at a point when that wasn't the popular thing to do--yet. But this proved to be the first of many times Rogers was steps ahead of his peers.

"Clearly, his intelligence is off the charts," says Randy Komisar, a partner with venture capital firm and Nest investor Kleiner Perkins Caufield & Byers, who came to an early company meeting in the garage. Leading a team of seasoned engineers who were twice his age, Rogers astounded Komisar, a longtime Silicon Valley insider. "His ability to work the team toward solutions, to highlight and calmly resolve issues, to include people in the room, to defer to the experience that was there--while at the same time driving the decision and clearly being in charge as the leader--it was just eye-opening to me," he says. "After that meeting, it was quite clear to me that Matt was a very, very important co-founder."

Nest Protect smoke and carbon monoxide alarm

Photo courtesy of Nest

Equally important, Rogers' focus and energy has propelled Nest to move quickly, before the connected-home market could take shape. "He's literally the kind of guy who will just sit in the lab and pound out 16 hours straight and not even realize that time went by," Sofman says.

As a result, Nest's thermostat sales took off like a shot. Rogers says the initial goal was to capture 1 percent of the market--and they blew that away. "We had basically sold out all of our inventory buys in three days," he says. "We ended up being a top-selling thermostat in every store and online retailer that we entered."

In January multiple news outlets reported that Nest was selling 40,000 to 50,000 thermostats per month. And as of this writing, the Learning Thermostat is the best-selling product in the Heating and Cooling subcategory and the overarching Building Supplies directory on Amazon.com, outpacing less expensive products like garage-door remotes, and far outselling competing thermostats.

Rogers pushes the team to continually roll out new features. Since it began shipping in November 2011, the Learning Thermostat has received more than 20 software or hardware updates, adding capabilities like airwave scheduling, use as a dehumidifier and automatically adapting to direct sunlight. Recently, when lab tests showed that the Nest Wave feature of the smoke detector could be unintentionally activated, the company quickly pushed a software update to devices already in homes, disabling the function until it could be improved.

All updates are free, a far cry from the paid app model championed by Apple's handheld devices, but Nest is also working with third-party developers to add product integrations. In addition, Rogers and Fadell have devised another revenue stream wherein Nest partners with utility companies to manage peak-time energy usage.

Investors, meanwhile, gobbled up Nest's potential. Through three rounds of funding, the startup attracted at least $80 million; the company was in the process of raising an additional $150 million when Google swept in with that $3.2 billion bid. It was impossible to refuse. But the windfall didn't become the founders' exit; rather, it was an accelerant.

"We have so much work to do and so much more to scale, so many more countries to enter in, so many more products to do," Rogers says. "We don't want to wait 10 years--we'd rather do it in two or three." In the acquisition announcement, Fadell said: "We've had great momentum, but this is a rocket ship."

Like Google's other moon shots--Google Glass and driverless cars--Nest will steer the world toward the house of the future. Only faster.