South Australia is turning to Tesla once again for batteries to support the state's electric grid.

But this time around, the batteries are meant to be installed at homes and paired with solar panels, in what's being billed as “the world’s largest virtual power plant.”

Following the installation of the world’s largest grid-scale battery adjacent to a South Australian wind farm, Tesla was awarded a deal to install solar panels and batteries in nearly 50,000 South Australian homes over the next five years, the company and the state government announced Monday.

Most large-scale lithium-ion battery deployments today come in the form of giant, centralized battery plants. Tesla’s virtual power plant will comprise thousands of Powerwall home batteries, but will operate just like a one big Powerpack system -- charging up when demand and electricity rates are low and discharging when demand and prices are high.

Australia, one of the world’s largest markets for rooftop solar, has been hit with statewide blackouts in recent years. Prime Minister Malcolm Turnbull blamed the blackouts on the surge in solar. The country has since turned into a fast-growing market for energy storage. 

Tesla CEO Elon Musk jumped into the blackout debate last summer and bet that Tesla could build 100 megawatts of energy storage in South Australia within 100 days or it would cost the government nothing. Musk met that challenge late last year, ultimately turning to Samsung to supply the batteries.

Tesla said the new deal with South Australia could lead to the installation of its Powerwall 2 batteries and solar panels on up to 50,000 homes in the region by the summer of 2022. "At key moments, the virtual power plant could provide as much capacity as a large gas turbine or coal power plant," according to a company statement.

The South Australian government estimates that the entire project would cost $800 million and be financed by investors and through the sale of electricity. The government is also offering a $2 million grant and a $30 million loan for the project.

The first phase of the project is just a trial, and it will see the technology deployed on 1,100 public housing rental units in South Australia over the course of this year and next. If the initial project is successful, it could be expanded to 24,000 public housing units and eventually include private homes. Residents that live in public housing and participate in the trial will get the tech installed at no cost.

The government and Tesla are calling the project the world’s largest virtual power plant, and -- if fully built out -- it will provide 250 megawatts of dispatchable electricity from the distributed home solar panels, and energy storage units. That capacity of 250 megawatts equates to about 20 percent of the daily average energy requirements of the region.

The solar panels would provide electricity for the homes, and the excess electricity would be sent out onto the grid. Software would collectively manage the use of the excess electricity and the storage capacity depending on the grid’s needs. The storage systems could also provide backup power for the homes in the event of a blackout, according to the government.

The state of South Australia expects the project could lower the electricity bills of the customers involved by up to 30 percent. It could also lower energy prices in the region due to the competition, the government claims.

What it means to be the world's largest VPP

While 250 megawatts of solar and energy storage represents a large installation, the term “virtual power plant,” or VPP, can be vague and is often used to describe a broad array of projects.

Elta Kolo, grid edge analyst at GTM Research, defines a virtual power plant simply as “the aggregation of distributed energy resources resulting in a product (either in kilowatts or kilowatt-hours).” This product can be traded commercially in wholesale markets irrespective of their location or be used for location-specific distribution grid services, said Kolo.

Under this definition, large-scale residential utility demand response programs could be considered to function as a a virtual power plant. For example, the utility Florida Power and Light has close to 1 gigawatt of flexible capacity from on-call residential air conditioning (far larger than the 250 megawatts in the Tesla-South Australia deal).

The South Australia government defines its new virtual power plant project as “a network of home solar photovoltaic and battery systems all working together to generate, store and feed energy back into the grid.”

But it’s not clear if the Tesla-South Australia project would be the largest project in the world using energy aggregated from home batteries and rooftop solar panels.

German energy storage company Sonnen has been building out a network of home batteries in Germany that can be managed in a virtual power plant. Sonnen said its virtual power plant is currently the largest distributed network of energy storage systems in the world -- 10,000 households have battery systems and it supplies clean energy for 100,000 people. The company has 30,000 battery systems installed worldwide.

This isn’t Tesla’s first deal to provide batteries to a region's residential customers on a larger scale, though. Tesla and has been working with Vermont utility Green Mountain Power to offer home batteries to customers for $15 per month to provide backup power.

The low cost is reportedly due to efficiency improvements in the Powerwall 2 and cost savings from the company's energy management software. Previously, Tesla and Green Mountain Power were offering the batteries in 2015 for $37.50 per month.

Tesla will report its earnings on Wednesday, which could shed more light on the deal with South Australia. The news, released two days before the company's full-year and fourth-quarter earnings report is due for release, could be a bright spot in a time of protracted uncertainty for Tesla as the company struggles to ramp up production of its high-demand Model 3 electric car. 

Alternatively, the South Australia deal could be a distraction. Sending 50,000 Powerwall batteries to South Australia could cause delays in other markets. Battery installers report they're already being weighed down by delays due to Gigafactory bottlenecks and Tesla's tendency to focus more on its high-profile projects.