## 1 Introduction
Some of these are the following: _Tetranychus urticae_, _Meloidogyne_, _Heterodera_, _Ditylenchus_, _Lobesia botrana_, _Colomerus viti_, _Eriophytes vitis_, _Phylloxera vastatrix_, _Haltica ampelphaga_, _Byctiscus betulae_ or _Sparganothis pilleriana_, among others. * Vine diseases generated by viruses and bacteria: virus and virus-like diseases and other infectious diseases of grapevines are induced by intracellular pathogens of various natures. For example, grapevine degeneration, grapevine decline, leafroll complex, rugose wood complex, yellow mottle, line pattern, yellow dwarf, stun, Ajinashika, Fleck, Roditis leaf discoloration, yellow speckle, among others. There are several ways and methods to diagnose and find out what harmful agent or nutritional deficiency is affecting the vine. These are the following [13]:  
* Visual inspection of the crop to check for deficiencies signs: only critical deficiencies are noted, but the damage symptoms observed sometimes can be unreliable. * Soil analysis: qualifying the soil nutrient levels and other characteristics. * Analysis of the plant tissue: measurements of nutrient levels in plant tissues. It can detect weaknesses that could not be found in the soil tests. * Bioassays: these are methods to diagnose nutrient deficiencies which combine the techniques of tissue analysis and testing in pots. * Field Tests: this test is the oldest and most reliable method to diagnose nutrient deficiencies, but it is an expensive procedure. These methods are used as a first step in vine exploration, because the field tests are quite expensive and difficult to manage. Besides, usually, it is not possible to perform them on the plant, but rather only in a laboratory. Over the years, there have been notable technological advances in agriculture. They may be classified according to their nature. We find biochemical products, such as pesticides and fertilizers, farm machinery, such as tractors or irrigation timed systems, and the ground nutrients, among others. From the mechanical and the information technology application perspective, the technological improvements should not disturb the environment. Some examples of information technology applied to the agriculture, rural, and forest areas are applications based on the detection of natural disasters, monitoring and control of agriculture, ecosystems and geophysical measurement systems, flood detection, precision agriculture, biological complexity of environmental mapping, and detection of forest fires [14, 15]. Moreover, it is easy to find some deployed sensor systems for monitoring all meteorological parameters of the environment such as temperature, humidity, wind, _etc._[16] or distributed monitoring systems based on Wireless Sensor Network (WSN) technology [17]. This technology cannot be used to obtain new agricultural products, but rather to improve existing techniques and working conditions of the people in charge of the fields, and to improve disease diagnosis in order to ensure the final product quality. Frequently, these technological advances require a high initial financial contribution, but over the years, this is outweighed by the benefits obtained from the field [18]. In this paper, we propose a WSN that uses an image processing system in each wireless node in order to distinguish if a vine has bad leaves or not. These bad leaves could be caused by a deficiency, pest, disease or another harmful agent. When the wireless sensor detects any unusual status in the vine leaves, it generates an alarm that will be routed to the sink node in order to warn the farmer. The benefits of this deployment are huge and the farmer will recoup the investments of this implementation very fast (the time will depend on where the vineyard is planted, the probability of having deficiencies, pests or diseases, and depending, on how far away the farmer lives and on how many time he/she usually spends observing the vineyard looking for any deficiency, pest or disease).