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. Forums
  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 6 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 6 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 6 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 4 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 4 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, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin