# Electricity Metering LoRaWAN Gateway System

Electricity Metering LoRaWAN Gateway System is a complete communication and telemetry system, dedicated for remote electricity readout and remote control. The System consists of custom designed LoRaWAN node, connected to a standard single or three phase electricity meter, using an RS485 interface. The LoRaWAN node automatically performs readout on fixed time interval and sends the readout data to the nearest LoRaWAN Gateway, which is part of a custom designed and configured LoRa network. The device is fully configurable by the remote application server. The installed and configured LoRaWAN server communicates with the LoRa end nodes transparently. The LoRaWAN server transparently exchanges the application level information of the devices with an additional Application server, and thus encapsulating the LoRa network specifics. The application server connects to the LoRaWAN server, using MQTT communication standard. The application server provides WEB interface for the end user and allows easily check and process metering information, as well as full configuration of the LoRa end nodes.

LoRaWAN End Node

The LoRaWAN End Node is compatible with single and three phase energy meters, which supports RS485 data interface communication over IEC62056-21 communication standard. The device is designed, based on 8bit MCU. The firmware approach is bare metal firmware, executing the ported LoRaWAN stack and the application level tasks.The device supports an internal spring type LoRa antenna, as well as an external antenna, connected to SMA RF connector. The implemented AC mains power supply simplifies the installation efforts. The communication protocol at application level is implemented, according to the LoRaWAN standard limitations, and is completely optimized, according to the dedicated system requirements. The information between the End node and the LoRaWAN server is transmitted encrypted, with a custom network key, and the devices are compliant to LoRa class 1 device and Over The Air Activation /OTAA/ method, providing ease of integration.

✓ RS485 interface for electricity meter connection;
✓ Highly optimized onboard LoRa transceiver circuit;
✓ Integrated mains power supply, minimizing external components;
✓ Status LED, indicating the LoRa connection activity and status;
✓ SMA LoRa antenna connector, allowing external GSM antenna;
✓ Optimized DIN rail mounted enclosure for an easy mechanical fix;
✓ Bare metal firmware approach, using 8bit MCU;
✓ Supporting IEC62056-21 communication standard for energy meter communication;
✓ Supporting LoRa standard encryption with custom key and OTAA end node activation;


LoRaWAN Server


The implemented LoRaWAN server is encapsulating the entire LoRa network specifics and allows LoRa based end nodes to transparently send and receive data to the application server. The server supports all LoRa network requirements, RF, and gateway communication encryption, using a custom encryption key, customized for each LoRa network. Gateways and LoRa End Nodes can be easily added at runtime and thus the network infrastructure changes, according to the customer needs. There is no physical limitation of the End nodes or gateways count. The server supports many protocols for transparent information exchange with the application server: WebSocket, HTTP, MQTT, AMQP 0-9-1 to the RabbitMQ. For the Lora infrastructure side, the server supports LoRaWAN gateways, based on Packed Forwarder exchange, as well as Basic Station LNS Protocol.

✓ Created on highly optimized Erlang communication language;
✓ Unlimited support for Gateways and LoRa End Nodes;
✓ Supports all LoRaWAN basic encryption systems with custom network keys;
✓ Supports Gateways, based on “Packed Forwarded” and “Basic Station LNS Protocol”;
✓ Supports application server communication protocols: WebSocket, HTTP, MQTT, AMQP 0-9-1 to the RabbitMQ;
✓ Supports configurable warning e-mail events for easy management;
✓ Runtime network infrastructure change, adding new gateways and LoRa end nodes;

Application Server


The Application Server Software is a complete system management and data process system. It contains SQL Database, storing all received metering readouts and all device settings. The server is accessed by a dedicated WEB interface, supporting complete user three management. The energy readout data management allows data sorting and charts generation, and export in .xls files of sorted data. The application server allows complete Lora Nodes configuration, using the LoRa network. The communication protocol with the LoRaWAN server is based on MQTT protocol. The database model allows very flexible definitions of measurement points, LoRa End Nodes and Energy meters objects, multi-point measurements, and object abstractions. The used measurement model is completely custom designed, according to the project specifics

✓ Using RabbitMQ for communication with the LoRaWAN server;
✓ Provide WEB interface for user interaction;
✓ Supports SQL database for all energy measurement information storage;
✓ Supports Complete LoRa devices configuration from the user control panel;
✓ Supports flexible energy measurement sorting methods, based on time, value and type of measurement;
✓ Supports sorted data visualization, generating charts and .xls file export;
✓ Supports users management and administrative control over the WEB interface;

Provided services

✓ Research and Development of the complete system architecture, based on the customer’s requirements and proposals;
✓ Prove of concept tests of the selected LoRaWAN server, building LoRa network infrastructure and performing network stress tests;
✓ Hardware design of the LoRa End Node, SCH, PCB, and mechanical design, based on the selected key components and selected enclosure. PDF export for customer’s review;
✓ Firmware design of the LoRa End Node. Porting the LoRaWAN software stack branch, to the custom hardware board, integrating the application level firmware;
✓ Performing LoRa network RF tests, evaluating the RF design and the optimal network infrastructure;
✓ Development of the application level communication protocol, according to the functional requirements and LoRaWAN network specifics;
✓ Integration of the selected LoRaWAN server, building custom LoRa network;
✓ Design of the Application server and its modules: Database, Web interface, LoRa server communication;
✓ Production of LoRa End Node prototypes, order PCBs and components, organizing device assembly;
✓ Integrating the complete system at the customer’s infrastructure;
✓ Development of service documentation for LoRaWAN network management and support;
✓ Development of user documentation, adding measurement points and energy meters;

