Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Node
  3. The Client Example

The client example

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Lukáš Cu , 3 December, 2021
Forums
Gurux DLMS for Java

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.

Any help would be appreciated. Thank you.

Profile picture for user Kurumi

Kurumi

4 years 11 months ago

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

Lukáš Cu

4 years 11 months ago

I have already solved the

I have already solved the issue. But thank you very much. The repository is a great one.

Profile picture for user Kurumi

Kurumi

4 years 11 months ago

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

Sandeep Shaw

4 years 8 months ago

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

Profile picture for user Kurumi

Kurumi

4 years 8 months ago

In reply to Using the below code to write by Sandeep Shaw

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

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101
  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202

New forum topics

  • Need RJ45 pin configuration for Saral 300 and Saral 305 Secure meters
  • Query Regarding Class 63 Status Mapping Support in Gurux DLMS Python
  • Inhemeter
  • DLMS Server - Profile Generic - can't add too many items to profile generic capture object - how to set maximum profile entries
  • HDLC Frames sequencing
More

Who's new

  • Asier Sierra
  • BlessyAnn
  • sravya.thota@m…
  • Diwakar
  • williamorussell
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin