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. DLMS.Push.Listener Python - Fails

DLMS.Push.Listener Python - fails

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 bernhard , 10 November, 2022
Forums
Gurux.DLMS

Hi
My energy provider is telling me that the L+G E450 meter is sending data UNENCRYPTED.

As you can see below I am mostly getting the error 'Invalid Command'.
Sometimes I get the error 'Invalid Count'.

Any idea what is going wrong here?

Note: using another github package (which relies on gurux), I get an error 'Secure connection is not supported'. I think this may stem from the 'getdata' function.
The interesting bit there, is that the buffer clearly contains multiple messages (7E A0 seems to indicate the start).

pi@pi4:~/Gurux.DLMS.Python/Gurux.DLMS.Push.Listener.Example.python $ python3 main.py -t Verbose -S /dev/ttyUSB0:2400:8Even1
gurux_dlms version: 1.0.107
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
[Hex trace removed]
Closing
Media state changed. MediaState.CLOSING
Media state changed. MediaState.CLOSED

###########################################################################################################################################################################
###########################################################################################################################################################################

Nov 09 11:01:28 pi4 smartmeter-datacollector[2412]: DEBUG:smartmeter:HDLC Buffer: 7E A0 8B CE FF 03 13 EE E1 E6 E7 00 E0 40 00 01 00 00 77 DB 08 4C 47 5A 67 72 A4 8A 93 82 01 27 30 00 00 38 2A 68 A3 E8 5C 36 09 71 C1 4E FF C2 F2 69 57 8A 0E 4E 3B DB 1E 70 B0 22 C2 88 72 8B 21 6C D1 AC E8 85 B9 3F 39 31 91 00 D4 2C 9F 1C AE CF 38 01 E7 42 00 14 21 D8 E0 B3 8C 1A 07 A5 75 87 BB C7 55 2A 35 A3 BB 67 C8 A3 B8 B0 D2 08 8E 66 CF EE 11 F1 03 81 6A 67 26 F7 F7 FE A5 5B A0 19 24 61 DE A7 FF D7 AC D6 CF 91 7E 7E A0 8B CE FF 03 13 EE E1 E0 40 00 02 00 00 7A 5A 96 A8 BB 37 0D 02 3C 94 B5 D7 DD 41 17 CE 69 18 3F F4 D1 66 2C 13 A4 D7 06 9C D1 7A EC 46 CE 2D 33 10 BC B1 94 CB C1 C3 68 A2 FB 27 B2 14 24 75 8F E2 72 27 95 98 2C F8 E6 26 51 D1 7A BC 5D 38 74 DD 32 DF B8 A6 FF 6C E8 AF C3 52 12 A3 DD 9A 0B D1 22 79 F9 D8 84 7F 4A 61 0D D4 D9 E9 DF EA 34 10 A7 F3 D9 DF DF 84 57 13 49 D8 09 E1 C8 CE 5D 9C BC B3 5F 6A F2 2A B7 9B 08 7E 7E A0 54 CE FF 03 13 25 74 E0 C0 00 03 00 00 43 0F A6 B5 13 7A F4 0C 64 52 2F B5 14 AD 9D 0A A7 A2 0C FB 69 5D D4 A1 B2 B9 9A 53 0C 86 71 F9 E4 92 E3 01 28 C8 F3 A1 D6 55 44 82 5F 66 34 5D ED 2B 56 6C 23 FD D3 7B C1 D4 9D 60 B4 7C 6D 6A 46 F0 6C E2 14 07 7E
Nov 09 11:01:28 pi4 smartmeter-datacollector[2412]: WARNING:smartmeter:Failed to extract data from HDLC frame: 'Secure connection is not supported.' Some data got lost.

Profile picture for user Kurumi

Kurumi

3 years 7 months ago

Hi,

Hi,

Data is sent encrypted. You need the encryption and authentication keys from the energy provider.
Without that information, you can't decrypt the data.

Data is coming in three frames. I'll remove your hex trace so it's easier to read.
BR,
Mikko
7E A0 8B CE FF 03 13 EE E1 E6 E7 00 E0 40 00 01 00 00 77 DB 08 4C 47 5A 67 72 A4 8A 93 82 01 27 30 00 00 5A AE 6F A9 8B 1B F0 6B 22 C4 E4 24 89 3E F5 96 04 A7 26 AC 81 40 02 F0 91 F5 95 3F 07 F2 13 D6 34 E8 01 A0 D6 29 9A 9C 26 78 D4 C8 14 60 4C 3B F7 FA 47 80 5C 2B DA 39 BF 9E A8 32 86 44 8D 2B 3A F7 72 A7 DA 40 3B 0B C0 2A 55 C8 59 15 B8 BD 6C 8F AB A2 DA F6 1E 96 1C 65 D9 BA DB F3 60 61 6A 42 2C 78 3E 0D 9D C5 99 7E

7E A0 8B CE FF 03 13 EE E1 E0 40 00 02 00 00 7A AF 76 C9 3E 80 9F 82 AA C8 B5 25 16 B7 0D 42 79 6F 88 A6 5F 83 F6 38 54 8B C1 67 4B 78 D3 27 71 1A FB 50 48 36 7B AC CD B3 98 42 55 A4 D9 05 6A 9A 6C B1 BF D6 67 F5 9A 5D FC 34 21 B0 80 AF A9 FD 11 37 2F A4 D8 ED 4B 92 DD B0 66 18 06 86 70 C8 D7 0D 88 8F 0F 92 03 68 DE BF 75 3D 54 B9 D1 7E B8 F5 B9 9D 3C 21 81 57 E6 DE 12 24 FE 10 79 B1 31 0C D7 1C DC 95 D4 C7 59 28 18 7E

