Consumers in the UK could save billions of pounds thanks to major changes in the way electricity is made, used and stored, the government has said.
New rules will make it easier for people to generate their own power with solar panels, store it in batteries and sell it to the National Grid.
If they work, consumers will save £17bn to £40bn by 2050, according to the government and energy regulator Ofgem.
The rules are due to come into effect over the next year.
They will reduce costs for someone who allows their washing machine to be turned on by the internet to maximise use of cheap solar power on a sunny afternoon.
And they will even support people who agree to have their freezers switched off for a few minutes to smooth demand at peak times.
They'll also benefit a business that allows its air-conditioning to be turned down briefly to help balance a spell of peak energy demand on the National Grid.
Among the first to gain from the rule changes will be people with solar panels and battery storage. At the moment they are charged tariffs when they import electricity into their home or export it back to the grid.
The government has realised that this rule must change because it deters people from using power more flexibly in a way that will benefit everyone.
Thanks to improvements in digital technology, battery storage and renewables, these innovations in flexibility are already under way with millions of people across the UK generating and storing electricity.
The new rules have been designed to cash in on this.
The government will set up a "battery institute" to fund firms seeking major breakthroughs in battery research and development.
Its critics say it has been slow to support the burgeoning battery industry - and has allowed South Korea, Japan and China to take a lead.
The tiny energy savings of millions of people and firms will be pulled together into packages by traders, who will offer substantial chunks of energy saving to the National Grid at the click of a computer.
So instead of predicting peak demand then building power stations to meet it, energy managers will be able to trade in Negawatts - negative electricity.
In a speech made in Birmingham, Business Secretary Greg Clark outlined further a £246m investment in the UK's industrial strategy, with energy at its heart.
He gave details of a competition for innovation in battery technology, which he says will help make the UK a world leader in battery design and manufacture.
Nicola Shaw, executive director of National Grid, previously told BBC News that between 30% and 50% of fluctuations on the grid could be smoothed by households and businesses adjusting their demand at peak times.
'Moment of change'
"We are at a moment of real change in the energy industry," she said.
"From an historic perspective, we created energy in big generating organisations that sent power to houses and their businesses.
"Now we are producing energy in those places - mostly with solar power."
An Ofgem source told BBC News the current rules on trading energy are not fit for the digital age because they often discourage people using energy flexibly.
The rules were made before the digital revolution and before the boom in variable renewable energy.
Industry figures talk about the seismic change that's sweeping them along.
At a recent UK conference, energy managers were asked which of them could foresee the shape of the industry in a decade; only half a dozen people raised their hands.
Some will urge a degree of caution amongst the enthusiasm: the more the energy industry embraces the digital age, the more vulnerable it will be to hacking.
Recent reports suggest that Russian hackers may already have tried to compromise the system.
Ofgem says the new rules will put measures in place to combat interference.