Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

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

Breadcrumb

  1. Home
  2. Forums
  3. KeepAlive Function In Python

KeepAlive function in Python

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Lotusv , 29 October, 2021
Forums
General discussion

In the Python example
KeepAlive function not implemented for reading registers
No frame is sent

Send Keep Alive
Sent 7E A0 1A 02 23 03 32 75 62 E6 E6 00 C0 01 C1 00 0F 00 00 28 00 00 FF 01 00 F9 79 7E
Received 7E A0 1B 03 00 02 00 23 52 ED 70 E6 E7 00 C4 01 C1 00 09 06 00 00 28 00 00 FF B6 6E 7E

What function can you do this in Python?

Profile picture for user Kurumi

Kurumi

4 years 7 months ago

Hi,

Hi,

The idea of keep-alive is to keep the connection up. You don't read anything with a keep-alive message. You can use a normal read to read the register that you want to.

You can read association view and read all registers or you can read only register value. Like this:

r = GXDLMSegister("LOGICAL_NAME")
#Read scaler and unit.
self.read(r, 3)
#Read value.
self.read(r, 2)

More information from the register value you can get from here:
http://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSRegister

BR,
Mikko

Lotusv

4 years 7 months ago

Thanks. I understand it.

Thanks. I understand it.
But perhaps between the readings of the registers I will do some other functions and the difference in time between the readings of the registers will be significant. The connection may be disconnected.
And thanks for the extra code.
I am not a strong programmer, but the task is to read data from a counter.

Profile picture for user Kurumi

Kurumi

4 years 7 months ago

Hi,

Hi,

You need to create a timer that will call keepalive with a given time period.
You need to stop the timer every time when you read or write something to the meter and start it afterward.

BR,
Mikko

Lotusv

4 years 7 months ago

I don't know how to work with

I don't know how to work with the timer yet, but I will figure it out. Thanks for the tip.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin