when reading out Landis + Gyr 2G or 4G meters like E350 2G 4G and E570 2G 4G, an error message occurs when exporting the XML Assoation View.
I use the Gurux.DLMS.Client.Example.python example with the following arguments:
python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml
Is the error on my end, or is it really a bug in the Python Gurux Framework?
Thanks in advance for your help!
Best regards,
Manuel
TX: 09:30:25 7E A0 44 03 03 52 73 F5 E6 E6 00 05 01 04 0D 50 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E6 08 0B 04 00 00 00 00 FF 88 00 09 0C 07 E6 08 0B 04 09 00 00 00 FF 88 00 01 00 F6 82 7E
Invalid HDLC Frame: 0x52 Expected: 0x54
Invalid HDLC Frame: 0x52 Expected: 0x54
RX: 09:30:25 7E A0 44 03 03 52 73 F5 E6 E6 00 05 01 04 0D 50 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E6 08 0B 04 00 00 00 00 FF 88 00 09 0C 07 E6 08 0B 04 09 00 00 00 FF 88 00 01 00 F6 82 7E 7E A0 11 03 03 54 04 2B E6 E7 00 0C 01 00 01 00 F9 F1 7E
-------- Reading 7 12400 Ch. 0 Event log #19
TX: 09:30:25 7E A0 11 03 03 74 06 0A E6 E6 00 05 01 02 30 A0 80 80 7E
Invalid HDLC Frame: 0x74 Expected: 0x76
RX: 09:30:25 7E A0 11 03 03 74 06 0A E6 E6 00 05 01 02 30 A0 80 80 7E 7E A0 14 03 03 76 43 47 E6 E7 00 0C 01 00 06 00 00 00 00 EA 83 7E
TX: 09:30:25 7E A0 11 03 03 96 1A CE E6 E6 00 05 01 02 30 A8 C8 0C 7E
Invalid HDLC Frame: 0x96 Expected: 0x98
Invalid HDLC Frame: 0x96 Expected: 0x98
RX: 09:30:25 7E A0 11 03 03 96 1A CE E6 E6 00 05 01 02 30 A8 C8 0C 7E 7E A0 14 03 03 98 33 49 E6 E7 00 0C 01 00 06 00 00 00 A9 21 BB 7E
Entries: 0/169
DisconnectRequest
TX: 09:30:25 7E A0 07 03 03 53 80 D7 7E
RX: 09:30:25 7E A0 07 03 03 53 80 D7 7E 7E A0 09 03 03 73 C0 58 47 0F 7E
Traceback (most recent call last):
File "main.py", line 112, in main
reader.readAll(settings.outputFile)
File "C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 539, in readAll
self.client.objects.save(outputFile)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSObjectCollection.py", line 157, in save
it.save(writer)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSNtpSetup.py", line 262, in save
writer.writeElementString("ClientKey", GXByteBuffer.toHex(self.clientKey, False))
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 556, in toHex
count = len(self) - index
TypeError: object of type 'NoneType' has no len()
Ended. Press any key to continue.
Remove old association and read it again. If it fails, add the hex trace to https://textbin.net/ and post the address here. I need the whole hex trace to solve this.
The default value was missing and this is now fixed. Upgrade to version 1.0.131.
Your meter is also using an invalid communication speed value (10) for modem configuration. DLMS standard defines that values are from zero to nine.
You need to modify this for the XML file if the read fails.
thanks again for your help. Regarding modem settings, this is really weird. If I change it, then reading works.
Now when I want to read an certain ObisCode like "0.0.96.1.0.255:2", then I will get the right result but the following error message comes when saving the default settings into the file:
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
gurux_dlms version: 1.0.131
gurux_net version: 1.0.18
gurux_serial version: 1.0.19
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 16:43:16 7E A0 07 03 03 93 8C 11 7E
RX: 16:43:16 7E A0 07 03 03 93 8C 11 7E 7E A0 20 03 03 73 F0 2E 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 16:43:16 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E
Invalid HDLC Frame: 0x10 Expected: 0x30
Invalid HDLC Frame: 0x10 Expected: 0x30
RX: 16:43:16 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E 7E A0 37 03 03 30 EF CA E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 18 02 20 17 70 FA 00 1A C2 7E
TX: 16:43:16 7E A0 11 03 03 32 34 2D E6 E6 00 05 01 02 CB C0 26 7B 7E
Invalid HDLC Frame: 0x32 Expected: 0x52
Invalid HDLC Frame: 0x32 Expected: 0x52
RX: 16:43:16 7E A0 11 03 03 32 34 2D E6 E6 00 05 01 02 CB C0 26 7B 7E 7E A0 19 03 03 52 EA AB E6 E7 00 0C 01 00 09 08 35 36 37 36 30 38 38 36 E3 92 7E
Index: 2 Value: 35 36 37 36 30 38 38 36
Traceback (most recent call last):
File "main.py", line 110, in main
settings.client.objects.save(settings.outputFile)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSObjectCollection.py", line 160, in save
it.save(writer)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 298, in save
writer.writeElementString("ObjectType", int(k.objectType))
AttributeError: 'NoneType' object has no attribute 'objectType'
Ended. Press any key to continue.
The reason for modem settings is the value 10 is invalid (out of range) and it will cause the exception.
Value 10 is not in the DLMS standard. I don't know if is L+G's special value.
Serialization failed because the capture object was serialized after the push object. This is now fixed.
Get version 1.0.132.
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
Traceback (most recent call last):
File "main.py", line 39, in <module>
from gurux_dlms.enums import ObjectType
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\__init__.py", line 41, in <module>
from ._GXAPDU import _GXAPDU
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXAPDU.py", line 48, in <module>
from .AesGcmParameter import AesGcmParameter
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\AesGcmParameter.py", line 35, in <module>
from .objects.enums.SecuritySuite import SecuritySuite
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\__init__.py", line 93, in <module>
from .GXDLMSPushSetup import GXDLMSPushSetup
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 42, in <module>
from .._GXObjectFactory import _GXObjectFactory
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXObjectFactory.py", line 73, in <module>
from .objects.GXDLMSPushSetup import GXDLMSPushSetup
ImportError: cannot import name 'GXDLMSPushSetup' from 'gurux_dlms.objects.GXDLMSPushSetup' (C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py)
-------------------------------------
When I remove the line "from .._GXObjectFactory import _GXObjectFactory" in GXDLMSPushSetup.py", I get:
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
gurux_dlms version: 1.0.132
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 08:19:47 7E A0 07 03 03 93 8C 11 7E
RX: 08:19:47 7E A0 07 03 03 93 8C 11 7E 7E A0 20 03 03 73 F0 2E 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 08:19:47 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E
Invalid HDLC Frame: 0x10 Expected: 0x30
Invalid HDLC Frame: 0x10 Expected: 0x30
RX: 08:19:47 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E 7E A0 37 03 03 30 EF CA E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 18 02 20 17 70 FA 00 1A C2 7E
Failed to load object 44248 Ch. 11 Push setup name '_GXObjectFactory' is not defined
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
I have been working with your framework for some time now. I am aware that I have a lot of questions. I would be interested in a paid membership. How do I get it?
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>py -3.7 main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
Traceback (most recent call last):
File "main.py", line 39, in <module>
from gurux_dlms.enums import ObjectType
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\__init__.py", line 41, in <module>
from ._GXAPDU import _GXAPDU
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXAPDU.py", line 48, in <module>
from .AesGcmParameter import AesGcmParameter
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\AesGcmParameter.py", line 35, in <module>
from .objects.enums.SecuritySuite import SecuritySuite
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\__init__.py", line 93, in <module>
from .GXDLMSPushSetup import GXDLMSPushSetup
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 42, in <module>
from .._GXObjectFactory import _GXObjectFactory
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXObjectFactory.py", line 73, in <module>
from .objects.GXDLMSPushSetup import GXDLMSPushSetup
ImportError: cannot import name 'GXDLMSPushSetup' from 'gurux_dlms.objects.GXDLMSPushSetup' (C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py)
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>py -3.9 main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
Traceback (most recent call last):
File "C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\main.py", line 39, in <module>
from gurux_dlms.enums import ObjectType
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\__init__.py", line 41, in <module>
from ._GXAPDU import _GXAPDU
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\_GXAPDU.py", line 48, in <module>
from .AesGcmParameter import AesGcmParameter
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\AesGcmParameter.py", line 35, in <module>
from .objects.enums.SecuritySuite import SecuritySuite
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\objects\__init__.py", line 93, in <module>
from .GXDLMSPushSetup import GXDLMSPushSetup
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 42, in <module>
from .._GXObjectFactory import _GXObjectFactory
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\_GXObjectFactory.py", line 73, in <module>
from .objects.GXDLMSPushSetup import GXDLMSPushSetup
ImportError: cannot import name 'GXDLMSPushSetup' from partially initialized module 'gurux_dlms.objects.GXDLMSPushSetup' (most likely due to a circular import) (C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py)
Hi,
Hi,
There is an issue on GXDLMSNtpSetup. I created an issue about this.
http://gurux.fi/node/20106
The new version is released tomorrow.
BR,
Mikko
Hi,
Hi,
The new version is released where this is fixed:
https://www.gurux.fi/node/20108
BR,
Mikko
Hi Mikki,
Hi Mikko,
thank you for the quick update! :)
Unfortunately, I now get the following error message:
TX: 08:59:23 7E A0 11 03 03 1E 5A C6 E6 E6 00 05 01 02 0D 80 58 A7 7E
Invalid HDLC Frame: 0x1e Expected: 0x10
Invalid HDLC Frame: 0x1e Expected: 0x10
RX: 08:59:23 7E A0 11 03 03 1E 5A C6 E6 E6 00 05 01 02 0D 80 58 A7 7E 7E A0 14 03 03 10 73 41 E6 E7 00 0C 01 00 06 00 00 2D FC 42 2D 7E
Entries: 144/11772
TX: 08:59:23 7E A0 24 03 03 30 83 2C E6 E6 00 05 01 04 0D 50 02 02 04 06 00 00 00 01 06 00 00 00 01 12 00 01 12 00 00 1B 2F 7E
Invalid HDLC Frame: 0x30 Expected: 0x32
Invalid HDLC Frame: 0x30 Expected: 0x32
RX: 08:59:23 7E A0 24 03 03 30 83 2C E6 E6 00 05 01 04 0D 50 02 02 04 06 00 00 00 01 06 00 00 00 01 12 00 01 12 00 00 1B 2F 7E 7E A0 10 03 03 32 8F 31 E6 E7 00 0C 01 01 0D A5 5A 7E
Error! Failed to read first row: Access Error : Device reports scope of access violated.
TX: 08:59:23 7E A0 44 03 03 52 73 F5 E6 E6 00 05 01 04 0D 50 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E6 08 0C 05 00 00 00 00 FF 88 00 09 0C 07 E6 08 0C 05 08 00 00 00 FF 88 00 01 00 EF 05 7E
Invalid HDLC Frame: 0x52 Expected: 0x54
Invalid HDLC Frame: 0x52 Expected: 0x54
RX: 08:59:23 7E A0 44 03 03 52 73 F5 E6 E6 00 05 01 04 0D 50 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E6 08 0C 05 00 00 00 00 FF 88 00 09 0C 07 E6 08 0C 05 08 00 00 00 FF 88 00 01 00 EF 05 7E 7E A0 11 03 03 54 04 2B E6 E7 00 0C 01 00 01 00 F9 F1 7E
-------- Reading 7 12400 Ch. 0 Event log #19
TX: 08:59:23 7E A0 11 03 03 74 06 0A E6 E6 00 05 01 02 30 A0 80 80 7E
Invalid HDLC Frame: 0x74 Expected: 0x76
RX: 08:59:23 7E A0 11 03 03 74 06 0A E6 E6 00 05 01 02 30 A0 80 80 7E 7E A0 14 03 03 76 43 47 E6 E7 00 0C 01 00 06 00 00 00 00 EA 83 7E
TX: 08:59:23 7E A0 11 03 03 96 1A CE E6 E6 00 05 01 02 30 A8 C8 0C 7E
Invalid HDLC Frame: 0x96 Expected: 0x98
Invalid HDLC Frame: 0x96 Expected: 0x98
RX: 08:59:24 7E A0 11 03 03 96 1A CE E6 E6 00 05 01 02 30 A8 C8 0C 7E 7E A0 14 03 03 98 33 49 E6 E7 00 0C 01 00 06 00 00 00 A9 21 BB 7E
Entries: 0/169
DisconnectRequest
TX: 08:59:24 7E A0 07 03 03 53 80 D7 7E
RX: 08:59:24 7E A0 07 03 03 53 80 D7 7E 7E A0 09 03 03 73 C0 58
Traceback (most recent call last):
File "main.py", line 112, in main
reader.readAll(settings.outputFile)
File "C:\Users\Manuel\Desktop\Neuer Ordner (3)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 539, in readAll
self.client.objects.save(outputFile)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSObjectCollection.py", line 158, in save
str_ = minidom.parseString(ET.tostring(objects, encoding='utf-8', method='xml')).toprettyxml(indent=" ")
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\xml\dom\minidom.py", line 1968, in parseString
return expatbuilder.parseString(string)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\xml\dom\expatbuilder.py", line 925, in parseString
return builder.parseString(string)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\xml\dom\expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 3828
Ended. Press any key to continue.
Hi,
Hi,
Remove old association and read it again. If it fails, add the hex trace to https://textbin.net/ and post the address here. I need the whole hex trace to solve this.
BR,
Mikko
textbin.net always brings an
textbin.net always brings an internal error when uploading the text file. Also, the antivirus alerts me.
TX: 09:06:15 7E A0 07 03 03
.
Sry for the long comment -
Sry for the long comment - just remove it, if you dont need it anymore.
Link for the logfile: http:/
Link for the logfile: http://gofile.me/68Q6S/BgmCA3AJl
Hi,
Hi,
Got it. I can check this on Monday.
BR,
Mikko
Thanks!
Thanks!
Have a nice weekend! :)
Hello Mikko,
Hello Mikko,
have you already found the problem? :) How can I help you?
Best regards,
Manuel
Hi Manuel,
Hi Manuel,
Your meter is returning an invalid value for the Push destination and that is causing the issue.
This is fixed and the new version is released today.
BR,
Mikko
Hello Mikko,
Hello Mikko,
saving the file works now. Reading unfortunately still makes trouble.
Could you please check again?
Thanks a lot!
Here the error message:
TX: 11:39:28 7E A0 07 03 03 93 8C 11 7E
RX: 11:39:28 7E A0 07 03 03 93 8C 11 7E 7E A0 20 03 03 73 F0 2E 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 11:39:28 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E
Invalid HDLC Frame: 0x10 Expected: 0x30
Invalid HDLC Frame: 0x10 Expected: 0x30
RX: 11:39:28 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E 7E A0 37 03 03 30 EF CA E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1
03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 18 02 20 17 70 FA 00 1A C2 7E
TX: 11:39:28 7E A0 11 03 03 32 34 2D E6 E6 00 05 01 02 FF 08 A0 E0 7E
Invalid HDLC Frame: 0x32 Expected: 0x52
Invalid HDLC Frame: 0x32 Expected: 0x52
RX: 11:39:29 7E A0 11 03 03 32 34 2D E6 E6 00 05 01 02 FF 08 A0 E0 7E 7E A0 18 03 03 52 51 B7 E6 E7 00 0C 01 00 09 07 56 35 34 31 31 31 31 8B 7E 7E
TX: 11:39:29 7E A0 11 03 03 54 04 2B E6 E6 00 05 01 02 FF 10 69 7C 7E
Invalid HDLC Frame: 0x54 Expected: 0x74
Invalid HDLC Frame: 0x54 Expected: 0x74
RX: 11:39:29 7E A0 11 03 03 54 04 2B E6 E6 00 05 01 02 FF 10 69 7C 7E 7E A0 20 03 03 74 4F 5A E6 E7 00 0C 01 00 09 0F 56 35 34 2E 31 31 2E 30 39 2E 31 31 2E 30 39 61 9C 7E
Load: meter_association/LG_V541111.xml
read GXDLMSObjectCollection
Traceback (most recent call last):
File "c:\Users\Manuel\Documents\main.py", line 127, in connect
self.loadFirmwareSpecificObjectsData()
File "c:\Users\Manuel\Documents\main.py", line 162, in loadFirmwareSpecificObjectsData
c = GXDLMSObjectCollection.load(self.settings.outputFile)
File "c:\Users\Manuel\Documents\gurux_dlms\objects\GXDLMSObjectCollection.py", line 134, in load
obj.load(reader)
AttributeError: 'NoneType' object has no attribute 'load'
DisconnectRequest
TX: 11:39:29 7E A0 07 03 03 53 80 D7 7E
RX: 11:39:29 7E A0 07 03 03 53 80 D7 7E 7E A0 09 03 03 73 C0 58 47 0F 7E
Media closed
Traceback (most recent call last):
File "c:\Users\Manuel\Documents\main.py", line 127, in connect
self.loadFirmwareSpecificObjectsData()
File "c:\Users\Manuel\Documents\main.py", line 162, in loadFirmwareSpecificObjectsData
c = GXDLMSObjectCollection.load(self.settings.outputFile)
File "c:\Users\Manuel\Documents\gurux_dlms\objects\GXDLMSObjectCollection.py", line 134, in load
obj.load(reader)
AttributeError: 'NoneType' object has no attribute 'load'
During handling of the above exception, another exception occurred:
Hi,
Hi,
The default value was missing and this is now fixed. Upgrade to version 1.0.131.
Your meter is also using an invalid communication speed value (10) for modem configuration. DLMS standard defines that values are from zero to nine.
You need to modify this for the XML file if the read fails.
BR,
Mikko
Hi Mikko,
Hi Mikko,
thanks again for your help. Regarding modem settings, this is really weird. If I change it, then reading works.
Now when I want to read an certain ObisCode like "0.0.96.1.0.255:2", then I will get the right result but the following error message comes when saving the default settings into the file:
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
gurux_dlms version: 1.0.131
gurux_net version: 1.0.18
gurux_serial version: 1.0.19
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 16:43:16 7E A0 07 03 03 93 8C 11 7E
RX: 16:43:16 7E A0 07 03 03 93 8C 11 7E 7E A0 20 03 03 73 F0 2E 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 16:43:16 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E
Invalid HDLC Frame: 0x10 Expected: 0x30
Invalid HDLC Frame: 0x10 Expected: 0x30
RX: 16:43:16 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E 7E A0 37 03 03 30 EF CA E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 18 02 20 17 70 FA 00 1A C2 7E
TX: 16:43:16 7E A0 11 03 03 32 34 2D E6 E6 00 05 01 02 CB C0 26 7B 7E
Invalid HDLC Frame: 0x32 Expected: 0x52
Invalid HDLC Frame: 0x32 Expected: 0x52
RX: 16:43:16 7E A0 11 03 03 32 34 2D E6 E6 00 05 01 02 CB C0 26 7B 7E 7E A0 19 03 03 52 EA AB E6 E7 00 0C 01 00 09 08 35 36 37 36 30 38 38 36 E3 92 7E
Index: 2 Value: 35 36 37 36 30 38 38 36
Traceback (most recent call last):
File "main.py", line 110, in main
settings.client.objects.save(settings.outputFile)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSObjectCollection.py", line 160, in save
it.save(writer)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 298, in save
writer.writeElementString("ObjectType", int(k.objectType))
AttributeError: 'NoneType' object has no attribute 'objectType'
Ended. Press any key to continue.
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>
Hi,
Hi,
The reason for modem settings is the value 10 is invalid (out of range) and it will cause the exception.
Value 10 is not in the DLMS standard. I don't know if is L+G's special value.
Serialization failed because the capture object was serialized after the push object. This is now fixed.
Get version 1.0.132.
BR,
Mikko
Hi Mikko,
Hi Mikko,
now I get followed error-message:
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
Traceback (most recent call last):
File "main.py", line 39, in <module>
from gurux_dlms.enums import ObjectType
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\__init__.py", line 41, in <module>
from ._GXAPDU import _GXAPDU
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXAPDU.py", line 48, in <module>
from .AesGcmParameter import AesGcmParameter
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\AesGcmParameter.py", line 35, in <module>
from .objects.enums.SecuritySuite import SecuritySuite
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\__init__.py", line 93, in <module>
from .GXDLMSPushSetup import GXDLMSPushSetup
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 42, in <module>
from .._GXObjectFactory import _GXObjectFactory
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXObjectFactory.py", line 73, in <module>
from .objects.GXDLMSPushSetup import GXDLMSPushSetup
ImportError: cannot import name 'GXDLMSPushSetup' from 'gurux_dlms.objects.GXDLMSPushSetup' (C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py)
-------------------------------------
When I remove the line "from .._GXObjectFactory import _GXObjectFactory" in GXDLMSPushSetup.py", I get:
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
gurux_dlms version: 1.0.132
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 08:19:47 7E A0 07 03 03 93 8C 11 7E
RX: 08:19:47 7E A0 07 03 03 93 8C 11 7E 7E A0 20 03 03 73 F0 2E 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 08:19:47 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E
Invalid HDLC Frame: 0x10 Expected: 0x30
Invalid HDLC Frame: 0x10 Expected: 0x30
RX: 08:19:47 7E A0 44 03 03 10 65 94 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03 20 FF FF 88 81 7E 7E A0 37 03 03 30 EF CA E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 18 02 20 17 70 FA 00 1A C2 7E
Failed to load object 44248 Ch. 11 Push setup name '_GXObjectFactory' is not defined
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
Failed to load object None 'NoneType' object has no attribute 'load'
I have been working with your
I have been working with your framework for some time now. I am aware that I have a lot of questions. I would be interested in a paid membership. How do I get it?
Hi,
Hi,
It works on the test PCs without problems.
Can you run "python --version" and let me know the outcome? Are you running this in Windows or Linux?
BR,
Mikko
sure :)
sure :)
Python 3.7.0 - on Windows
I try it on another python version ant let you know
same error on python3.9
same error on python3.9
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>py -3.7 main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
Traceback (most recent call last):
File "main.py", line 39, in <module>
from gurux_dlms.enums import ObjectType
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\__init__.py", line 41, in <module>
from ._GXAPDU import _GXAPDU
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXAPDU.py", line 48, in <module>
from .AesGcmParameter import AesGcmParameter
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\AesGcmParameter.py", line 35, in <module>
from .objects.enums.SecuritySuite import SecuritySuite
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\__init__.py", line 93, in <module>
from .GXDLMSPushSetup import GXDLMSPushSetup
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 42, in <module>
from .._GXObjectFactory import _GXObjectFactory
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\_GXObjectFactory.py", line 73, in <module>
from .objects.GXDLMSPushSetup import GXDLMSPushSetup
ImportError: cannot import name 'GXDLMSPushSetup' from 'gurux_dlms.objects.GXDLMSPushSetup' (C:\Users\Manuel\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py)
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>py -3.9 main.py -S COM5 -L LGZ -r sn -i HDLC -t Verbose -a Low -c 1 -P 12345678 -o test.xml -g "0.0.96.1.0.255:2"
Traceback (most recent call last):
File "C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\main.py", line 39, in <module>
from gurux_dlms.enums import ObjectType
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\__init__.py", line 41, in <module>
from ._GXAPDU import _GXAPDU
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\_GXAPDU.py", line 48, in <module>
from .AesGcmParameter import AesGcmParameter
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\AesGcmParameter.py", line 35, in <module>
from .objects.enums.SecuritySuite import SecuritySuite
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\objects\__init__.py", line 93, in <module>
from .GXDLMSPushSetup import GXDLMSPushSetup
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py", line 42, in <module>
from .._GXObjectFactory import _GXObjectFactory
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\_GXObjectFactory.py", line 73, in <module>
from .objects.GXDLMSPushSetup import GXDLMSPushSetup
ImportError: cannot import name 'GXDLMSPushSetup' from partially initialized module 'gurux_dlms.objects.GXDLMSPushSetup' (most likely due to a circular import) (C:\Users\Manuel\AppData\Local\Programs\Python\Python39\lib\site-packages\gurux_dlms\objects\GXDLMSPushSetup.py)
C:\Users\Manuel\Desktop\Neuer Ordner (2)\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>
Hi,
Hi,
This issue can be repeated now. I'll give you more information shortly.
BR,
Mikko
Hi,
Hi,
This is now fixed. Get version 1.0.133.
BR,
Mikko
Hi Mikko,
Hi Mikko,
now it works like a charm :) Thanks!
Best regards,
Manuel