## 1 Introduction  
The energy challenge is one of the most important issues for today's society, and governments worldwide have to adopt strategic policies to face it. These actions involve important economic and structural consequences for daily life and need to be focused in solving problems with the available resources, to achieve a sustainable energetic future. The European Union (EU) is demanding strong actions from all member countries [1] on this respect. The \"20-20-20\" targets, within the 2020 climate and energy package (enforced by the Paris Agreement), envisage a significant reduction of greenhouse gas emissions, a substantial growth of renewable energy use, and major energy saving; all to be met by 2020. And for 2030, these actions will have to be improved further so as to reach an increase in energy efficiency of 27-30%. European governments have set up their own plans to meet these targets; for example, the Spanish Government has developed the \"Energy Efficiency Action Plan 2017-2020\", to dictate ways to achieve these EU goals [2].  
The EU focuses its actions on public transport and industry, due to their high potential for energy saving. However, all efforts in other sectors are also enforced as they can help achieving the specified targets. Some examples are energy labels for household appliances, or smart meters. Therefore, all economic sectors and activities must reduce energy consumption to perform tasks more efficiently, optimizing all available resources.  
Renewable energies are also strongly supported in Europe; being wind the most significant of these sources. The WindEurope Association states that, in 2030, 31% of the generated energy will be produced by wind [3]. During 2016 wind was the principal source of renewable energy in Spain (47.3%), a country in which 40.8% of all electricity is produced by renewable sources [4]. Given their notable evolution, the peculiarities of these sources have to be taken into account, because they will be key for the future energetic framework. However, wind energy presents a great inconvenient as it depends on the intermittent nature of wind. This makes it prone to producing power peaks resulting in energy waste; a good management of available energy at each instant becomes especially relevant as a means to tackle this problem. Information and Communications Technologies (ICTs) are becoming crucial to improve the current situation by providing support to the efficient management of both energy demand and production [5].  
The present work deals with the development of a Wireless Sensor and Actuator Network (WSAN) that provides the required support to an advanced management system for electric energy by supplying it with updated and reliable data as well as with a means to convey instructions. This is achieved through the use of a service network, that includes some features of the future unmanned intelligent plants proposed by [6]. The system contemplates different types of end users and provides an optimal management of their energetic necessities in a comprehensive, intelligent, and automatic way.  
This paper is structured as follows: Section 2 presents the background in actions for solving the energetic problem, and the main technologies employed for it; Section 3 describes the different hardware and software parts of the proposed system, and their development; preliminary tests and applications are described in Section 4; and the results and analysis of the system performance are discussed in Section 5; finally, the last section presents the most relevant conclusions and future work.