“You’re going to build a what?”

That’s what Tony Fadell’s wife, Dani, said to him in 2009 when he told her his idea for a new company. Fadell is one of the most sought-after talents in the world of gadgetry—he designed the hardware for the iPod, and headed Apple’s iPod and iPhone division before leaving his VP post to spend time with his wife and two young children, living an idyllic year in Paris.

But even before he moved back to the U.S. he was mulling over his next step. Many assumed that the 42-year old technologist would continue his brilliant career in consumer electronics. He might even become a contender to run an existing multi-billion dollar business—in electronics, in mobile, maybe even Apple.

Instead, he told Dani, he was going to build a thermostat.

A what?

Fadell explained his concept: Untold tons of carbon were being pumped into the air, with people losing billions of dollars in energy costs, all because there was no easy, automatic way to control the temperature. But what if you could apply all the skills and brilliance of Silicon Valley to produce a thermostat that was smart, thrifty and so delightful that saving energy was as much fun as shuffling an iTunes playlist?

You could revolutionize an important but neglected tech backwater—and significantly improve the environment. Within 15 minutes, Dani got it. As did the others Fadell would talk to over the next few months. These included a dream team of Silicon Valley engineers, designers, and computer scientists who became the first employees of Nest Labs, the company Fadell founded.

Investors were equally enthusiastic, and though Nest won’t disclose the size of the total stake, it is reasonable to assume that upwards of $50 million has come from a consortium that includes Kleiner Perkins, Google Ventures, Lightspeed Ventures, Shasta Ventures, Intertrust, and Generation Investment Management (backed by Al Gore, who was enchanted with a demo that Fadell gave him at TED in 2011.)

“In other green startups, ideas are incremental—we haven’t found breakthrough ideas,” says Kleiner Perkins partner Randy Komisar. “But this breaks the mold.”

Today comes the payoff, when Tony Fadell’s company introduces the Nest Learning Thermostat. It is available for preorder at Best Buy and Nest.com, and will ship in November. Units are already streaming from assembly lines in the Chinese factories that churn out advanced digital gadgets.

The Nest is the iPod of thermostats. A simple loop of brushed stainless steel encases a chassis of reflective polymer, which encircles a crisp color digital display. Artificial intelligence figures out when to turn down the heat and when to jack up the air conditioning, so that you don’t waste money and perturb the ozone when no one is home, or when you’re asleep upstairs. You can communicate with the Nest from your smartphone, tablet or web browser.

Fadell promises the Nest will pay for itself within a year or two of use, and ultimately save you up to 30 percent of your utility bill. And its presence on your wall will be less an artifact of the industrial age than a piece of high-tech art.

Can the unloved thermostat become an object of techo-lust? Will the Nest really save its users an aggregate billions of dollars? Can it spare our beloved pale blue dot endless tons of unwanted carbon?

Tony Fadell is about to find out.

Fadell got the idea for Nest Labs when he was building a green home in Tahoe. A long-time aficionado of architecture, he threw himself into the details of house design. His domicile would be as gorgeous as the products he worked on at Apple, endowed with the same love of detail. When it came to HVAC – the industry acronym for heating, ventilation, and air conditioning – he worked with architects to drill sophisticated geothermal wells to regulate temperature. Everything was looking great. And then the architects presented him with the options for the thermostats that would adorn the walls of his perfect home.

They sucked.

“What was wrong with them?” he now says. “They were ugly. They were confusing. They were incredibly expensive. They didn’t have half the features you would expect for a modern thing. None of them were connected, so they didn’t talk to each other. I wasn’t able to remotely control them. In Tahoe, you want to be able check on the temperature of the house or turn it on before you get there. Because it’s really cold in the winter. I couldn’t do any of that, and I was like, Why is this?”

So Fadell started researching.

Thermostats, he found, had not changed much in decades. The most popular model is known as the Honeywell Round, a white sphere circle with tiny meters indicating actual and desired room temperatures. When legendary designer Henry Dreyfus designed it, it was an instant hit – but that was 1953!

