Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. ESP32-Based Smart Meter Interface Via DLMS/COSEM

ESP32-Based Smart Meter Interface via DLMS/COSEM

Profile picture for user aria_12
By aria_12, 16 July, 2025
Forums
General discussion

Hi everyone, I’m prototyping a smart meter interface using an ESP32 to read DLMS/COSEM data over RS-485 and then relay that information via MQTT. For inspiration on reliable multi-node communication, I found this guide on ESP-NOW peer-to-peer networking really insightful:
https://www.theengineeringprojects.com/2022/01/esp-now-protocol-with-es…

I’ve also reviewed Gurux’s own DLMS implementation examples and came across a community Arduino–ESP32 RS-485 telemetry setup that emphasizes buffer management. My main challenge is ensuring stable DLMS frame parsing and MQTT transmission without timing conflicts. Has anyone used ESP32 in production with DLMS, how did you manage serial buffering, task prioritization, and recovery from communication errors?

Profile picture for user Kurumi

Kurumi

6 months ago

Hi, When you receive MQTT…

Hi,

When you receive MQTT message, you must establish the connection to the meter and read data. Then close the connection.

You can't leave the connection open, because there is an inactivity timeout and the meter will close the connection after that time.

https://gurux.fi/Gurux.DLMS.Objects.GXDLMSIecHdlcSetup

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 01/20/2026 - 10:38
    gurux.dlms.java 4.0.89
  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195

New forum topics

  • Generic Profile- gxGet with selector=2: different behaviour on cpp and cimplementation
  • DLMS Client–Server Communication Over GPRS Fails With Dynamic IP
  • Pre-established connection questions
  • writing Error "Service not allowed"
  • High GMAC meters can’t authenticate – can’t read invocation counter
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin