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. Python GXDLMSTranslator

Python GXDLMSTranslator

By juandavido92 , 10 February, 2026
Forums
General discussion

Hi,
I am using gurux_dlms for python and I would like to know how to configure the translator properly
Here is my code

from gurux_dlms import *
from gurux_dlms.enums import TranslatorOutputType
from gurux_dlms.enums import Security
encrypted_data = "7EA03800021611F1544CC6E6E600DB0857534530303030311E30000000A96437FABDDBB43C3FE046C960BC9061849413AA1B68D45876B981E27E"
t = GXDLMSTranslator(TranslatorOutputType.SIMPLE_XML)
t.comments = True
t.security = Security.AUTHENTICATION_ENCRYPTION
t.systemTitle = bytes.fromhex("5753453030303031")
t.authenticationKey = bytes.fromhex("D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF")
t.blockCipherKey = bytes.fromhex("000102030405060708090A0B0C0D0E0F")
xml = t.messageToXml(encrypted_data)
print(xml)

and here is what I got
<HDLC len="37" >
<!--Logical address:1, Physical address:1416-->
<TargetAddress Value="4588" />
<SourceAddress Value="78" />
<!--I frame.-->
<FrameType Value="54" />
<PDU>
<GeneralGloCiphering>
<SystemTitle Value="5753453030303031" />
<CipheredService Value="30000000A96437FABDDBB43C3FE046C960BC9061849413AA1B68D45876B9" />
</GeneralGloCiphering>
</PDU>
</HDLC>

but the translator in GXDLMSDirector is capable to translate
Here is what I got
BlockCipher key: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Authentication Key:D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
1: 7E A0 38 00 02 16 11 F1 54 4C C6 E6 E6 00 DB 08 57 53 45 30 30 30 30 31 1E 30 00 00 00 A9 64 37 FA BD DB B4 3C 3F E0 46 C9 60 BC 90 61 84 94 13 AA 1B 68 D4 58 76 B9 81 E2 7E
<HDLC len="37" >
<!-- Logical address:1, Physical address:1416 -->
<TargetAddress Value="4588" />
<SourceAddress Value="78" />
<FrameType Value="54" />
<PDU>
<!-- DLMS system title:
Manufacturer Code: WSE
Serial number: 206966894641
-->
<!-- Invocation Counter: 169 -->
<!-- Decrypt data: C0 01 41 00 01 00 00 60 01 00 FF 02 00
<GetRequest>
<GetRequestNormal>
# Priority: Normal, ServiceClass: Confirmed, Invoke ID: 1
<InvokeIdAndPriority Value="65" />
<AttributeDescriptor>
# Data
<ClassId Value="1" />
# 0.0.96.1.0.255
<InstanceId Value="0000600100FF" />
# Value
<AttributeId Value="2" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
-->
<GeneralGloCiphering>
<SystemTitle Value="5753453030303031" />
<CipheredService Value="30000000A96437FABDDBB43C3FE046C960BC9061849413AA1B68D45876B9" />
</GeneralGloCiphering>
</PDU>
</HDLC>

Thank you so much

Profile picture for user Kurumi

Kurumi

4 months 1 week ago

Hi, Thank you for pointing…

Hi,

Thank you for pointing this out. This is fixed to version 1.0.197.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201

New forum topics

  • negative indexing for custom method/attribute
  • System title
  • Elster a1800 clock reset to year 2000 with one tariff billing
  • Possible memory leak in file dlms.c, getCompactArrayItem(), getCompactArrayItem2()
  • Official Gurux.DLMS.Client.Example.Net fails during High GMAC secure association (Invalid PDU), while Gurux Director connects successfully
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin