###### Abstract  
Seeking to solve problems in the power electric system (PES) related to exacerbated and uncontrolled energy consumption by final consumers such as residences, condomiums, public buildings and industries, electric power companies (EPC) are increasingly seeking new information and communication technologies (ICTs) to transform traditional electric power distribution networks into smart grids (SG). With this implementation, PES will be able to remotely control electric power consumption as well as monitor data generated by smart meters (SM). However, Internet-of-Things (IoT) technologies will enable all this to happen quickly and at low cost, since they are low-cost devices that can be deployed quickly and at scale in these scenarios. With this in mind, this work aimed to study, propose, and implement a hybrid communication infrastructure with LoRaWAN and LoraMesh for the demand-side management as a service (HyDSMaaS) using IoT devices such as long range (LoRa) to provide an advanced metering infrastructure (AMI) capable of performing all these applications as a service offered by EPC to end consumers. Additionally, services such as demand-side management (DSMaaS) can be used in this infrastructure. From the preliminary results it was found that the LoRaWAN network achieved a range of up to 2.35 km distance and the LoRaMESH one of 600 m; thus, the latter is more suitable for scenarios where there is little interference and the SMs are at long distances, while the other is used for scenarios with greater agglomeration of nearby SMs. Considering the hybridized scenario between LoraWAN and LoRaMESH, it can be seen that the implementation possibilities increase, since its range was approximately 3 km considering only one hop, and it can reach 1023 devices present in a mesh network. Thus, it was possible to propose the actual implementation of LoRaWAN and LoRaMESH protocols as well as the hybridization of the two protocols for HyDSMaaS. Additionally, the results obtained are exclusively from Radioenge's LoRa technology, which can be further improved in the case of using more powerful equipment. Internet of Things; LoRa; LoRaWAN; LoRaMESH; hybrid LoRa topology; HyDSMaaS; smart grid +
Footnote †: journal:  
such as network anomalies [5], electric power quality [6], and excessive consumption in peak hours [7], among other problems that are also addressed in this work. In addition, this service enables the consumer to control spending, as well as provide automation and security to the residence, making it an Intelligent Home. These applications are called demand-side management (DSM) and can be offered to consumers as a service, which is called DSM as a service (DSMaaS), where consumers pay for the service used and can choose to cancel the service at any time. It is a technology that is primarily aimed at a long range with low power consumption and a low acquisition cost. In addition, LoRa has a two-level security that makes it a safe option using only the default settings, and it can be further enhanced. However, in this work the hybridization of LoRaWAN and LoRaMESH was implemented and used to provide this DSMaaS, thus naming this architecture as the hybrid communication infrastructure with LoRaWAN and LoraMesh for the demand-side management as a service (HyDSMaaS). HyDSMaaS represents a very important reason why the utility must overcome the main issues facing the traditional and centralized distribution network, i.e., the growing demand for electricity, the incorporation of distributed energy resources, the maintenance of old infrastructure, and general concerns about energy efficiency and the cost-benefit of the network. In addition, HyDSMaaS will provide a collaborative and scalable environment due to the increasing use of renewable energy resources, which implies a renewable energy system with intelligent resources for the intelligent management of electricity consumption and generation [8; 9].