Hi,
I'm making client in java and I got exception while reading time. LN name is 0.0.1.0.0.255 and atribute 2.
Request:
000100110001000dc001c100080000010000ff0200
Response:
0001000100110012c401c100090c07e3050f030d082bff008080
Exception:
java.lang.NullPointerException
at gurux.dlms.GXDateTime.getTimeZone(GXDateTime.java:819)
at gurux.dlms.internal.GXCommon.getDateTime(GXCommon.java:952)
at gurux.dlms.internal.GXCommon.getData(GXCommon.java:631)
at gurux.dlms.AGXDLMSClient.changeType(AGXDLMSClient.java:1316)
at gurux.dlms.AGXDLMSClient.changeType(AGXDLMSClient.java:1274)
at gurux.dlms.AGXDLMSClient.updateValue(AGXDLMSClient.java:1181)
at gurux.dlms.AGXDLMSClient.updateValue(AGXDLMSClient.java:1154)
at app.AGXDLMSReader.read(AGXDLMSReader.java:590)
at app.AGXDLMSReader.ctiVlastniObjekt(AGXDLMSReader.java:1042)
at app.NormalniKlient.ctiVybranyObjekt(NormalniKlient.java:38)
at app.NormalniKlient.lambda$0(NormalniKlient.java:64)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Unknown Source)
Any idea, what is wrong? Response is containing the time.
Received data is correct. It seems that your getTimeZone returns null. What version you are using? Are you running this in PC with standard Java? What are your language settings?
Hi,
Eclipse IDE 2018-12, Java JDK-1.8.0_191, gurux.dlsm - 2.2.26
I'm using modified readOut() method from GXDLMSReader. Only diffrent print method to JavaFX application without writeTrace method and it gets desired object to read.
Hi,
I'm trying to figure out, how the time format is made. Lot's of it make sense, but what is 03 in the middle or the last value 80. And how the + and - is represented? I guess FF is -. And the time zone I think, it is supposed to be 0100 or 0200 according to my and meters position. Max value for time zone is something like 0D3B, right?
07E3....05....0F....03....0D....08....2B....FF........00........80........80
2019......5......15.......3.....13.......8.....43....+-..........0........128.........??
YYYY..MM....DD.....??....HH..mm....ss...+-...hours minutes from UTC
Any suggestions to make a quick fix in java. Maybe ignore time zone?
Hi,
Hi,
Received data is correct. It seems that your getTimeZone returns null. What version you are using? Are you running this in PC with standard Java? What are your language settings?
BR,
Mikko
Eclipse IDE 2018-12, Java JDK
Hi,
Eclipse IDE 2018-12, Java JDK-1.8.0_191, gurux.dlsm - 2.2.26
I'm using modified readOut() method from GXDLMSReader. Only diffrent print method to JavaFX application without writeTrace method and it gets desired object to read.
https://1drv.ms/u/s!Aum8SGjyGw1nlKEl01idSGqxFfz5sQ
Hi,
Hi,
Time zone is 128 (0x80) minutes. This is not correct. Ask your manufacturer to fix it.
0001000100110012c401c100090c07e3050f030d082bff
0080 //TIME ZONE
80
BR,
Mikko
Hi,
Hi,
I'm trying to figure out, how the time format is made. Lot's of it make sense, but what is 03 in the middle or the last value 80. And how the + and - is represented? I guess FF is -. And the time zone I think, it is supposed to be 0100 or 0200 according to my and meters position. Max value for time zone is something like 0D3B, right?
07E3....05....0F....03....0D....08....2B....FF........00........80........80
2019......5......15.......3.....13.......8.....43....+-..........0........128.........??
YYYY..MM....DD.....??....HH..mm....ss...+-...hours minutes from UTC
Any suggestions to make a quick fix in java. Maybe ignore time zone?
Hi,
Hi,
If you want to ignore time zone change
07e3050f030d082bff0
080
80
to
07e3050f030d082bff
8000
80
Java is working correctly. Meter's time zone is not correct.
BR,
Mikko