Good afternoon,
I'm having trouble importing the project https://github.com/gurux/gurux.dlms.java in Eclipse. I tried to import straight from Github for my machine and then
I tried to run the main (GuruxSerialExampleJava.java) and appeared several errors:
Exception in thread "main" java.lang.NoClassDefFoundError: MediaStateEventArgs
at java.lang.Class.getDeclaredMethods0 (Native Method)
at java.lang.Class.privateGetDeclaredMethods (Unknown Source)
at java.lang.Class.getMethod0 (Unknown Source)
at java.lang.Class.getMethod (Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod (Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain (Unknown Source)
Caused by: java.lang.ClassNotFoundException: MediaStateEventArgs
java.net.URLClassLoader at $ 1.run (Unknown Source)
java.net.URLClassLoader at $ 1.run (Unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
at java.net.URLClassLoader.findClass (Unknown Source)
at java.lang.ClassLoader.loadClass (Unknown Source)
sun.misc.Launcher at $ AppClassLoader.loadClass (Unknown Source)
at java.lang.ClassLoader.loadClass (Unknown Source)
6 ... more
So I tried to create a new main class with the steps in the example (http://www.gurux.fi//Gurux.DLMS) and in the first step I checked the
client.setClientID methods ((byte) 0x21); client.setServerID ((byte) 0x3); do not exist in GXDLMSClient.java class. What am I doing wrong? How should I care
the library?
Grateful!
Rodrigo Lacerda Taschetto
Electrical engineer
You can use GXDLMSClient.GetData method to parse push messages. Just set correct parameters for the GXDLMSClient.
Note! you must use this method and give notify parameter.
GXDLMSClient.GetData(reply, GXReplyData data, GXReplyData notify)
So i think i need to send the push data to different IP address which i read from attribute 3 ...
if i try to print that it's printing something different...and if i try to read push objects list it's displaying error that 255 is not a valid type ...
so could u please check the trace whether it's normal ?
i guess it's meter's fault ....i got the same (255 is not a valid type) when i try to read objects for profile generic data
There is no push listener example in python ...(first lemme try with connected client)
So after setting parameters to push setup object ...how to receive push messages( for connected client) using readDLMSPacket2 function.As i am new to DLMS can u explain in detail please
You don't need to set parameters for push setup object. Just start to listen TCP/IP port and when the new connection is established parse data using GXDLMSClient.GetData method.
hi i am getting this error when i try to run gurux.dlms.server.example in java . Is there a solution
E:\New%20HES%20Project\gurux.dlms.java-master\gurux.dlms.server.example.java\target\data.csv (The system cannot find the path specified)
Exception in thread "main" java.lang.RuntimeException: E:\New%20HES%20Project\gurux.dlms.java-master\gurux.dlms.server.example.java\target\data.csv (The system cannot find the path specified)
at gurux.dlms.server.example.GXDLMSBase.addProfileGeneric(GXDLMSBase.java:505)
at gurux.dlms.server.example.GXDLMSBase.init(GXDLMSBase.java:806)
at gurux.dlms.server.example.GXDLMSBase.<init>(GXDLMSBase.java:343)
at gurux.dlms.server.example.GXDLMSServerSN.<init>(GXDLMSServerSN.java:51)
at gurux.dlms.server.example.GuruxDlmsServerExample.main(GuruxDlmsServerExample.java:128)
Please, if you have a new question create a new topic. I believe your path is causing the problems. Use an easier path. This error message is coming from java.
Hi,
Hi,
Read scaler first.
it = GXDLMSRegister("1.0.12.7.0.255")
#Read scaler
client.read(it, 3)
#Read value.
client.read(it, 2)
BR,
Mikko
How to read profile generic
How to read profile generic data for load profile...?
help me read those data
Hi,
Hi,
Something like this:
GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric("OBIS Code");
//Read capture objects
Read(pg, 3);
//Read buffer.
Read(pg, 2);
You can also use readByEntry or ReadByRange to read buffer. All meter's don't support them for all the profile generics.
BR,
Mikko
BR,
Mikko
TX: 10:28:25.715058 00 01 00
The output came like this...i added -t Verbose to the parameters.
code :
load_prof = GXDLMSProfileGeneric("1.0.99.1.0.255")
read(load_prof, 3)
print(read(load_prof, 2))
I ran the code again and i got like this:
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
TX: 11:21:16.900100 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 11:21:18.778906 00 01 00 01 00 10 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 00 10 00 D2 00 07
TX: 11:08:12.656769 00 01 00 10 00 01 00 0D C0 01 C1 00 07 01 00 63 01 00 FF 03 00
RX: 11:08:13.855233 00 01 00 01 00 10 00 1C C4 01 C1 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 00 01 60 0C 05 FF 0F 02 12 00 00
255 is not a valid DataType
Ended. Press any key to continue.
Hi,
Hi,
I have check this and meter reply is invalid.
Meter returns this:
C4 01 C1 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 00 01 60 0C 05 FF 0F 02 12 00 00
It should be this:
C4 01 C1 00 01 0F 02 12 00 00 02 04 12 00 04 09 06 00 01 60 0C 05 FF 0F 02 12 00 00
Can you ask the meter manufacturer to fix it?
BR,
Mikko
yeah i will ask them ... and
yeah i will ask them ... and how to read data using Push setup
I have the following details:
Continuation of the data
Continuation of the data
Hi,
Hi,
You can use GXDLMSClient.GetData method to parse push messages. Just set correct parameters for the GXDLMSClient.
Note! you must use this method and give notify parameter.
GXDLMSClient.GetData(reply, GXReplyData data, GXReplyData notify)
BR,
Mikko
could u pls explain through
could u pls explain through sample code in python how to set parameters and to parse push messages with an example
Hi,
Hi,
Is your meter sending push messages to the same client that has connected to the meter or is meter sending push messages to the specified IP address?
You can check this reading Push Setup Interface.
If the meter is sending push messages to a connected client, check readDLMSPacket2.
It prints received push messages to the console.
BR,
Mikko
Yeah i want the meter to push
Yeah i want the meter to push the message to connected client ...
We just have to set the parameters like this ?
pushlistener = GXDLMSPushSetup("0.0.25.9.0.255")
pushlistener.numberOfRetries = self.read(pushlistener,6)
pushlistener.repetitionDelay = self.read(pushlistener,7)
pushlistener.randomisationStartInterval = self.read(pushlistener,5)
pushlistener.communicationWindow = self.read(pushlistener,4)
pushlistener.pushObjectList = self.read(pushlistener,2)
Hi,
Hi,
You can config meter like this. Check readDLMSPacket2 to see how you can get received push messages.
BR,
Mikko
pushlistener =
pushlistener = GXDLMSPushSetup("0.0.25.9.0.255")
pushlistener.numberOfRetries = self.read(pushlistener,6)
print(pushlistener.numberOfRetries)
pushlistener.repetitionDelay = self.read(pushlistener,7)
print(pushlistener.repetitionDelay)
pushlistener.randomisationStartInterval = self.read(pushlistener,5)
print(pushlistener.randomisationStartInterval)
pushlistener.communicationWindow = self.read(pushlistener,4)
print(pushlistener.communicationWindow)
pushlistener.sendDestinationAndMethod = self.read(pushlistener,3)
print(pushlistener.sendDestinationAndMethod)
pushlistener.pushObjectList = self.read(pushlistener,2)
print(pushlistener.pushObjectList)
I tried this and got the following output ..and also i added -t Verbose to the parameters
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
TX: 10:49:29.597696 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 10:49:31.594361 00 01 00 01 00 10 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 00 10 00 D2 00 07
TX: 10:49:31.596159 00 01 00 10 00 01 00 0D C0 01 C1 00 28 00 00 19 09 00 FF 06 00
RX: 10:49:32.650626 00 01 00 01 00 10 00 06 C4 01 C1 00 11 03
3
TX: 10:49:32.651574 00 01 00 10 00 01 00 0D C0 01 C1 00 28 00 00 19 09 00 FF 07 00
RX: 10:49:34.396151 00 01 00 01 00 10 00 07 C4 01 C1 00 12 00 1E
30
TX: 10:49:34.397196 00 01 00 10 00 01 00 0D C0 01 C1 00 28 00 00 19 09 00 FF 05 00
RX: 10:49:35.561631 00 01 00 01 00 10 00 07 C4 01 C1 00 12 00 05
5
TX: 10:49:35.562739 00 01 00 10 00 01 00 0D C0 01 C1 00 28 00 00 19 09 00 FF 04 00
RX: 10:49:36.762727 00 01 00 01 00 10 00 24 C4 01 C1 00 01 01 02 02 09 0C 07 F3 FF FF 02 07 1E 00 FF 01 4A 00 09 0C 07 F3 FF FF 02 17 1E 00 FF 01 4A 00
[(<gurux_dlms.GXDateTime.GXDateTime object at 0x7f6e55562438>, <gurux_dlms.GXDateTime.GXDateTime object at 0x7f6e55562358>)]
TX: 10:49:36.764873 00 01 00 10 00 01 00 0D C0 01 C1 00 28 00 00 19 09 00 FF 03 00
RX: 10:49:38.594777 00 01 00 01 00 10 00 64 C4 01 C1 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 5E 5B 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 00 01 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 02 08 00 FF 0F 02 12 00 00 02 04 12 00 46 09 06 00 00 60 03 0A FF 0F 02 12 00 00 02 04 12 00 47 09 06 00 00 11 00 00 FF 0F 03 12 00 00
255 is not a valid DataType
Ended. Press any key to continue.
Process finished with exit code 0
So i think i need to send the push data to different IP address which i read from attribute 3 ...
if i try to print that it's printing something different...and if i try to read push objects list it's displaying error that 255 is not a valid type ...
so could u please check the trace whether it's normal ?
i guess it's meter's fault ....i got the same (255 is not a valid type) when i try to read objects for profile generic data
Hi,
Hi,
You need to define IP address and then you can start gurux.dlms.push.listener.example. It'll listen incoming messages and shows them.
Invalid type is coming because the meter is sending the wrong data type. You can invoke push message calling activate.
Something like this:
GXDLMSPushSetup push = new GXDLMSPushSetup();
byte[][] data = push.activate(client);
Then send data to the meter to activate the communication process.
BR,
Mikko
There is no push listener
There is no push listener example in python ...(first lemme try with connected client)
So after setting parameters to push setup object ...how to receive push messages( for connected client) using readDLMSPacket2 function.As i am new to DLMS can u explain in detail please
Hi,
Hi,
You don't need to set parameters for push setup object. Just start to listen TCP/IP port and when the new connection is established parse data using GXDLMSClient.GetData method.
You can get idea from java example.
BR,
Mikko
hi i am getting this error
hi i am getting this error when i try to run gurux.dlms.server.example in java . Is there a solution
E:\New%20HES%20Project\gurux.dlms.java-master\gurux.dlms.server.example.java\target\data.csv (The system cannot find the path specified)
Exception in thread "main" java.lang.RuntimeException: E:\New%20HES%20Project\gurux.dlms.java-master\gurux.dlms.server.example.java\target\data.csv (The system cannot find the path specified)
at gurux.dlms.server.example.GXDLMSBase.addProfileGeneric(GXDLMSBase.java:505)
at gurux.dlms.server.example.GXDLMSBase.init(GXDLMSBase.java:806)
at gurux.dlms.server.example.GXDLMSBase.<init>(GXDLMSBase.java:343)
at gurux.dlms.server.example.GXDLMSServerSN.<init>(GXDLMSServerSN.java:51)
at gurux.dlms.server.example.GuruxDlmsServerExample.main(GuruxDlmsServerExample.java:128)
Hi Prashanth,
Hi Prashanth,
Please, if you have a new question create a new topic. I believe your path is causing the problems. Use an easier path. This error message is coming from java.
BR,
Mikko
thanks for reply i ended up
thanks for reply i ended up solving this issue