I am fairly fresh in java in general.
I imported DLMS from github to eclipse and i dont get connection in the default state.
The client responds with
showhelp() function and thats it
The Readme file on github says that i need to set device parameters and alter the code further. But I have no clue where do i put those pieces of code for it to work.
The whole repository is already imported. But a step by step guide on how to actually get a DLSM connection from that point would be very very useful.
I am unable to cast GXDLMSObject to GXDLMSAutoAnswer getting the below error even though I am connected to the meter
java.lang.NullPointerException: null cannot be cast to non-null type
Hi Lukáš,
Hi Lukáš,
If one of DLMS parameters is wrong the meter doesn't reply. Unfortunately, parameters depend on the meter and manufacturer.
Try to set TCP/P port or serial port as a parameter and let's hope that meter is using the default parameters.
You can give TCP parameters like:
-h YOUR_METER_IP_ADDRESS - p METER_PORT
and serial port like:
-P COM1
BR,
Mikko
I have already solved the
I have already solved the issue. But thank you very much. The repository is a great one.
Hi,
Hi,
Thank you for letting me know. I'm sorry about the slow reply but yesterday was Finland's Independence Day and it was a public holiday.
BR,
Mikko
Using the below code to write
Using the below code to write time into the Meter
val item: GXDLMSAutoAnswer =
settings.client.objects.findByLN(ObjectType.AUTO_ANSWER,"0.0.1.0.0.255" )
item.listeningWindow.add(
AbstractMap.SimpleEntry<GXDateTime, GXDateTime>(
GXDateTime(-1, -1, -1, 6, -1, -1, -1),
GXDateTime(-1, -1, -1, 8, -1, -1, -1)
)
)
val mData = settings.client.write(item, 2)
for(i in 0 until mData.size){
reader?.readDLMSPacket(mData.get(i), GXReplyData())
}
I am unable to cast GXDLMSObject to GXDLMSAutoAnswer getting the below error even though I am connected to the meter
java.lang.NullPointerException: null cannot be cast to non-null type
Please help
Thanks in Advance
Dear Sandeep Shaw,
Dear Sandeep Shaw,
Create a new topic if you have a new question.
http://gurux.fi/ForumRules
Create a new topic and I'll answer your question there.
BR,
Mikko