For full info read the file from the Agencia de Protección de Datos, the Data Protection Agency – in Spanish.
Spanish may be difficult for many so we suggest speaking to the company where you buy your cameras or the company that will install, they will have clear instruction in relation to the law.
As of page 35 of the Guide re the connected issue whether filming of public areas is allowed, so the street in front of your property for example. In general: not allowed. Including the neighbours property – not allowed unless they have given explicit permission.
Signposting that you have video surveillance cameras in place is essential. Sample HERE.
In some situations it is legal putting cameras on private property even if they grab images from public spaces, provided it is essential for the surveillance, the captured images are not published in any way, there is no alternative way to do it and the camera system is an “offline” system, i.e. not connected to a remote alarm central by any means.
Update 14.11.2019. A recent ruling from the Supreme Court in Spain has confirmed that putting up false cameras for dissuasive purposes, so not actually filming anything, directed at a neighbour’s private property or garden, is not allowed. For reasons of infringement on their right to privacy. Just the fact that they are made to believe they are being filmed, is considered an illegal intrusion on their privacy