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.
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.
Hello
I am trying to read the current energy use via the Landis & Gyr e450 Smart Meter.
To do so, I am using a optical probe via serial over usb.
I am able to read it using:
python3 main.py -S /dev/ttyUSB0 -a None
I would expect to find the power information under: 1.1.1.8.0.255, but I can not find any information on this logical name.
Am I doing something wrong, or could it be, that this information is not released by my energy provider?
Thank you very much for your support
Marc
PS I: My energy provider told me use a password (000'0000), but this is not working with either authentication level (high or low). Could this be the root cause ?
PS II: I also tried to get the information via the GXDLMSDirector. I was able to read the energy meter but was not able to get any information on the logical name: 1.1.1.8.0.255
PIII: Please find the result I get using the above command:
pi@raspberrypi:~/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python $ python3 main.py -S /dev/ttyUSB0 -a None
gurux_dlms version: 1.0.81
gurux_net version: 1.0.17
gurux_serial version: 1.0.14
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
-------- Reading 1 0.0.43.1.3.255 Ch. 0 Invocation counter #3
Index: 1 Value: 0.0.43.1.3.255
Index: 2 Value: 0
-------- Reading 1 0.0.43.1.2.255 Ch. 0 Invocation counter #2
Index: 1 Value: 0.0.43.1.2.255
Index: 2 Value: 0
-------- Reading 17 0.0.41.0.0.255 Ch. 0 SAP Assignment
Index: 1 Value: 0.0.41.0.0.255
Index: 2 Value: (1, 'LGZ1030744337606')
-------- Reading 1 1.0.0.2.8.255 Ch. 0 Active firmware signature
Index: 1 Value: 1.0.0.2.8.255
Index: 2 Value: B1DEBD80
-------- Reading 1 0.0.43.1.0.255 Ch. 0 Invocation counter #0
Index: 1 Value: 0.0.43.1.0.255
Index: 2 Value: 0
-------- Reading 1 0.0.43.1.1.255 Ch. 0 Invocation counter #1
Index: 1 Value: 0.0.43.1.1.255
Index: 2 Value: 0
-------- Reading 1 0.0.96.1.0.255 Ch. 0 Device ID 1, manufacturing number
Index: 1 Value: 0.0.96.1.0.255
Index: 2 Value: 44337606
-------- Reading 1 1.0.0.2.0.255 Ch. 0 Active firmware identifier
Index: 1 Value: 1.0.0.2.0.255
Index: 2 Value: V931104
-------- Reading 1 0.0.0.2.0.255 Ch. 0 Active firmware identifier
Index: 1 Value: 0.0.0.2.0.255
Index: 2 Value: V931111
-------- Reading 1 0.0.42.0.0.255 Ch. 0 COSEM Logical device name
Index: 1 Value: 0.0.42.0.0.255
Index: 2 Value: LGZ1030744337606
-------- Reading 15 0.0.40.0.1.255 Ch. 0 Association #1
Index: 1 Value: 0.0.40.0.1.255
Index: 2 Value:
Index: 3 Value: 16, 1
Index: 4 Value: 2 16 756 5 8 1 1
Index: 5 Value: Conformance.GET|BLOCK_TRANSFER_WITH_GET_OR_READ 6000 125 6 0 FF FF FF FF FF FF
Index: 6 Value: 2 16 756 5 8 2 0
Error! Index: 7 Access Error : Device reports Read-Write denied.
Access Error : Device reports Read-Write denied.
Index: 8 Value: 2
Index: 9 Value: 0.0.43.0.0.255
Error! Index: 10 Access Error : Device reports Read-Write denied.
Access Error : Device reports Read-Write denied.
Index: 11 Value: (0, '')
-------- Reading 12 0.0.40.0.2.255 Ch. 0 Association #2
Index: 1 Value: 0.0.40.0.2.255
Index: 2 Value: -3808, -3264, -1024, 17392, -14688, -14824, 16168, 17528, -256, -768, 13088, 13296, -1536
Index: 3 Value: None
Index: 4 Value: 00 00 2B 00 00 FF
-------- Reading 15 0.0.40.0.0.255 Ch. 0 Current association
Index: 1 Value: 0.0.40.0.0.255
Index: 2 Value:
Index: 3 Value: 16, 1
Index: 4 Value: 2 16 756 5 8 1 1
Index: 5 Value: Conformance.GET|BLOCK_TRANSFER_WITH_GET_OR_READ 6000 125 6 0 FF FF FF FF FF FF
Index: 6 Value: 2 16 756 5 8 2 0
Error! Index: 7 Access Error : Device reports Read-Write denied.
Access Error : Device reports Read-Write denied.
Index: 8 Value: 2
Index: 9 Value: 0.0.43.0.0.255
Error! Index: 10 Access Error : Device reports Read-Write denied.
Access Error : Device reports Read-Write denied.
Index: 11 Value: (0, '')
DisconnectRequest
Ended. Press any key to continue.
Hi
Hi
In fact even I am trying to read an obis code 0.128.162.2.128.255 for my LnT meter em101+
Had lot of hick ups initially but finally got the access using the command for few selected codes
python main.py -S /dev/ttyUSB0 -d India -a Low -P <password> -c 32 -g "1.0.1.7.0.255:2;1.0.1.8.0.255:2;1.0.12.7.0.255:2;1.0.11.7.0.255:2;1.0.91.7.0.255:2;1.0.14.7.0.255:2;1.0.13.7.0.255:2"
But when tried with the one that I wanted, 0.128.162.2.128.255 it throwed an exception. (please ignore some additional display messages
python main.py -S /dev/ttyUSB0 -d India -a Low -P <password> -c 32 -g "0.128.162.2.128.255:2"
gurux_dlms version: 1.0.100
gurux_net version: 1.0.17
gurux_serial version: 1.0.15
now = 12:04:15.904371
Settings done
Authentication: Authentication.LOW
ClientAddress: 0x20
ServerAddress: 0x1
now = 12:04:15.905061
media open now = 12:04:15.907802
Standard: Standard.INDIA
conn init done now = 12:04:16.259369
association view now = 12:04:22.953159
{'client': <gurux_dlms.secure.GXDLMSSecureClient.GXDLMSSecureClient object at 0x7f390fe364e0>,
'iec': False,
'invocationCounter': None,
'media': <gurux_serial.GXSerial.GXSerial object at 0x7f390fe369e8>,
'outputFile': None,
'readObjects': [('0.128.162.2.128.255', 2)],
'trace': <TraceLevel.INFO: 4>}
Traceback (most recent call last):
File "main.py", line 127, in main
raise Exception("Unknown logical name:" + k)
Exception: Unknown logical name:0.128.162.2.128.255
Ended. Press any key to continue.
Hi,
Hi,
That logical name is not found from the association view object list. I believe that you need to use Low-level authentication. You need also to change the client address. Try with this parameter -c 17
If that still fails try with low authentication using password 00000000 (eight times zero).
BR,
Mikko
Hi,
Hi,
Please, create a new topic if you have a new question.
0.128.162.2.128.255 is not found from the association view. Check the logical name.
BR,
Mikko
Hello Mikko
Hello Mikko
Thank you very much for your support.
I tried it according to your recommendation, but had no success.
python3 main.py -S /dev/ttyUSB0 -a Low -P 00000000 -c 17
Could it be that the password they gave me is wrong ?
Please see below the response I got.
Thank you very much
Marc
PS: I also tried other passwords such as (abcdefgh, ABCDEFGH or -c 1 to -c17) with no success. In the end the smart meter did even not respond to the original request (-a None). Could it be that it is locking access after too many requests?
****************************
Response after -a Low -P 00000000 -c 17
****************************
gurux_dlms version: 1.0.81
gurux_net version: 1.0.17
gurux_serial version: 1.0.14
Authentication: Authentication.LOW
ClientAddress: 0x11
ServerAddress: 0x1
Standard: Standard.DLMS
RX: 20:58:23 7E A0 09 23 03 13 FD 38 47 0F 7E
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 104, in main
reader.readAll(settings.outputFile)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 504, in readAll
self.initializeConnection()
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 313, in initializeConnection
self.readDataBlock(self.client.aarqRequest(), reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 180, in readDataBlock
self.readDataBlock(it, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 182, in readDataBlock
self.readDLMSPacket(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 119, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 170, in readDLMSPacket2
raise e
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 149, in readDLMSPacket2
while not self.client.getData(rd, reply, notify):
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/GXDLMSClient.py", line 1109, in getData
raise ex
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/GXDLMSClient.py", line 1106, in getData
ret = GXDLMS.getData(self.settings, reply, data, notify)
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/GXDLMS.py", line 1880, in getData
cls.getPdu(settings, target)
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/GXDLMS.py", line 1617, in getPdu
raise ValueError("Invalid PDU.")
ValueError: Invalid PDU.
Ended. Press any key to continue.
Hi Marc,
Hi Marc,
You have changed the server address and I believe that is the reason. Meter is not replying at all and this indicates that the server (or client) address is wrong.
BR,
Mikko
Hello Mikko,
Hello Mikko,
Thank you for our comment. I checked with my energy supplier and they responded that all should be "standard configuration".
I then searched the web and found a channel description from Landis & Gyr. In this description they describe the client AP's (which I assumed is a client in gurux) and 32 is the channel for "Data collection" and the low access password.
Using this channel and the password provided I get a very long response (124kb) with some of the information I am looking for. As this list contains a lot of codes with a "Device reports Read-Write denied" downloading takes very long and so was wondering if I can pre-store the assignments and only load the codes I am interested.
I tried to store the assignments using
-o device.xml
parameter, but the tool is not saving a file with the assignments.
Only using the
-g "1.1.2.8.2.255:2"
helped to reduce the timing a bit.
Do you have an Idea on how I could speed this up (storing the assignments).
Thank you very much for your support.
Marc
PS: After trying different
PS: After trying different options, I realize that there is failure occurring before the assignments are saved.
The following error is occurring (if needed I can poste the full dump, but it is very long):
-------- Reading 7 0.0.99.98.15.255 Ch. 0 Event log #16
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 104, in main
reader.readAll(settings.outputFile)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 518, in readAll
self.getProfileGenerics()
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 455, in getProfileGenerics
entriesInUse = self.read(it, 7)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 324, in read
self.readDataBlock(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 182, in readDataBlock
self.readDLMSPacket(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 119, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 173, in readDLMSPacket2
raise GXDLMSException(reply.error)
gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports Read-Write denied.
Ended. Press any key to continue.
Hi,
Hi,
If you add -o device.xml -g "1.1.2.8.2.255:2" parameters association view is read from the file and only that one object is read.
Your meter is not supporting entries in use parameter. You can comment that and read data using readRowsByRange method.
BR,
Mikko
Hello Mikko
Hello Mikko
I tried as you mentioned :
python3 main.py -S /dev/ttyUSB0 -a Low -P 00000000 -c 32 -o device.dat -g "1.1.1.8.1.255:2"
but the response is still a failure message, triggered by Line 102 in main.py during the following command:
settings.client.objects.save(settings.outputFile)
Do you have any idea ? Please find below the full response
Thank you very much
BR
Marc
gurux_dlms version: 1.0.101
gurux_net version: 1.0.17
gurux_serial version: 1.0.14
Authentication: Authentication.LOW
ClientAddress: 0x20
ServerAddress: 0x1
Standard: Standard.DLMS
Unknown object : 30035 0.0.199.35.0.255
Unknown object : 30040 0.0.94.33.14.255
Unknown object : 90 0.0.29.0.0.255
Unknown object : 92 0.0.29.2.0.255
Unknown object : 91 0.0.29.1.0.255
Unknown object : 30031 0.0.199.29.0.255
Unknown object : 30026 0.0.199.13.0.255
Unknown object : 30008 0.0.199.23.0.255
Unknown object : 30016 0.0.199.16.0.255
Unknown object : 30034 0.0.199.34.0.255
Unknown object : 30033 0.0.199.33.0.255
Unknown object : 30003 0.0.199.0.0.255
Unknown object : 30002 0.0.199.1.6.255
Unknown object : 30028 0.0.199.1.200.255
Unknown object : 30002 0.0.199.1.5.255
Unknown object : 30002 0.0.199.1.4.255
Unknown object : 30002 0.0.199.1.3.255
Unknown object : 30002 0.0.199.1.2.255
Unknown object : 30021 0.0.199.1.1.255
Unknown object : 30001 0.0.199.12.8.255
Unknown object : 30001 0.0.199.12.7.255
Unknown object : 30001 0.0.199.12.5.255
Unknown object : 30001 0.0.199.12.4.255
Unknown object : 30001 0.0.199.12.3.255
Unknown object : 30001 0.0.199.12.2.255
Unknown object : 30001 0.0.199.12.1.255
Unknown object : 30001 0.0.199.12.0.255
Unknown object : 30000 0.0.199.12.6.255
Unknown object : 30025 0.0.199.9.0.255
Unknown object : 30009 0.0.199.8.0.255
Unknown object : 30012 0.0.199.2.1.255
Unknown object : 30038 0.0.199.2.0.255
Unknown object : 30010 0.0.199.3.0.255
Unknown object : 30020 0.0.199.19.0.255
Unknown object : 30098 0.0.199.22.0.255
Unknown object : 30098 0.0.199.22.1.255
Unknown object : 30037 0.0.199.40.0.255
Unknown object : 30059 0.0.199.42.0.255
Index: 2 Value: 5648433
Traceback (most recent call last):
File "main.py", line 102, in main
settings.client.objects.save(settings.outputFile)
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/objects/GXDLMSObjectCollection.py", line 154, in save
it.save(writer)
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/objects/GXDLMSMBusClient.py", line 386, in save
writer.writeElementString("EncryptionKeyStatus", self.encryptionKeyStatus)
File "/home/pi/.local/lib/python3.7/site-packages/gurux_dlms/objects/GXXmlWriter.py", line 87, in writeElementString
raise ValueError("Datatype is enum.")
ValueError: Datatype is enum.
DisconnectRequest
Ended. Press any key to continue.
Hi,
Hi,
I create an issue from this.
http://gurux.fi/node/18227
The new version is released today where this is fixed.
BR,
Mikko
Hi,
Hi,
Get the latest version (102).
BR,
Mikko
Hello Mikko
Hello Mikko
The latest fix was helping a lot. Thank you.
In addition I found an error in when I was using more than one code to read:
Using:
-g "1.1.1.8.1.255:2;1.1.1.8.1.255:1"
Yielded an Error:
Traceback (most recent call last):
File "main.py", line 75, in main
ret = settings.getParameters(args)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXSettings.py", line 196, in getParameters
raise ValueError("Invalid Logical name or attribute index.")
ValueError: Invalid Logical name or attribute index.
Which I could fix:
in the File: GXSetting.py, Line 192 is
for o in it.value.split(";,"):
and should be (the comma need to be deleted, otherwise the split is not working):
for o in it.value.split(";"):
Best regards
Marc