It's works now.
There is still a problem. For some reason, Description is not formed - Invalid is displayed. If I understand in code correctly, OBIS is not loading from the OBISCodes.txt file
What can be wrong?
I start with empty -d parameters (DLMS mode)
Considered Association, Scales, Units. I want to save this in xml so that later it will be easier to debug the display of the read variables.
I call the method:
MyGXDLMSObjectCollectiond.Save ("output.txt", null);
The file is saved.
Then I try to download it:
GXDLMSObjectCollection LoadCollection = GXDLMSObjectCollection.Load ("output.txt");
An error appears while reading.
What can be wrong?
File: https://drive.google.com/file/d/178N4NJUxfBBcfbKNyUt22q-dC4aqIcEI/view?…
Can you try to run this with client example? Add -o parameter and check is description correct.
Where should be no any reason why the description is not set.
I d'not understand. What should I see as a result in the client?
I will explain. My task is to get GXDLMSObjectCollection using the load from the generated file (so that you do not have to read data from the device each time, when debugging a GUI my application). It can be done? Calling the Load method as I pointed out leads to an error.
Did so:
1. I getted the latest source .Net client from GitHub
2. Compiled. I put output1.txt (rename file) in the Debug folder.
3. In Program.cs added line 56:
GXDLMSObjectCollection res12 = GXDLMSObjectCollection.Load ("output1.txt");
I launched the application - it crashed.
Am I doing the right thing? Can I load GXDLMSObjectCollection from a file like this?
Attached the file Program.cs https://drive.google.com/file/d/1sxqCudb2QyuDKnZDcRJ8oGteWkPkzXsV/view?…
I downloaded and updated the Development folder. Rebilded. I re-read the entire file again from device. Wrote a line:
GXDLMSObjectCollection res12 = GXDLMSObjectCollection.Load ("output.txt");
The application has crashed. Read file and screenshot in application https://drive.google.com/file/d/1j1CaTs0idpR4gecPdQ6TiLduv9-nAcbK/view?…
Now everything is fine. One more question.
After I read the counter variables and received the GXDLMSObjectCollection, I need to perform a specific sorting of the elements.
So far, I've changed the protected List <GXDLMSObject> Items to public List <GXDLMSObject> Items in the GXDLMSObjectCollections.cs file and did CompareTo for GXDLMSObject. This works, but I would not want to change the standard code.
Maybe there is a better solution?
Hi Ingvar,
Hi Ingvar,
I'm sorry. We have broken this on the last released version. Get the latest version.
BR,
Mikko
It's works now.
It's works now.
There is still a problem. For some reason, Description is not formed - Invalid is displayed. If I understand in code correctly, OBIS is not loading from the OBISCodes.txt file
What can be wrong?
I start with empty -d parameters (DLMS mode)
Hi,
Hi,
What OBIS code is causing problems? You must define correct sub standard. Ex:
-d India
BR,
Mikko
Considered Association,
Considered Association, Scales, Units. I want to save this in xml so that later it will be easier to debug the display of the read variables.
I call the method:
MyGXDLMSObjectCollectiond.Save ("output.txt", null);
The file is saved.
Then I try to download it:
GXDLMSObjectCollection LoadCollection = GXDLMSObjectCollection.Load ("output.txt");
An error appears while reading.
What can be wrong?
File:
https://drive.google.com/file/d/178N4NJUxfBBcfbKNyUt22q-dC4aqIcEI/view?…
Hi Ingvar,
Hi Ingvar,
Please, don't paste images. They are compressed and on your PC it looks good, but I can't read it or you if you try in different PC.
I can't access this link. You haven't given access rights to it.
BR,
Mikko
Sorry - I did not check.
Sorry - I did not check.
Image removed. Corrected the link.
https://drive.google.com/file/d/178N4NJUxfBBcfbKNyUt22q-dC4aqIcEI/view?…
Hi,
Hi,
Can you try to run this with client example? Add -o parameter and check is description correct.
Where should be no any reason why the description is not set.
BR,
Mikko
I d'not understand. What
I d'not understand. What should I see as a result in the client?
I will explain. My task is to get GXDLMSObjectCollection using the load from the generated file (so that you do not have to read data from the device each time, when debugging a GUI my application). It can be done? Calling the Load method as I pointed out leads to an error.
Hi Ingvar,
Hi Ingvar,
I tested this with client example and descriptions are correct, not invalid. Are you sure that Something is not changed in the source code?
Are you using Gurux.DLMS.dll from nuget.org? Try with that. Is the result the same?
BR,
Mikko
Did so:
Did so:
1. I getted the latest source .Net client from GitHub
2. Compiled. I put output1.txt (rename file) in the Debug folder.
3. In Program.cs added line 56:
GXDLMSObjectCollection res12 = GXDLMSObjectCollection.Load ("output1.txt");
I launched the application - it crashed.
Am I doing the right thing? Can I load GXDLMSObjectCollection from a file like this?
Attached the file Program.cs
https://drive.google.com/file/d/1sxqCudb2QyuDKnZDcRJ8oGteWkPkzXsV/view?…
Hi,
Hi,
Now I know the reason. All objects are sterilized as GXDLMSData, but your objects are registers, etc.
You need to save this file using GXDLMSObjectCollection.save method.
Then you can use GXDLMSObjectCollection.load to load it.
Collect data from the meter and then save it with GXDLMSObjectCollection.save.
BR,
Mikko
I do so.
That's exactly what I do.
GXDLMSObjectCollection res = reader.GetAssociation (StopToken);
res.Save ("output1.txt", null);
GetAssociation code:
public GXDLMSObjectCollection GetAssociation (System.Threading.CancellationTokenSource Token)
{
try
{
InitializeConnection ();
if (GetAssociationView (Token))
{
GetScalersAndUnits (Token);
GetProfileGenericColumns (Token);
}
}
finally
{
Close ();
}
return Client.Objects;
}
Hi,
Hi,
Is this a real meter or simulator? OBIS codes and object types don't match.
Can you read your meter with client example and save trace to the google.
I can check the reason on Monday.
BR,
Mikko
This is a real device -
This is a real device - chinese aMeter100.
By link logs in verbose mode.
https://drive.google.com/file/d/1d82XXpID7daoVQqKChGXpb_cPGXVOfsM/view?…
If you want, I can give access through the TCP tunnel using AnyDesk.
Hi,
Hi,
XML serializer fails with meter's null data. This is now fixed. Get the latest version.
https://www.gurux.fi/node/16091
BR,
Mikko
I downloaded and updated the
I downloaded and updated the Development folder. Rebilded. I re-read the entire file again from device. Wrote a line:
GXDLMSObjectCollection res12 = GXDLMSObjectCollection.Load ("output.txt");
The application has crashed. Read file and screenshot in application
https://drive.google.com/file/d/1j1CaTs0idpR4gecPdQ6TiLduv9-nAcbK/view?…
Hi,
Hi,
This is improved. Get the latest version.
BR,
Mikko
Now everything is fine. One
Now everything is fine. One more question.
After I read the counter variables and received the GXDLMSObjectCollection, I need to perform a specific sorting of the elements.
So far, I've changed the protected List <GXDLMSObject> Items to public List <GXDLMSObject> Items in the GXDLMSObjectCollections.cs file and did CompareTo for GXDLMSObject. This works, but I would not want to change the standard code.
Maybe there is a better solution?
Hi,
Hi,
GXDLMSObjectCollections is derived from IList. You can do it like this:
List<GXDLMSObject> tmp = client.Objects.ToList();
tmp.Sort();
BR,
Mikko
Found another error. Added a
Found another error. Added a line like this:
Client.Objects.Save (@ "c: \ 1 \ 1.xml", null);
Into the ReadAll method (screenshot below).
The startup line of such a client is as follows:
-h 127.0.0.1 -p 4061 -a HighGmac -C AuthenticationEncryption -t Verbose
The server is your Gurux.
If there is no output.txt file, then an error occurs on the ip4Setup object due to the fact that the IP address is Null
Screenshots
https://drive.google.com/uc?export=download&id=1LOTNj1ti6ZTfm8-R1lvDIYy…
https://drive.google.com/uc?export=download&id=1GLGZbZrZ6tF-pM_qdoqd5Td…
Hi,
Hi,
I can't access your Goole account. Is this GXDLMSIp4Setup or GXDLMSIp6Setup?
BR,
Mikko
damn google...I am sorry.
damn google...I am sorry.
https://drive.google.com/uc?export=download&id=1LOTNj1ti6ZTfm8-R1lvDIYy…
https://drive.google.com/uc?export=download&id=1GLGZbZrZ6tF-pM_qdoqd5Td…
GXDLMSIp4Setup
Hi,
Hi,
No worries. This is fixed and new version is released on next week.
BR,
Mikko
You have uploaded the fixed
You have uploaded the fixed version to GitHub?
Hi,
Hi,
It's now updated.
BR,
Mikko