## 5 Conclusions and Future Work  
This paper studies, implements and analyzes a Hybrid Communication Infrastructure with LoRaWAN and LoraMesh for the Demand Side Management as a Service (HyDSMaaS). The performance of a hybrid LoRa network using LoRaWAN and LoRaMESH protocols to provide a bidirectional AMI in the SG scenario enabling the provision of EPC services to end consumers on the demand side. In this paper, the main IoT technologies are listed and positive and negative points are analyzed in comparison with LP-WAN technologies, leading to justify the use of this technology due to the fact that it is low cost, long range, scalable and has more physical and network structure options. Five SMs were implemented, consisting of a voltage and current sensor, as well as LoRa communication devices. As tests, the operation of the two protocols LoRaWAN and LoRaMESH were analyzed on the bench. In the actual scenario they were analyzed for different points, sides and situations in an urban environment. With this, LoRaMESH was able to reach distances of approximately 600 m between two points, in addition, it is worth mentioning that the technology supports up to 1023 devices connected in the network mesh, with this, being able to increase the aucance of the network because of the hops that can occur between devices mesh composed of LoRaMESH protocol implemented and sold by the company Radioenge. This amount is not a limitation of the mesh network, nor of LoRaWAN, it is just a limitation of the technology used. With LoRaWAN, it was possible to achieve distances of up to 2.35 km between the gateway and the SMs. In addition, the devices were analyzed for different SFs, sides and positions, so the technology was able to operate fully up to approximately 2 km away from the gateway, and beyond that, only with larger SFs. Another point worth mentioning is the analysis and implementation of the packet breaking, this made the devices achieve a greater distance, having a difference of approximately 1 km when the packet is broken. What is worth highlighting as one of the contributions of this work. From the collected data, ToA, delay, RSSI and SNR are considered and analyzed for the different protocols, as well as distances between the SMs and the gateway, different sides, geographical positions and location within the city. What is worth noting is that the LoRaMESH protocol achieved secure communication up to 600 m distance from one SM to another, having as RSSI and SNR affected in a very reduced way and without affecting the communication infrastructure in terms of communication loss. In the case of LoRaWAN, the higher the SF the better the RSSI and lower the SNR, higher settings are better to achieve a greater range, the problem is that it becomes more prone to failures and the packet must be reduced or broken in order to reduce delay and ToA, otherwise, the communication will have a high delay reaching no communication. Considering the hybrid network, there can be a network with 1023 LoRaMESH nodes connected to a hybrid DAP, which is a LoRaWAN end device, communication onwards is done with LoRaWAN. In other words, the network becomes more scalable, and can easily get a large number of nodes without having a high investment in communication infrastructure. This work has some limitations, and the main one is in relation to the LoRaMESH protocol that proposed more difficulties in terms of programming, as well as not obtaining a result as expected. The reason for this is that the routing algorithm is closed for reasons of factory protection, and this makes the algorithm a black box, so resources for implementations, improvements, modifications and other analyses are unfeasible. Thus, the LoRaMESH protocol will not be a standard to be used globally, only by Radioenge customers. With this, the results obtained are relative to the scenario and the technologies used in this work, and this does not mean that these will be standard results of the protocol.