# Electricity Metering GPRS Gateway System

Electricity Metering GPRS Gateway System is a complete communication and telemetry system, dedicated to remote electricity readout and remote control. The System consists of a metering GSM/GPRS gateway, connected to a standard single or three phase electricity meter, using RS485 interface. The GPRS gateway automatically performs readout on fixed time intervals and sends the readout data to a remote server, using TCP socket over GPRS connection. The device is fully configurable by RS232 configuration port, or by the remote server. The system includes both RS232 configuration tool software and remote data visualization software. The system communication protocol at application level is developed and customized to meet the customer’s target requirements. The device allows remote control of relay contact, controlled by the server application. Two LEDs provide valuable information for the connection status and RS485 activity.

GPRS Gateway Device

The GPRS gateway device is compatible with single and three phase energy meters, which supports RS485 data interface communication over IEC62056-21 communication standard. The device includes an industrial GSM/GPRS pre-certified module, providing reliable GPRS data connection. It is supplied directly by AC mains power, reducing the external AC power adapter. The RS485 interface is supplied with a complete opto-isolation circuit. Two LEDs provide status information for the network status and the RS485 activity.
The device firmware is tightly customized, according to the customer specific functional requirements. It is based on the industry standard FreeRTOS Real Time Operating System, combining great design flexibility and high reliability.
The server TCP socket connection is device originated and fully configurable. The device is equipped with 16mbit nonvolatile memory, capable of storing previous readouts, and later resending the information if connection problems exist, thus allowing more than one week of readouts storage

✓ RS485 interface for electricity meter connection, completely opto-isolated;
✓ RS232 interface for local device configuration;
✓ Pre-certified GPRS module and external GSM antenna support;
✓ Onboard non-volatile memory for readout storage and resend;
✓ Integrated mains power supply, minimizing external components;
✓ SIM card holder for “Mini” SIM card type (25mm x 15mm);
✓ Remote controlled relay contact for external circuit remote control;
✓ Status LEDs, indicating the connection and RS485 activity and status;
✓ Jumpers for settings factory reset and mode of operation;
✓ SMA GSM antenna connector, allowing external GSM antenna;
✓ Optimized DIN rail mounted enclosure for an easy mechanical fix;
✓ Real Time Operating System firmware approach, using 16bit MCU;
✓ Supporting IEC62056-21 communication standard for energy meter communication;
✓ Supporting TCP Socket and DNS protocol for remote connection, device originated;


RS232 Configuration Software


The RS232 Configuration Tool performs GPRS gateway configuration and adjustment of all configurable parameters. The software uses RS232 port for device connection. Can read, modify, and write all parameters, including the readout sample interval, GPRS settings, TCP socket settings, as well as the meter communication settings, required by the IEC62056-21 standard. The software can perform service actions – Factory reset and device restart

✓ Using RS232 interface for device service connection;
✓ Read, modify, and write all configurable parameters;
✓ Configure readout sample time interval;
✓ Configure GPRS related settings;
✓ Configure connection related settings;
✓ Configure meter communication settings;
✓ Execute service actions – Restart and factory reset the device;

Communication Server Software


The Communication Server Software provides remote connection and device visualization data. The software connection is based on TCP server, which receives a connection from a single GPRS gateway. The server software can perform configuration of all gateway parameters, Sample time, GPRS parameters, Connection parameters, and Meter connection parameters. All settings can be changed in real time and applied after the device restart. The server software demonstrates the developed communication protocol and is tightly optimized, according to the specific customer requirements. Additionally, the server and communication protocol provides a possibility for meter time/date reading and modification. All incoming data from a single readout is received as simple readout text, according to the IEC62056-21 standard, and visualized in the text console. The real time and memory is sent also as binary formatted data, which is visualized in the server software. All received data is stored in LOG file with included received timestamp and can be later visualized and further processed

✓ Using TCP socket listener for remote gateway connection;
✓ Read, modify, and write all configurable parameters;
✓ Configure readout sample time interval;
✓ Configure GPRS related settings;
✓ Configure connection related settings;
✓ Configure meter communication settings;
✓ Can execute service actions – Restart and factory reset the device;
✓ Configure the meter time/date;
✓ Readout text visualization on dedicated console window;
✓ Readout binary data visualization of the supported from the system data;
✓ LOG file storage for all received real time data, including the time of receiving the stamp;
✓ Internal application level connection watchdog from both ends and connection restart attempts;

Provided services

✓ Providing technical requirements documentation and key components selection, based on the functional description;
✓ Development of the application level communication concept and used protocol;
✓ Schematic design, based on the selected key components, PDF export for customer’s review;
✓ PCB design, pcb mechanical integration in the selected device enclosure;
✓ Production of first revision prototypes, order PCBs and components, organizing PCB and device assembly;
✓ Firmware design. Design of basic driver firmware modules, design of application level firmware, in circuit debug and testing. hardware and firmware optimization;
✓ Development of the Configuration tool software and used configuration connection approach;
✓ Development of the Communication server software and used configuration connection approach;
✓ Design and providing of complete production and system integration documentation, connection approach, application level protocol;
✓ Design and providing of complete user’s guide documentation for the system;