I have questions about DLMS, I use the Gurux.DLMS.Net simulator to simulate the smart meter (I use the xml in the github : crystal.xml). And how to get the simulator meter data using Gurux.DLMS.Client.Example.python code?
The steps I have done as below:
I clone the Gurux.DLMS.Net from github and run the simulator as the command:
> Gurux.DLMS.Simulator.Net.exe -p 1000 -x crystal.xml -t Verbose -N 1
Is this command simulate a meter from crystal.xml?
and it print the content as below:
DLMS HDLC Logical Name simulator start in ports 1000-1000.
Waiting 1.00:00:00 before next execution.
Server address: 1
Associations:
++++++++++++++++++++++++++++
Client address: 16 Without authentication.
Conformance:
Get
MaxReceivePduSize: 832 MaxSendPduSize: 65535
And I clone the Gurux.DLMS.Python. And use the command as below
> cd Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python
> python main.py -h localhost -p 1000
Is this command connect to the simulated meter we made above using dotnet ?
gurux_dlms version: 1.0.145
gurux_net version: 1.0.19
gurux_serial version: 1.0.20
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
-------- Reading 15 0.0.40.0.0.255 Ch. 0 Current association
Index: 1 Value: 0.0.40.0.0.255
Index: 2 Value: 0.0.40.0.0.255 Ch. 0 Current association, 0.0.40.0.1.255 Ch. 0 Association #1
Index: 3 Value: 16, 1
Index: 4 Value: 96 133 116 5 8 1 1
Index: 5 Value: Conformance.GET 832 65535 6 0
Index: 6 Value: 96 133 116 5 8 2 0
Attribute7 is not readable.
Index: 8 Value: 2
Attribute9 is not readable.
-------- Reading 15 0.0.40.0.1.255 Ch. 0 Association #1
Index: 1 Value: 0.0.40.0.0.255
Index: 2 Value: 0.0.40.0.0.255 Ch. 0 Current association, 0.0.40.0.1.255
Index: 3 Value: 16, 1
Index: 4 Value: 96 133 116 5 8 1 1
Index: 5 Value: Conformance.GET 832 65535 6 0
Index: 6 Value: 96 133 116 5 8 2 0
Attribute7 is not readable.
Index: 8 Value: 2
Attribute9 is not readable.
DisconnectRequest
Ended. Press any key to continue.
How can I get specific content or value using obis code in this project(Gurux.DLMS.Client.Example.python main.py)?
I'm not so familiar with this protocol(Still study). Can you bring some example code demo how to use the functionality about "Get". And the meter data from the simulator above.(crystal.xml)
Thank you very much.
Hi, You can use the sameā¦
Hi,
You can use the same command line arguments with Python. If you know what you want to read, you can also add objects manually. Like this:
obj = GXDLMSRegister("Logical name or your object")
#Read scaler and unit
self.read(obj, 3)
#Read value.
self.read(obj, 2)
BR,
Mikko