More recent, upscale programmable thermostats were not only hideous – displays were straight out the DOS era – but programming them was reminiscent of getting a 1970s VCR to tape a football game. In 2008, after a study that concluded that homes with programmable thermostats used more energy that similar ones without them, the Energy Star label was stripped from the entire category. A recent Lawrence Berkeley National Laboratory study found that “as many as 50 percent of residential programmable thermostats are in permanent ‘hold’ status.”

According to Alan Meier, the scientist who performed the study, “A large fraction of people didn’t know how to use them and didn’t have patience the learn.” The government estimates that the average home has a $2,200 energy bill, half of which is under the control of the thermostat. That means every household was losing hundreds of dollars because of that oblique gizmo on the wall.

It was an industry ripe for disruption. “Thermostats are made by very large companies with no incentive to innovate,” Fadell says. “Their customers are contractors or HVAC wholesalers, not consumers. So why spend to make them better? It’s a good business.”

How good was that business? Fadell ran some numbers. On the back of an envelope, he figured there might be 100 million homes in the U.S. Each one had between one and two thermostats – that’s 150 million. In light commercial spaces – small offices, restaurants, retail – there’s another 100 million, or so. Add 10 million more in hotel rooms. That’s a quarter billion thermostats already, and that doesn’t account for those in bigger commercial spaces! He looked deeper. Every year, 10 million thermostats are sold in the residential space alone. “That’s more than refrigerators, dishwashers, dryers; almost as much as bicycles are sold,” says Fadell. “It may not be the iPhone, but it’s bigger than most other businesses.”

On a trip back from Paris, Fadell shared his idea with former colleague Matt Rogers, who started at the company as Fadell’s intern and rose to manage teams on the iPod and iPhone. Rogers was enthusiastic, and the pair began due diligence to discover whether anyone else was working along the same lines.

“We assumed there might be someone, even some small company or startup, innovating along these lines,” says Rogers. “There was nobody.” And so, Nest Labs was born. The duo rented a garage in Palo Alto, on Alma Street near downtown, and began recruiting.

One of the first people they approached was a cell phone engineer named Shige Honjo, who was then the program manager for the iPhone. It was a dream job; Honjo worked with great people to make a hugely popular product and was making bundles of money. But when Matt Rogers invited him to the garage on Alma Street, Honjo was startled to find his old boss Tony Fadell there. That was a Friday. On Saturday Honjo told his wife that they had a decision to make: Should they follow through on the big beach house they were about to buy, or he should join a startup and save the world?

On Monday Honjo quit Apple. “The choice was to save the world,” he says.

Another early employee, David Sloo – who had worked with Fadell almost two decades ago in the legendary startup General Magic – was similarly inspired. “Tony comes along and says here’s a problem that affects pretty much every household. Think of all the air conditioning that runs in empty houses – it wastes hundreds of millions of dollars a year, and that’s Alabama alone!” Sloo pauses, as if realizing that his voice is getting too loud and his words too fast. “The scale of home energy waste is orders of magnitude beyond anything people here have worked on. But I don’t want to sound hubristic. We’re just making a thermostat.”

On a table in Nest Lab’s new headquarters in Palo Alto – a corporate park with neighbors like Mercedes Benz and Frog Design – is an array of conventional thermostats, a reminder of the industry that Nest hopes to heat up. In making Silicon Valley’s version of the thermostat, Nest’s idea was to modernize every aspect of the device, making all those units on the table as antique as eight-track tape machines in the age of iPod. “We have innovated literally everywhere,” says Rogers. “To the outside world, none of it needs to be apparent. It just needs to be a beautiful device that’s easy to control.”

The Nest team realized the first key element in their success would be its hardware’s good looks. “If you don’t make it look beautiful, people don’t cherish it,” says Fadell. “I want it to be a jewel on the wall so that it’s a conversation piece. People come over and they go, ‘What’s that on your wall?’ and you go, ‘Oh, you’ve got to check this out.’ If it can invite conversation, we think we’re going to be able to drive awareness. We’re going to drive more interest, and people will actually save energy.”

“We had to figure out whether this was a consumer electronics gadget or an architectural piece,” says industrial designer Fred Bould. “It took us a while to figure out it was both. The biggest challenge was the integration of all this technology into a small, intuitive package. There’s a lot of sensors and moving parts.”

In the same way that Apple squeezes elements into increasingly compact iPhones, the Nest team compressed previously unwieldy parts into its sleek device. One particular challenge was integrating the motion detectors that sense whether people are in a room. The ones you see on a typical security system have unwieldy lenses that would look out of place in the elegant Nest design. But Shige Honjo found versions with much smaller lenses, and hid them behind an almost imperceptible grill.

It’s also a friendly little thing, lighting up when you approach and yielding its secret in ways familiar to Apple’s intuitive ways of interaction. You push down on the display to show the menu. And when you turn the ring to set temperature, it tells you how long it will take to achieve that temp. When it heats, the display turns red; when it cools, the color is blue.

A different technical problem emerged in keeping the Nest fully charged so it could be ready to not only control temperature and run calculations to predict when people would be out of the house, but also to connect to Wi-Fi, so people could set temperature via iPhone and also to report data to a website that helps people keep track of energy consumption.

The problem was that the thermostat would draw power only from the tiny trickle of electricity from its wires. “We spent cumulatively more than 10 man-years working on the technology to enable remote control over the Internet while the device is on the wall, asleep, without using external power,” says Matt Rogers. “It basically took all our years at Apple to do that. What makes an iPod play music for 24 hours is what enabled us to do this for the product.”

The Nest Thermostat also aces a task that traditional thermostats surprisingly don’t do very well at: measuring the temperature. At one time, thermostats routinely used mercury, but then the element was banned. The default measurement is now a system that takes note of the electrical resistance in a metal wire. And it isn’t all that accurate: Many current thermostats can be routinely off by four or five degrees.

Because only a single degree has significant financial effects, the Nest was designed to be dead-on. Each thermostat has multiple sensors exploiting cutting-edge MEMS technology to measure temperature both inside and outside the device; sophisticated algorithms account for the slight heat generated by the thermostat itself and figure out an accurate reading for the room. (This works on the same principle as the noise-canceling microphone in the iPhone.)

But probably the most sophisticated feature of the Nest is the artificial intelligence that helps it regulate the temperature to your liking — without your having to engage in complicated setup tasks.

Included among Nest’s advisors is Stanford AI head and Google researcher Sebastian Thrun, who told Fadell and Rogers that the best person in the world to produce this complicated intelligence was Yoky Matsuoka, a 2007 MacArthur “genius” fellow and MIT-trained computer scientist who heads a University of Washington lab, and also was working on futuristic projects for the top-secret Google X division. Rogers set up a meeting.

When Matsuoka heard him utter the acronym HVAC, she pictured some guy in a blue shirt coming to her house and checking out some dirty spot in the basement to fix something. “But seven minutes later, I was captivated,” she says. “I’d seen plenty of smart home projects in academia, beginning in the 1980s, but they just could not take off. When Matt presented the idea, I tried to poke holes in it, but he had answers for every problem I bought up. I realized that this could be the entry point – and that this was an opportunity I could not miss.”

It’s the intelligence within that makes the Nest Learning Thermostat unique. After it’s installed, users simply set temperatures that make them comfortable for a few days. Soon, the thermostat figures out what you want, and starts adjusting temperatures on its own, based on time of day and whether people are around.

If you’re not home for a while, the Nest will figure out the house is empty. If you routinely turn down the air conditioning before your household goes to sleep, and you forget to do this one night, the Nest will figure it out and take action. “If this is in your house for 10 days, it really starts making a difference. If you’re feeling cold, turn it up. If you’re feeling warm, turn it off. Turn it up two days at the same time, we know,” says David Sloo, the Nester in charge of the user interface.

Matsuoka knew that she’d been successful when she installed one of the 200 test units in her home. One night after she’d gone to bed, she kicked herself for forgetting to turn down the thermostat to prevent a wasteful blast of hot air during the night. She dragged herself out of bed and walked over to the Nest, which lit up to greet her.

“It already had the temperature that I would have selected for efficiency,” she says. “And I thought, how could it know? I didn’t remember putting in those temperatures – it did a better job of remembering my pattern than I remembered my pattern.”

