Hello,
I am new to the DLMS protocol and I am working with the python example to get acquainted with the library and the protocol.
I am reading out a smartmeter and after I retrieved the Association view, I don't have all expected objects. I want to know the profiles, from PROFILE_GENERIC type.
However, I can read these objects in the director.
What could I be missing?
Thanks in advance!
Hi, I believe the you are…
Hi,
I believe the you are using a different authentication level if you can't see all the objects. Different authentication levels use different association views and visible objects might vary.
Select the device in GXDLMSDirector and you can see the command line parameters.
Use them and read the association view again.
BR,
Mikko
Hi Mikko, First of all,…
Hi Mikko,
First of all, thank you for your quick response.
I believe you are right but when I compare my options with the director, they seem similar.
-h 178.50.216.227 -p 4059 -i WRAPPER -c 1 -a Low -P {INSERT_PASSWORD} -t Verbose
Earlier when I was experimenting and I forgot the authentication level option -c and password I could connect but I only received 1 object, with the options -c and -P I receive 39 object. But I think my director does not have higher auth level implemented.
Could it be that I am missing Ciphering option?
With kind regards,
Robin
Hi Robin, If you add the…
Hi Robin,
If you add the first message that GXDLMSDirector sends as a hex string, I can get the correct settings for you.
BR,
Mikko
Hi Mikko, I am not sure how…
Hi Mikko,
I am not sure how and what Hex code in the director you mean?
When I connect in the Director I do not really see any HEX transmissions.
When I use the example, I get this as first message.
gurux_dlms version: 1.0.156
gurux_net version: 1.0.21
gurux_serial version: 1.0.20
Authentication: 1
ClientAddress: 0x1
ServerAddress: 0x1
Standard: 0
TX: 16:14:10 00 01 00 01 00 01 00 39 60 37 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0B 80 09 58 65 6D 65 78 32 54 4D 43 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 5D FF FF
RX: 16:14:11 00 01 00 01 00 01 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 1A 5D 04 C8 00 07
Kind regards,
Robin
Hi Robin, In GXDLMSDirector…
Hi Robin,
In GXDLMSDirector select "View", "Log" and "View Log". Now you can see the communication log.
Try to select "File" and "Refresh" in GXDLMSDirector. Can you still see all the objects that you want to see? Sometimes people add missing objects manually and that might cause problems.
BR,
Mikko
Hi Mikko, Thanks for your…
Hi Mikko,
Thanks for your explanation.
The first message when I connect with GXDirector:
GXDLMSDirector 8.1.2109.3001
Log created 10:38:50
10:38:50 Initializing Network connection.
10:38:51 Send AARQ request.
00 01 00 01 00 01 00 39 60 37 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0B 80 09 58 65 6D 65 78 32 54 4D 43 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 5D FF FF
10:38:52
00 01 00 01 00 01 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 1A 5D 04 C8 00 07
10:38:52 Parsing AARE reply succeeded.
I also tried refreshing the file. After connecting I refresh the file, it first removes all the tree items, it starts collecting objects and when it's finished It seems to have the same objects in the tree.
When looking at the example it seems that the getAssociationView() does a self.readDataBlock(self.client.getObjectsRequest(), reply), which returns and writes the objects to the client, which you can save, and load in later use.
The readScalarAndUnits, and getProfileGenerics, search for their respective objects from the association view and do their respective reading handles, if objects are present. Meaning that the association view would contain all available objects? Am I correct?
With Kind regards,
Robin
Hi Robin, Yes, you are right…
Hi Robin,
Yes, you are right. The available objects should be in the association view. Make sure that you haven't modified the source code that might explain the missing objects.
I tested this and it returned all the expected objects from the meter.
BR,
Mikko
Hi Mikko, Thanks for testing…
Hi Mikko,
Thanks for testing, but could you elaborate further on what you did and got?
I tested and compared the example with the Director. This morning I pulled the latest version. When reading the association view I get in both cases, 55 Data Blocks, they both collected 1150 objects, but the director creates 1150 objects but the example only creates 39.
when I debug the example and look at the self.client.objects, I only see a list with 39 items. which in term results in Reading scalar and units and get profile generic columns returning nothing since these objects types are not created. While the director starts reading both correctly.
It looks like parseObjects does something different in my example than in the director.
def getAssociationView(self):
reply = GXReplyData()
self.readDataBlock(self.client.getObjectsRequest(), reply)
self.client.parseObjects(reply.data, False, True)
When I compare the object request, it seems I get the same result in my example and the director:
00 01 00 01 00 01 00 0D C0 01 C1 00 0F 00 00 28 00 00 FF 02 00
My thanks in advance, also for the quick responses.
Kind regards,
Robin Niezen
Hi Robin, I just get the…
Hi Robin,
I just get the latest version from GitHub and run the Python client using meter arguments. All the objects are there.
Can you add GXDLMSDirector hex log here so I can check what your meter is returning?
BR,
Mikko
Hi, The association view is…
Hi,
The association view is usually the first object, but your meter sends it later, and that causes this problem. That also explains why this does not cause problems with other users. This is fixed to version 1.0.158.
I removed your logs so it's easier to read.
BR,
Mikko
Hi Mikko, Thanks for the…
Hi Mikko,
Thanks for the help!
It's good to know something unexpected was happening.
I will check the fix aswell!
Only version 1.0.0158 isn't available yet on pypi.
Kind regards,
Robin
Hi, It was still in testing…
Hi,
It was still in testing when I wrote this. It's now released. Try again.
BR,
Mikko
Hi MIkko, Thanks for all the…
Hi MIkko,
Thanks for all the help.
I have tested 158 on my device and now I can read the profiles and such.
Kind regards,
Robin