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

PDU Translator

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 greenMike , 15 March, 2021
Forums
Gurux.DLMS

Hello,

I got the data decrypted so far. I just need to translate them with which function do I do this? I checked the data with the translator in the GXDLMSDirector on Windows.

I just need the function from PDU to XML

I'm programming in Python.

BR, Michael

Image
Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

You can use GXDLMSTranslator for that. Something like this:

tr = GXDLMSTranslator()
tr.pduToXml(pdu_from_the_meter)

BR,
Mikko

greenMike

5 years 2 months ago

Thank you for the quick

Thank you for the quick answer. Which imports I need.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

from gurux_dlms.GXDLMSTranslator import GXDLMSTranslator

BR,
Mikko

greenMike

5 years 2 months ago

Hello,

Hello,

I have tested this function so far and am almost satisfied with the result. Unfortunately, it doesn't give the same result as when I use the online translator.

Decrypted data:
0f800330070c07e502040409122d00ffc4020223090c07e502040409122d00ffc40209060100010800ff060001832302020f00161e09060100020800ff060000011802020f00161e09060100010700ff060000004c02020f00161b09060100020700ff060000000002020f00161b09060100200700ff1208f402020fff162309060100340700ff1208f302020fff162309060100480700ff12091a02020fff1623090601001f0700ff12003102020ffe162109060100330700ff12001302020ffe162109060100470700ff12000102020ffe1621090601000d0700ff1001df02020ffd16ff090c3137383217434aef736eaaa1781d8fc5bbdbfc68ffa0f4

Online Translater:
<DataNotification>
<LongInvokeIdAndPriority Value="2147692551" />
<!--2021-02-04 09:18:45-->
<DateTime Value="07E502040409122D00FFC402" />
<NotificationBody>
<DataValue>
<Structure Qty="35" >
<!--2021-02-04 09:18:45-->
<OctetString Value="07E502040409122D00FFC402" />
<!--1.0.1.8.0.255-->
<OctetString Value="0100010800FF" />
<UInt32 Value="99107" />
<Structure Qty="2" >
<Int8 Value="0" />
<Enum Value="30" />
</Structure>
<!--1.0.2.8.0.255-->
<OctetString Value="0100020800FF" />
<UInt32 Value="280" />
<Structure Qty="2" >
<Int8 Value="0" />
<Enum Value="30" />
</Structure>
<!--1.0.1.7.0.255-->
<OctetString Value="0100010700FF" />
<UInt32 Value="76" />
<Structure Qty="2" >
<Int8 Value="0" />
<Enum Value="27" />
</Structure>
<!--1.0.2.7.0.255-->
<OctetString Value="0100020700FF" />
<UInt32 Value="0" />
<Structure Qty="2" >
<Int8 Value="0" />
<Enum Value="27" />
</Structure>
<!--1.0.32.7.0.255-->
<OctetString Value="0100200700FF" />
<UInt16 Value="2292" />
<Structure Qty="2" >
<Int8 Value="-1" />
<Enum Value="35" />
</Structure>
<!--1.0.52.7.0.255-->
<OctetString Value="0100340700FF" />
<UInt16 Value="2291" />
<Structure Qty="2" >
<Int8 Value="-1" />
<Enum Value="35" />
</Structure>
<!--1.0.72.7.0.255-->
<OctetString Value="0100480700FF" />
<UInt16 Value="2330" />
<Structure Qty="2" >
<Int8 Value="-1" />
<Enum Value="35" />
</Structure>
<!--1.0.31.7.0.255-->
<OctetString Value="01001F0700FF" />
<UInt16 Value="49" />
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="33" />
</Structure>
<!--1.0.51.7.0.255-->
<OctetString Value="0100330700FF" />
<UInt16 Value="19" />
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="33" />
</Structure>
<!--1.0.71.7.0.255-->
<OctetString Value="0100470700FF" />
<UInt16 Value="1" />
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="33" />
</Structure>
<!--1.0.13.7.0.255-->
<OctetString Value="01000D0700FF" />
<Int16 Value="479" />
<Structure Qty="2" >
<Int8 Value="-3" />
<Enum Value="255" />
</Structure>
<OctetString Value="3137383217434AEF736EAAA1" />
</Structure>
</DataValue>
</NotificationBody>
</DataNotification>

Python Funktion:
<DataNotification>
<LongInvokeIdAndPriority Value="80033007" />
<DateTime Value="07E502040409122D00FFC402" />
<NotificationBody>
<DataValue>
<Structure Qty="23" >
<OctetString Value="07E502040409122D00FFC402" />
<OctetString Value="0100010800FF" />
<UInt32 Value="00018323" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1E" />
</Structure>
<OctetString Value="0100020800FF" />
<UInt32 Value="00000118" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1E" />
</Structure>
<OctetString Value="0100010700FF" />
<UInt32 Value="0000004C" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1B" />
</Structure>
<OctetString Value="0100020700FF" />
<UInt32 Value="00000000" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1B" />
</Structure>
<OctetString Value="0100200700FF" />
<UInt16 Value="08F4" />
<Structure Qty="02" >
<Int8 Value="FF" />
<Enum Value="23" />
</Structure>
<OctetString Value="0100340700FF" />
<UInt16 Value="08F3" />
<Structure Qty="02" >
<Int8 Value="FF" />
<Enum Value="23" />
</Structure>
<OctetString Value="0100480700FF" />
<UInt16 Value="091A" />
<Structure Qty="02" >
<Int8 Value="FF" />
<Enum Value="23" />
</Structure>
<OctetString Value="01001F0700FF" />
<UInt16 Value="0031" />
<Structure Qty="02" >
<Int8 Value="FE" />
<Enum Value="21" />
</Structure>
<OctetString Value="0100330700FF" />
<UInt16 Value="0013" />
<Structure Qty="02" >
<Int8 Value="FE" />
<Enum Value="21" />
</Structure>
<OctetString Value="0100470700FF" />
<UInt16 Value="0001" />
<Structure Qty="02" >
<Int8 Value="FE" />
<Enum Value="21" />
</Structure>
<OctetString Value="01000D0700FF" />
<Int16 Value="01DF" />
<Structure Qty="02" >
<Int8 Value="FD" />
<Enum Value="FF" />
</Structure>
<OctetString Value="3137383217434AEF736EAAA1" />
</Structure>
</DataValue>
</NotificationBody>
</DataNotification>

My question is can I pass parameters that the result is the same?

BR,
greenMike

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

What you mean by that the result is not the same? I checked the values and those look the same.

BR,
Mikko

greenMike

5 years 2 months ago

Hi,

Hi,

How can I calculate the time? for example: <! - 2021-02-04 09:18:45 ->

And how do I find out the addresses, for example: <! - 1.0.1.8.0.255 ->
BR, greenMike

  • 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