An unhappier discovery came when Matsuoka learned that some of the Nest’s prototype testers were unhappy with her algorithms. She had instructed the thermostat to proactively set temperatures for efficiency: Once it learned when people were out of the room, it greedily lowered temperatures in winter and raised them in summer. But people felt that the Nest was forcing them to change their behavior. It was like Al Gore himself was in the room, barking at you to put on a sweater.

So Matsuoka changed the algorithms, shifting the Nest’s personality to more of a gentle coach than a noodge with a climate-change slide show. Her model was the dashboard on the Toyota Prius hybrid car. Just as the Prius provides feedback on fuel consumption, the Nest gives owners a sense of how they’re using energy — and an incentive to save, as opposed to a guilt trip when they don’t. Now, when you set the energy to a temperature-saving level, the Nest awards you with a virtual leaf – a little icon that Nest hopes you will cherish. It’s like a DIY carbon offset.

“We’re actually trying to change the culture,” Matsuoka says. “If we just put a machine-learning device in people’s homes that changes the temperature without people understanding how it works, it’s never going to take off. We really had to understand how humans learn to live with a brand-new system.”

“It’s all about the control we can give to the customers,” says David Sloo, who is in charge of the user experience. “Seventy degrees is just a number. The real question is whether the people in the house are comfortable.”

The Nest Labs folks realize that it will take a long time for people to move away from traditional thermostats. For one thing, there’s the cost: At $249, the Nest is five times the price of a Honeywell Round.

Even though Nest Labs can provide data that says the device will pay for itself very quickly, it’s probably the Whole Foods crowd that will adopt it at first, either buying their own or being delighted when their new-home contractors present it to them along with the Sub Zero fridge and mesquite flooring.

When people do buy a Nest, they will find that, just like an Apple product, even the packaging is designed to be unwrapped like a treasure, and not an, um, HVAC device.

Then they have to install it, of course. Nest has devised a step-by-step system designed to allow even relatively unsophisticated do-it-yourselfers to set it up in under a half an hour. (You can follow along with videos posted to YouTube.) The thermostat display even corrects you when you’ve hooked up one of the leads to the wrong wire. But for those not confident enough, Best Buy will send out the Geek Squad to do your install, or Nest will provide installers charging $119 for the first unit, and $25 more for additional units. Nest is also setting up a customer support center in Utah to take calls during the process and afterwards.

After installation, in fact, is when the Nest business gets really interesting — in ways that make the company much more than a manufacturer of devices.

Fadell hopes that the Nest will change the current situation where “people write a check to some faceless company for a random amount. The furnace is just something that sits in a basement.” Indeed, the Nest will not only do its learning thing in your home, but also report data to a web site. Nest Labs will use the information to write better, more efficient algorithms — and to fix problems that arise.

Software updates will come automatically via the web, and motivated users can perform analytics on their own energy consumption, perhaps learning ways to cut costs without much sacrifice.

Though Fadell isn’t specific, he says that the company may offer more services, perhaps ones that bring more money to Nest. For the long-term, Nest plans to move beyond thermostats and exploit similar green opportunities in the way that only a tech company can. This particularly excites Nest’s investors.

“The Internet so far has been a collection of connected people. We think that the next step is connected devices,” says Randy Komisar, of Kleiner Perkins. “This could be the edge device that drives other things connected to the home.”

Nest can also be a model for another phenomenon: applying the skills of Silicon Valley to transform other seemingly mundane but nonetheless important objects. One convert to this idea is John Beagan, who runs a small Massachusetts company called HVAC Automation, Inc.

Beagan has been in the business since 1976 and thinks it’s high time that someone makes a big leap beyond the Honeywell Round. He just didn’t expect that leap to come from the folks who made the iPhone.

“It is a different group of people,” says Beagan. “One of the first fellows I talked to was an Indian fellow. He had a Ph.D. in algorithms. I thought that was very interesting. The next guy I met was an electronics technician from MIT. It’s a fresh approach to thermometers and they’ve come up with a nice product."

The engineers of Nest, of course, see their efforts as much more. And some of them don’t mind sounding hubristic at all. “I don’t know why I waited 20 years to work on something like this,” says Shige Honjo. “By making it easy for people to turn this on and off when they need it, we’re saving the environment. We’re saving the world.”

But before that happens, first geeky greenies at Nest must first find out whether people will pay $249 to fall in love with a thermostat.