Reading out general data with the client address 16 (without password)
works fine but when I am using the followed command in Command prompt of Gurux.DLMS.Client.Example.python it fails.
python main.py -S COM6 -r sn -c 1 -a Low -P [Password] -t Verbose
I got this message:
-------------------------------------------
gurux_dlms version: 1.0.109
gurux_net version: 1.0.17
gurux_serial version: 1.0.17
1
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 17:02:11 7E A0 07 03 03 93 8C 11 7E
RX: 17:02:11 7E A0 07 03 03 93 8C 11 7E 7E A0 1E 03 03 73 40 CC 81 80 12 05
01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E 7E
TX: 17:02:11 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: 17:02:11 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 A8 25
03 03 30 18 6A 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 A6 AE 7E
TX: 17:02:11 7E A0 07 03 03 31 94 97 7E
RX: 17:02:11 7E A0 07 03 03 31 94 97 7E 7E A0 1B 03 03 32 9A F1 BE 10 04 0E
08 00 06 5F 1F 04 00 1C 02 20 05 DC FA 00 E2 E8 7E
DisconnectRequest
TX: 17:02:11 7E A0 07 03 03 53 80 D7 7E
RX: 17:02:11 7E A0 07 03 03 53 80 D7 7E 7E A0 1E 03 03 73 40 CC 81 80 12 05
01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E
-------------------------------------------
Is anything wrong with the command? Then when I am doing the same with the GXDLMSDirector, it works fine! (See picture)
My Hardware:
SmartMeter: Landis+Gyr E450
Optical Probe
It seems that you can establish the connection without problems. Your USB to RS-232 converter is echoing the data and for this reason you see "Invalid HDLC Frame:", but that is only a warning.
Unknown object means that Landis+Gyr is using custom manufacturer COSEM objects that are not in DLMS standard. Because the structure is unknown those objects are ignored.
Please, add plain text and not pics. Reading bytes is pain from the image. Textual data is different than in the pic. Can you add the whole trace as a text?
According to your answer the connection is correct. The errors Invalid HDLC Frame: 0x10 Expected: 0x30 I can simply ignore. This means that all data points should be read automatically. Right? --> Unfortunately the connection is closed again without reading the data points.
But even if I specify a special obis code, only an error message appears:
C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM6 -r sn -c 1 -a Low -P [Password] -t Verbose -g "0.0.42.0.0.255:0"
gurux_dlms version: 1.0.110
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
1
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 13:13:15 7E A0 07 03 03 93 8C 11 7E
RX: 13:13:15 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: 13:13:15 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: 13:13:15 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 A8 2A 03 03 30 E1 D8 61 1F A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 06 04 04 0E 01 06 04 F0 62 7E
TX: 13:13:15 7E A0 07 03 03 31 94 97 7E
RX: 13:13:16 7E A0 07 03 03 31 94 97 7E 7E A0 0B 03 03 32 3B 32 01 04 22 A3 7E
Traceback (most recent call last):
File "main.py", line 88, in main
reader.initializeConnection()
File "C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 311, in initializeConnection
self.client.parseAareResponse(reply.data)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 549, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 638, in parsePDU
cls.validateAare(settings, buff)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 624, in validateAare
tag = buff.getUInt8()
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 290, in getUInt8
value = self._data[index] & 0xFF
IndexError: bytearray index out of range
Ended. Press any key to continue.
I have now installed another laptop with raw python (3.7.0) version. I downloaded the latest version of your code from Github (with no change in the source code). Here I get exactly the same result:
Any idea?
Best regards,
Manuel
C:\Users\Michael\Desktop\Smart Meter auslesen\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM12:9600:8None1 -a Low -c 1 -r sn -P 12345678 -g "0.0.42.0.0.255:0" -t Verbose
gurux_dlms version: 1.0.110
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 10:33:10 7E A0 07 03 03 93 8C 11 7E
RX: 10:33:10 7E A0 07 03 03 93 8C 11 7E 7E A0 1E 03 03 73 40 CC 81 80 12 05 01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E 7E
TX: 10:33:10 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: 10:33:10 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 A8 25 03 03 30 18 6A 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 A6 AE 7E
TX: 10:33:10 7E A0 07 03 03 31 94 97 7E
RX: 10:33:10 7E A0 07 03 03 31 94 97 7E 7E A0 1B 03 03 32 9A F1 BE 10 04 0E 08 00 06 5F 1F 04 00 1C 02 20 05 DC FA 00 E2 E8 7E
Traceback (most recent call last):
File "main.py", line 88, in main
reader.initializeConnection()
File "C:\Users\Michael\Desktop\Smart Meter auslesen\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 311, in initializeConnection
self.client.parseAareResponse(reply.data)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 549, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\_GXAPDU.py", line 638, in parsePDU
cls.validateAare(settings, buff)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\_GXAPDU.py", line 624, in validateAare
tag = buff.getUInt8()
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 290, in getUInt8
value = self._data[index] & 0xFF
IndexError: bytearray index out of range
Ended. Press any key to continue.
C:\Users\Michael\Desktop\Smart Meter auslesen\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>
The echo was causing problems, but this is now fixed. Everything was working fine if echo + actual data was not read at the same time. Get the latest version.
Thanks for letting me know. Landis+Gyr is using custom High-level authentication. You need to add -L LGZ parameter for the client if you want to use High-level authentication.
I just tried again to get a
I just tried again to get a slightly different message.
Unknown object : 30035 52640
Unknown object : 30307 59480
What does this mean?
Hi,
Hi,
It seems that you can establish the connection without problems. Your USB to RS-232 converter is echoing the data and for this reason you see "Invalid HDLC Frame:", but that is only a warning.
Unknown object means that Landis+Gyr is using custom manufacturer COSEM objects that are not in DLMS standard. Because the structure is unknown those objects are ignored.
BR,
Mikko
Unknown object
Many thanks for your help :)
Many thanks for your help :)
OK so that means that everything works?
Then why don't I see any data? Even if I specify an ObisCode.
python main.py -S COM6 -r sn -c 1 -a Low -P [Password] -t Verbose -g "0.0.42.0.0.255:0"
gurux_dlms version: 1.0.109
gurux_net version: 1.0.17
gurux_serial version: 1.0.17
1
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 12:47:35 7E A0 07 03 03 93 8C 11 7E
RX: 12:47:35 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
TX: 12:47:35 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: 12:47:35 01 CE 6A 7E 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 A8 2A 03 03 30 E1 D8 61 1F A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 06 04 04 0E 01 06 04 F0 62 7E
TX: 12:47:35 7E A0 07 03 03 31 94 97 7E
RX: 12:47:35 7E A0 07 03 03 31 94 97 7E 7E A0 0B 03 03 32 3B 32 01 04 22 A3 7E
Traceback (most recent call last):
File "main.py", line 88, in main
reader.initializeConnection()
File "C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 311, in initializeConnection
self.client.parseAareResponse(reply.data)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 549, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 638, in parsePDU
cls.validateAare(settings, buff)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 624, in validateAare
tag = buff.getUInt8()
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 290, in getUInt8
value = self._data[index] & 0xFF
IndexError: bytearray index out of range
Hi,
Hi,
Please, add plain text and not pics. Reading bytes is pain from the image. Textual data is different than in the pic. Can you add the whole trace as a text?
BR,
Mikko
Hi,
Hi,
Just in case run this:
pip install --upgrade gurux-dlms
I have a different version than you have.
BR,
Mikko
Hi Mikko,
Hi Mikko,
please excuse the confusion.
According to your answer the connection is correct. The errors Invalid HDLC Frame: 0x10 Expected: 0x30 I can simply ignore. This means that all data points should be read automatically. Right? --> Unfortunately the connection is closed again without reading the data points.
But even if I specify a special obis code, only an error message appears:
C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM6 -r sn -c 1 -a Low -P [Password] -t Verbose -g "0.0.42.0.0.255:0"
gurux_dlms version: 1.0.110
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
1
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 13:13:15 7E A0 07 03 03 93 8C 11 7E
RX: 13:13:15 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: 13:13:15 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: 13:13:15 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 A8 2A 03 03 30 E1 D8 61 1F A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 06 04 04 0E 01 06 04 F0 62 7E
TX: 13:13:15 7E A0 07 03 03 31 94 97 7E
RX: 13:13:16 7E A0 07 03 03 31 94 97 7E 7E A0 0B 03 03 32 3B 32 01 04 22 A3 7E
Traceback (most recent call last):
File "main.py", line 88, in main
reader.initializeConnection()
File "C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 311, in initializeConnection
self.client.parseAareResponse(reply.data)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 549, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 638, in parsePDU
cls.validateAare(settings, buff)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 624, in validateAare
tag = buff.getUInt8()
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 290, in getUInt8
value = self._data[index] & 0xFF
IndexError: bytearray index out of range
Ended. Press any key to continue.
Hi,
Hi,
Can you run this and post your Python version number?
python --version
I'm running this and get the same bytes, but everything works without problems.
BR,
Mikko
Hi,
Hi,
sure :)
My Python Version is Python 3.8.8.
Best Regards,
Manuel
Hi,
Hi,
Check that you haven't changed the source code. When I run this it works like expected.
BR,
Mikko
python main.py -h localhost -p 1000 -r sn -c 1 -s 1 -a Low -P 12345678 -g "0.0.42.0.0.255:0" -t Verbose
gurux_dlms version: 1.0.110
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 16:24:38 7E A0 07 03 03 93 8C 11 7E
RX: 16:24:38 7E A0 1E 03 03 73 40 CC 81 80 12 05 01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E 7E
TX: 16:24:38 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
RX: 16:24:38 7E A8 25 03 03 30 18 6A 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 A6 AE 7E
TX: 16:24:38 7E A0 07 03 03 31 94 97 7E
RX: 16:24:38 7E A0 1B 03 03 32 9A F1 BE 10 04 0E 08 00 06 5F 1F 04 00 1C 02 20 05 DC FA 00 E2 E8 7E
TX: 16:24:38 7E A0 11 03 03 52 32 4E E6 E6 00 05 01 02 FA 08 18 9E 7E
...
Hi Mikko,
Hi Mikko,
I have now installed another laptop with raw python (3.7.0) version. I downloaded the latest version of your code from Github (with no change in the source code). Here I get exactly the same result:
Any idea?
Best regards,
Manuel
C:\Users\Michael\Desktop\Smart Meter auslesen\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM12:9600:8None1 -a Low -c 1 -r sn -P 12345678 -g "0.0.42.0.0.255:0" -t Verbose
gurux_dlms version: 1.0.110
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 10:33:10 7E A0 07 03 03 93 8C 11 7E
RX: 10:33:10 7E A0 07 03 03 93 8C 11 7E 7E A0 1E 03 03 73 40 CC 81 80 12 05 01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E 7E
TX: 10:33:10 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: 10:33:10 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 A8 25 03 03 30 18 6A 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 A6 AE 7E
TX: 10:33:10 7E A0 07 03 03 31 94 97 7E
RX: 10:33:10 7E A0 07 03 03 31 94 97 7E 7E A0 1B 03 03 32 9A F1 BE 10 04 0E 08 00 06 5F 1F 04 00 1C 02 20 05 DC FA 00 E2 E8 7E
Traceback (most recent call last):
File "main.py", line 88, in main
reader.initializeConnection()
File "C:\Users\Michael\Desktop\Smart Meter auslesen\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 311, in initializeConnection
self.client.parseAareResponse(reply.data)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 549, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\_GXAPDU.py", line 638, in parsePDU
cls.validateAare(settings, buff)
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\_GXAPDU.py", line 624, in validateAare
tag = buff.getUInt8()
File "C:\Users\Michael\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 290, in getUInt8
value = self._data[index] & 0xFF
IndexError: bytearray index out of range
Ended. Press any key to continue.
C:\Users\Michael\Desktop\Smart Meter auslesen\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>
Hi,
Hi,
Are you running this in Windows or Linux?
BR,
Mikko
On Windows
On Windows
Hi Manuel,
Hi Manuel,
I have great news. We can repeat your error. Now when this can be repeated, it can be fixed. I'll inform you more shortly.
BR,
Mikko
Hello Mikko,
Hello Mikko,
that sounds great! Thanks again for your help!
I was beginning to think it was up to me.
Best Regards,
Manuel
Hi,
Hi,
The echo was causing problems, but this is now fixed. Everything was working fine if echo + actual data was not read at the same time. Get the latest version.
BR,
Mikko
Hi Mikko,
Hi Mikko,
wow I can only repeat myself, your support is really amazing! Thanks a lot for that! :D
With kind regards,
Manuel
Hi Mikko,
Hi Mikko,
could you pls upload the newest version of gurux-dlms in PIP?
Currently it is the Version 1.0.110.
Thank you and have a nice evening! :)
Manuel
Hi Mikko,
Hi Mikko,
i have manually updated the DLMS and python Version.
Unfortunately I still get an (different) error.
I am really sorry if I have caused you so much work today. :/
BR,
Manuel
C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM8 -r sn -c 1 -s 1 -a Low -P 12345678 -g "0.0.42.0.0.255:0" -t Verbose
gurux_dlms version: 1.0.111
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
1
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 17:29:54 7E A0 07 03 03 93 8C 11 7E
RX: 17:29:54 7E A0 07 03 03 93 8C 11 7E 7E A0 1E 03 03 73 40 CC 81 80 12 05 01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E 7E
TX: 17:29:54 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
RX: 17:29:54 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 A8 25 03 03 30 18 6A 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 A6 AE 7E
TX: 17:29:54 7E A0 07 03 03 31 94 97 7E
RX: 17:29:54 7E A0 07 03 03 31 94 97 7E 7E A0 1B 03 03 32 9A F1 BE 10 04 0E 08 00 06 5F 1F 04 00 1C 02 20 05 DC FA 00 E2 E8 7E
TX: 17:29:54 7E A0 11 03 03 52 32 4E E6 E6 00 05 01 02 FA 08 18 9E 7E
RX: 17:29:55 7E A0 11 03 03 52 32 4E E6 E6 00 05 01 02 FA 08 18 9E 7E 7E A8 75 03 03 54 2C 9A E6 E7 00 0C 01 00 01 82 01 3B 02 04 10 E7 08 12 75 4F 11 00 09 06 00 00 C7 1D 00 FF 02 04 10 D9 38 12 75 4A 11 01 09 06 00 00 C7 0D 00 FF 02 04 10 DA 48 12 75 38 11 00 09 06 00 00 C7 17 00 FF 02 04 10 DC F0 12 00 06 11 00 09 06 00 00 0E 00 02 FF 02 04 10 DC 68 12 00 06 11 00 09 06 00 00 0E 00 01 FF 02 04 10 D2 50 12 00 09 D0 42 7E
TX: 17:29:55 7E A0 07 03 03 71 90 D5 7E
RX: 17:29:55 7E A0 07 03 03 71 90 D5 7E 7E A8 72 03 03 56 1F EE 11 00 09 06 00 01 0A 00 6A FF 02 04 10 D1 C8 12 00 09 11 00 09 06 00 00 0A 00 64 FF 02 04 10 D1 40
Unknown object : 30031 59144
Unknown object : 30026 55608
Unknown object : 30008 55880
Traceback (most recent call last):
File "main.py", line 98, in main
reader.getAssociationView()
File "C:\Users\Manuel\Desktop\Serial DLMS Test\python\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 515, in getAssociationView
self.client.parseObjects(reply.data, True, False)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 732, in parseObjects
objects = self.parseSNObjects(data, onlyKnownObjects, ignoreInactiveObjects)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 687, in parseSNObjects
raise Exception("Invalid structure format.")
Exception: Invalid structure format.
Ended. Press any key to continue.
Hi,
Hi,
It's the echo that is causing this. This is fixed and tests are started. The new version is released today.
BR,
Mikko
Hi Mikko,
Hi Mikko,
when will the new version be released? :) Has that already been done and I didn't notice it?
Thank you :)
BR,
Manuel
Hi Manuel,
Hi Manuel,
I'm sorry. There was a little delay and it's still on testing. It's released today.
BR,
Mikko
Hi Mikko,
Hi Mikko,
no problem, I am glad that you help me. :)
BR,
Manuel
Hi,
Hi,
Run this and update to the version 1.0.112.
pip install --upgrade gurux-dlms
BR,
Mikko
Hi Mikko,
Hi Mikko,
unfortunately I still get an error message. What am I doing wrong?
BR,
Manuel
C:\Users\Manuel\Desktop\SmartMeter\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>python main.py -S COM8 -r sn -c 1 -s 1 -a Low -P 12345678 -g "0.0.42.0.0.255:2" -t Verbose
gurux_dlms version: 1.0.112
gurux_net version: 1.0.18
gurux_serial version: 1.0.18
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 16:20:12 7E A0 07 03 03 93 8C 11 7E
RX: 16:20:12 7E A0 07 03 03 93 8C 11 7E 7E A0 1E 03 03 73 40 CC 81 80 12 05 01 80 06 01 CA 07 04 00 00 00 01 08 04 00 00 00 01 30 7E 7E
TX: 16:20:12 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:20:12 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 A8 25 03 03 30 18 6A E6 E7 00 61 1F A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 37 41 7E
TX: 16:20:12 7E A0 07 03 03 31 94 97 7E
RX: 16:20:12 7E A0 07 03 03 31 94 97 7E 7E A0 11 03 03 32 34 2D BE 06
Traceback (most recent call last):
File "main.py", line 88, in main
reader.initializeConnection()
File "C:\Users\Manuel\Desktop\SmartMeter\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 311, in initializeConnection
self.client.parseAareResponse(reply.data)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 558, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 638, in parsePDU
cls.validateAare(settings, buff)
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\_GXAPDU.py", line 624, in validateAare
tag = buff.getUInt8()
File "C:\Users\Manuel\anaconda3\lib\site-packages\gurux_dlms\GXByteBuffer.py", line 290, in getUInt8
value = self._data[index] & 0xFF
IndexError: bytearray index out of range
Ended. Press any key to continue.
C:\Users\Manuel\Desktop\SmartMeter\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python>
Hi,
Hi,
Get version 1.0.113. This should now work for you. Let me know if you have any problems.
BR,
Mikko
Hi Mikko,
Hi Mikko,
yeah, it works like a charm! :D
Many many thanks!
BR,
Manuel
Hi,
Hi,
Thanks for letting me know. Landis+Gyr is using custom High-level authentication. You need to add -L LGZ parameter for the client if you want to use High-level authentication.
BR,
Mikko
BR,
Mikko