This paper presents a system to improve the performance of the Long Range (LoRa) network using an algorithm derived from the artificial bee colony (ABC), which obtains a minimum packet lost rate (PLR) in the LoRa network and allows to more accurately determine load profiles of dwellings, with smaller a time measurement and less data transmission. The developed algorithm calculates the configuration parameters of the LoRa network, monitoring in real time the data traffic, and is implemented in gateway LoRa network monitor (GLNM). Intelligent measurement equipment has been developed to determine the dwelling load profiles. This energy measurement device for dwelling (EMDD) measures the variables and consumption of electricity in each home with measurement times that can be configured. This research also develops the GLNM gateway, which monitors and receives data from the EMDDs installed and uploads them to the cloud using Firebase. This developed system allows to perform demand forecasting studies, analysis of home consumption, optimization of electricity tariffs, etc., applied to smart grids.