**3. System Architecture**

The modular design of the proposed approach splits the architecture into different layers (Figure 1): (*i*) wireless nodes (encompassing sensors, actuators, low-power embedded processor, battery), (*ii*) internet gateway/concentrator, and The Things Network (TTN) [59], a worldwide open-access LoRaWAN™ network, (*iii*) uplink and downlink connection,

database applications, and user interface placed in a virtual machine in the cloud. Our layer structure is a simplified version for what is reported in [23] where our layer "*i*" corresponds to the perception layer, layer "*ii*" merges the *network* and the middleware layers, while our layer "*iii*" combines the common platform and the application layers. Details on the different blocks of Figure 1 will be given in the following sections.

**Figure 1.** System architecture.
