Montse Romanillos on the solar panel-covered roof of her building in Madrid. Samuel Sánchez

In 2012, Ricard Jornet decided he was sick of paying out up to €12,000 a year in electricity bills for his beachside restaurant in the Catalan resort of Mataró. So he decided to invest €33,600 in solar panels and start generating his own electricity. He says he now covers around 65 percent of the restaurant’s energy needs, and although it will take him 10 years to recoup his investment, he’s happy to be making a contribution to the environment as well as saving some money in the long term.

Over the last decade, Spain has gone from providing subsidies to small-scale solar energy producers to making people pay for generating electricity

In a country that has the fourth-highest electricity costs in Europe – around €80 per person a month – and where many regions enjoy plentiful sunshine, you might think it would make sense to encourage people to generate their own power. Companies such as Ecooo and Solar Tradex, backed by powerful associations such as the Plataforma para un Nuevo Modelo Energético (Platform for a New Energy Model) and Som Energia (We Are Energy), are taking advantage of technological improvements to help people and businesses that want to produce their own electricity. But instead, the government seems set on protecting the interests of Spain’s power companies and is turning its back on solar energy.

A revolution from Silicon Valley The wave of technological advances begun in Silicon Valley is about to arrive in Spain and is set to topple the oligopoly enjoyed by the country’s electricity producers. Tesla, a company specializing in electric cars and electricity storage units, unveiled its latest development in April. “The obvious problem with solar power is that the sun doesn’t shine at night,” said company founder Elon Musk, the man behind SpaceX and a cofounder of PayPal, at the launch. “We need to store the energy to use at night. But the issue with existing batteries is they suck. They are expensive, unreliable and bad in every way,” said the man increasingly seen as taking on the visionary mantle left by Steve Jobs. Tesla’s 10KWh battery costs €3,500 without fitting, and is designed for businesses. The 7KWh model can be bought for around $3,000. It stands 1.3 meters tall, is 86 centimeters wide, and 18 centimeters deep, and would be easily fitted into most homes.

The problem that Ricard Jornet and others who want to join the self-production revolution face is that the generation curve of solar energy tends not to match energy demand. In other words, solar energy is generated during the day, when the sun shines, but we tend to use more electricity at night, when it’s dark.

The rooftop of Montse Romanillos’ building in Madrid’s central Lavapiés district is lined with solar panels, but only 25 percent of the electricity they produce is used. The rest is given away, because it isn’t worth the hassle of filling in the forms to get a €100 refund, she says.

Proponents of self-production want to see a “net balance” introduced, which would allow the likes of Jornet and Romanillos to store their excess energy and then use it at night. They understand that this will involve costs, but point to systems already in place in Germany, Portugal, Greece, Italy, Denmark, the United States and Mexico. But Spain, where 26 million households consume around 30 percent of total energy output – the rest being used by businesses, industry, schools, and government offices – is not only a long way from such regulation, but is about to publish draft legislation that will impose hefty taxes on small-scale renewable producers while ending payments for pumping their excess electricity into the national grid.

The first draft of the proposals was made public a year ago and either effectively put an end to many people’s plans to install solar panels or prompted them to do so without officially registering them. In response, the government, seeing difficulties ahead for the country’s power companies, wants to impose a tax on households that use newly developed batteries to store solar energy for use at night.

The countries encouraging self-production The Spanish government’s draft proposals to regulate self-production of electricity from solar or wind energy are in direct contrast to the policies pursued by far less sunnier nations such as Japan, Switzerland, Denmark and many parts of the US to promote renewables. In Portugal, households and small businesses are permitted to generate up to 1MW without having to pay any kind of tax to use the national grid, while the net balance is achieved by paying for surplus energy at 90 percent of the market price. Portugal does not impose any kind of restrictions on storing energy either.

The latest version of the draft legislation comes just weeks after Tesla, a US company that also produces upscale electric cars, unveiled a range of batteries that are three times cheaper and more powerful than those available until now. In short, Tesla now presents a serious threat to the interests of Spain’s electricity producers and distributors.

Spain’s energy self-production policy is the opposite of that in most developed countries, says Cote Romero of Ecooo, a not-for-profit organization working to raise awareness among the public about home electricity generation. Over the last decade, during which domestic electricity costs have risen by 80 percent, the country has gone from providing subsidies to small-scale solar energy producers to making people such as Ricard Jornet actually pay for generating electricity.

Since 2008, when Spain’s renewable energy boom was at its height, the cost of solar energy generation equipment has fallen by 70 percent. “It went from being a financial product to one about saving money,” says Jornet. But this government’s latest measures make it practically impossible to recoup any investment in solar energy in the medium term. The new law will mean that it will take at least three decades to make good on self-production equipment, according to UNEF, the body that represents the solar energy sector.

The Industry Ministry says it intends to push ahead with approving the legislation before November, when general elections are due in Spain, but many say that this is now unlikely, given that it will have to be debated in Congress, receive approval from the CNMC markets watchdog, and get the green light from Brussels.

“The objective is that the toll on regulated costs be the same for all consumers,” says the Industry, Energy and Tourism Ministry in a statement. “It is not possible to avoid the payment of tolls to use the national grid when there is no sun or wind. Therefore, this is not a tax to put a break on self-consumption.”

But Jorge Fabra Utray, an economist and expert in Spain’s energy sector, disagrees: “Two years ago, if a taxpayer put a solar panel on his or her roof and recouped the investment, the electricity produced would be cheaper than that provided by a utility. So why aren’t there more solar panels in our cities? Because the electricity companies are writing the rules.”