7E A0 54 CE FF 03 13 25 74 E0 C0 00 03 00 00 43 E9 E6 82 70 F5 48 6B 57 F3 20 A9 52 A0 0A BD EE 72 AF E3 4F 33 BD E6 81 08 B3 94 C7 6F 94 DE 29 9F A9 A6 5F AF 25 70 77 8D 81 A2 5C 29 24 0E 75 CD 59 30 27 F7 DA 1C B9 DC C5 F0 85 03 36 E7 54 16 49 36 36 E8 7E

<!-- IDIS system title:
Manufacturer Code: LGZ
Device type: IDIS package2 IP polyphase meter
Function type: Disconnector, Load Management, Multi Utility
Serial number: 44337811
-->
<GeneralGloCiphering>
<SystemTitle Value="4C475A6772A48A93" />
<CipheredService Value="3000005AAE6FA98B1BF06B22C4E424893EF59604A726AC814002F091F5953F07F213D634E801A0D6299A9C2678D4C814604C3BF7FA47805C2BDA39BF9EA83286448D2B3AF772A7DA403B0BC02A55C85915B8BD6C8FABA2DAF61E961C65D9BADBF360616A422C783E0D9DAF76C93E809F82AAC8B52516B70D42796F88A65F83F638548BC1674B78D327711AFB5048367BACCDB3984255A4D9056A9A6CB1BFD667F59A5DFC3421B080AFA9FD11372FA4D8ED4B92DDB06618068670C8D70D888F0F920368DEBF753D54B9D17EB8F5B99D3C218157E6DE1224FE1079B1310CD71CDC95D4C759E9E68270F5486B57F320A952A00ABDEE72AFE34F33BDE68108B394C76F94DE299FA9A65FAF2570778D81A25C29240E75CD593027F7DA1CB9DCC5F0850336E754164936" />
</GeneralGloCiphering>

bernhard

3 years 7 months ago

Thanks. I will reach out to

Thanks. I will reach out to them.
You provide excellent and timely support as always.
Let me know if you have a donation page/address.

bernhard

3 years 6 months ago

Thanks Mikko.

Thanks Mikko.
I now have unencrypted data (below are five lines).

the smartmeter-datacollector package from github is partially parsing this. I will try and make sense of this now.

7ea08bceff0313eee1e6e700e0400001000077db084c475a6772a48a93820167300003b13dcf83dd687b5ef53c5b81bffbef1bcb55dccc9b5b3e5dec9afa40272cedb6eb59c6c878fed8f641fff6cdbed028707279d4b3788697bd4eac74b07c848273b1ff14365e868c472fe1a3c113db62b6a054aaea962088ea941756896a84370f650a5c757985a17d697e
7ea08bceff0313eee1e6e700e0400001000077db084c475a6772a48a93820167300003b14935ee2c0cfb090e2cf279ddad3c4769028b85ac0d00eef9dfb8554730f71fa27d293b07ae9825e806741d2f5a780441db21ee4bb153cfa49307d4aa1a4e70d5042ddfe79a1a7d057bf1b35af19852117682b229b69262941ffc1484433db38fecbef7ab944e306f7e
7ea08bceff0313eee1e6e700e0400001000077db084c475a6772a48a93820167300003b155d2f2f7be6598cdcc2e2f9c14a17423818fc88bbba6b20f0923332664d66c13d8d4808a41d263757c3161c0123cc2dcd536c141b3d7d72d3ceb266e58e763b45a0ad89bcc1013bede829310734c4561a3e43b0dd1573faa737edb56e386b58585c6da8cbb043a387e
7ea08bceff0313eee1e6e700e0400001000077db084c475a6772a48a93820167300003b1611cda0977307561bb06b9f62fdc9bf6b4746160b2e7a0c6a21446cd0fea618f04f445527b8c8050354a1bbf5c6d7095d0ddf9030d8ca7b66565d3f5ec5b202f070b8c32224cd60892413739f286e63378b78df7354afe44d1c4614787efbcbde840696632a14e457e
7ea08bceff0313eee1e6e700e0400001000077db084c475a6772a48a93820167300003b16d46bc2e379157e1b9532f9fea80ca9962c5f7e6c5d61281296d0e257d98219efacaef1db64cf616f514648f3e2f2983e69aa0e8c3240883157bb6e04552ae5e5cd5f259f69f7cdefe136f793f20af2b3335b8f79f9541e6a5cdf83981771893a0f70504caaf509c7e

Image
Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

Your meter is sending only the first block and the "Last block" value is false, so there should be more data coming, or then there is an issue on the meter and the Last block is not set. Do you know how many objects there should be on the push message?

BR,
Mikko

bernhard

3 years 6 months ago

Hi

Hi

Actually, things are working fine now.
here is the log from the smartmeter-datacollector
https://gist.github.com/kafisatz/c347b19b5d0abac58345ddab880b1659

Maybe the hex data in my previous message was incomplete (sorry about that).

But can you please tell me how you know that there will be 'more data'?
clearly the smartmeter-datacollector is aware of this as well: there are always three messages which are concatenated (e.g. line 13).

Interestingly my meter is only sending the tariff information ("Active Energy + Tariff 1") once per minute. All other data is sent every 5 seconds though.

THANK YOU!

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

This is quite complicated, but HDLC framing will tell if there are more frames available. After all the frames are received the PDU will tell if there are more blocks left.

https://www.gurux.fi/GuruxDLMSTranslator?translate=7ea08bceff0313eee1e6…
BR,
Mikko

  • 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