The mood around tech is dark these days. Social networks are a cesspool of harassment and lies. On-demand firms are producing a bleak economy of gig labor. AI learns to be racist. Is there anyplace where the tech news is radiant with old-fashioned optimism? Where good cheer abounds?

Why, yes, there is: clean energy. It is, in effect, the new Silicon Valley—filled with giddy, breathtaking ingenuity and flat-out good news.

This might seem surprising given the climate-change denialism in Washington. But consider, first, residential solar energy. The price of panels has plummeted in the past decade and is projected to drop another 30 percent by 2022. Why? Clever engineering breakthroughs, like the use of diamond wire to slice silicon wafers into ever-skinnier slabs, producing higher yields with less raw material.

Manufacturing costs are down. According to US government projections, the fastest-growing occupation of the next 10 years will be solar voltaic installer. And you know who switched to solar power last year, because it was so cheap? The Kentucky Coal Museum.

Tech may have served up Nazis in social media streams, but, hey, it’s also creating microgrids—a locavore equivalent for the solar set. One of these efforts is Brooklyn-based LO3 Energy, a company that makes a paperback-sized device and software that lets owners of solar-equipped homes sell energy to their neighbors—verifying the transactions using the blockchain, to boot. LO3 is testing its system in 60 homes on its Brooklyn grid and hundreds more in other areas.

“Buy energy and you’re buying from your community,” LO3 founder Lawrence Or­sini tells me. His chipsets can also connect to smart appliances, so you could save money by letting his system cycle down your devices when the network is low on power. The company uses internet logic—smart devices that talk to each other over a dumb network—to optimize power consumption on the fly, making local clean energy ever more viable.

But wait, doesn’t blockchain number-crunching use so much electricity it generates wasteful heat? It does. So Orsini invented DareHenry, a rack crammed with six GPUs; while it processes math, phase-­changing goo absorbs the outbound heat and uses it to warm a house. Blockchain cogeneration, people! DareHenry is 4 feet of gorgeous, Victorian­esque steampunk aluminum—so lovely you’d want one to show off to guests.

Solar and blockchain are only the tip of clean tech. Within a few years, we’ll likely see the first home fuel-cell systems, which convert natural gas to electricity. Such systems are “about 80 percent efficient,” marvels Garry Golden, a futurist who has studied clean energy. (He’s also on LO3’s grid, with the rest of his block.)

The point is, clean energy has a utopian spirit that reminds me of the early days of personal computers. The pioneers of the 1970s were crazy hackers, hell-bent on making machines cheap enough for the masses. Everyone thought they were nuts, or small potatoes—yet they revolutionized communication. When I look at Orsini’s ­blockchain-based energy-trading routers, I see the Altair. And there are oodles more inventors like him.

Mind you, early Silicon Valley had something crucial that clean energy now does not: massive federal government support. The military bought tons of microchips, helping to scale up computing. Trump’s band of climate deniers aren’t likely to be buyers of first resort for clean energy, but states can do a lot. California already has, for instance, by creating quotas for renewables. So even if you can’t afford this stuff yourself, you should pressure state and local officials to ramp up their solar energy use. It’ll give us all a boost of much-needed cheer.

Write to clive@clivethompson.net.

This article appears in the January issue. Subscribe now.