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

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 02/19/2026 - 11:51
    gurux.dlms.cpp 9.0.2602.1901
  • Sun, 02/01/2026 - 19:47
    gurux.dlms.cpp 9.0.2602.0101
  • 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

New forum topics

  • Gurux C library DLMS book edition support
  • Help with connection and read with landis+gyr e650 + CU-E22 using python
  • Preestablished connection
  • RJ11 to RS232 Pin out SECURE Premier 300
  • GENUS sugam 3 PH bidirectional
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin