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. OBIS For Gurux DLMS Server

OBIS for Gurux DLMS Server

Profile picture for user alfathaff
By alfathaff , 30 January, 2024
Forums
Gurux DLMS for Java

Hi,
How to add a new OBIS in Gurux DLMS Server Example Java? I plan to add several OBIS that can be read by a net client. Could you please provide a step-by-step guide?
Thank you very much.

Profile picture for user Kurumi

Kurumi

2 years 4 months ago

Hi, Check the server example…

Hi,

Check the server example from the GitHub.
https://github.com/Gurux/gurux.dlms.java/tree/master/gurux.dlms.server…

Then read this to get started:
https://www.gurux.fi/Gurux.DLMS.Server

BR,
Mikko

Profile picture for user alfathaff

alfathaff

2 years 4 months ago

Hi, So, I want to add a new…

Hi,

So, I want to add a new object named DCU_ID with OBIS = 0.0.96.1.0.255 along with its index value.

I have tried to add the code:
void addDcuIdObject() {
if (getItems().findByLN(ObjectType.DATA, "0.0.96.1.0.255") == null) {
GXDLMSData dcuId = new GXDLMSData("0.0.96.1.0.255");
dcuId.setValue(0);
dcuId.setDataType(2, DataType.UINT32);
dcuId.setValue(0);

getItems().add(dcuId);
}
}

And I also placed addDcuIdObject(); inside the boolean init(final String port) throws XMLStreamException, IOException {.

However, the DCU ID doesn't appear when the server is read. What should I do to add a new object with OBIS and its index value?

Profile picture for user Kurumi

Kurumi

2 years 4 months ago

Hi, At first check that you…

Hi,

At first check that you are not reading old association from the file.

https://github.com/Gurux/gurux.dlms.java/blob/01ec9ce61fc60416f7ac5b468…

You can comment this if you don't want to save settings.

If you are using GXDLMSDirector as a client you need to read the association view again by selecting "File" and "Refresh".

BR,
Mikko

Profile picture for user alfathaff

alfathaff

2 years 4 months ago

Hi, I sincerely apologize as…

Hi, I sincerely apologize as I am still a beginner in matters like this. I have tried commenting out the code, and the output is an error like this:
Gurux.DLMS.Client.Example.Net.exe -r sn -h localhost -p 4060
Standard: DLMS
Invalid count.
System.ArgumentException: Invalid count.
at Gurux.DLMS.Internal.GXCommon.GetObjectCount(GXByteBuffer data) in C:\Users\ASUS\Desktop\Project\DLMS\Gurux.DLMS.Net-master\Gurux.DLMS.Net-master\Development\Internal\GXCommon.cs:line 399

Do you have any other tips or code examples for adding objects, OBIS, and their values?

Thank you very much.

Profile picture for user Kurumi

Kurumi

2 years 4 months ago

Hi, Don't worry. DLMS is a…

Hi,

Don't worry. DLMS is a complicated protocol.

Don't use Short name referencing. Only older meters are using it anymore.
Try with this:

Gurux.DLMS.Client.Example.Net.exe -h localhost -p 4060 -t Verbose

If you have problems add a hex trace so I can check from the bytes what might be the reason.

BR,
Mikko

Profile picture for user alfathaff

alfathaff

2 years 4 months ago

Hi, I've attempted to…

Hi,
I've attempted to utilize the provided command, but unfortunately, I encountered an error as follows:

C:\Users\ASUS\Desktop\Project\DLMS\DLMSNET\Gurux.DLMS.Net-master\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\bin\Release>Gurux.DLMS.Client.Example.Net.exe -h localhost -p 4060 -t Verbose
Standard: DLMS
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 7:40:46 PM 7E A0 07 03 21 93 0F 01 7E
RX: 7:40:46 PM 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
Parsing UA reply.81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01
Parsing UA reply succeeded.
Send AARQ request
TX: 7:40:46 PM 7E A0 2B 03 21 10 FB AF E6 E6 00 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 62 1E 5D FF FF 88 55 7E
RX: 7:40:46 PM 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 02 BE 10 04 0E 08 00 06 5F 1F 04 00 42 02 00 04 00 FA 00 39 FB 7E
Parsing AARE reply61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 02 BE 10 04 0E 08 00 06 5F 1F 04 00 42 02 00 04 00 FA 00
Disconnecting from the meter.
TX: 7:40:46 PM 7E A0 07 03 21 53 03 C7 7E
RX: 7:40:46 PM 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
Connection is permanently rejected. The application context name is not supported.

Profile picture for user Kurumi

Kurumi

2 years 4 months ago

Hi, Port 4060 is for Short…

Hi,

Port 4060 is for Short name referencing. Change it for 4061 like this:

-p 4061

BR,
Mikko

Profile picture for user alfathaff

alfathaff

2 years 3 months ago

Hi, I have successfully…

Hi, I have successfully added several data objects along with their OBIS codes, and they can be read through GxDLMSDirector. However, for some data objects, the description appears as 'Invalid' and 'Ch.0 Man. spec. abstract object.' An example code for the invalid one is as follows:
void addDataHistoricalObject() {
if (getItems().findByLN(ObjectType.DATA, "0.0.98.1.0.255") == null) {
GXDLMSData dataHistorical = new GXDLMSData("0.0.98.1.0.255");
dataHistorical.setValue(1);
dataHistorical.setDataType(2, DataType.UINT8);
getItems().add(dataHistorical);
}
}

Meanwhile, for the successful ID, the code is as follows:

void addDcuIdObject() {
if (getItems().findByLN(ObjectType.DATA, "0.0.96.1.0.255") == null) {
GXDLMSData dcuId = new GXDLMSData("0.0.96.1.0.255");
dcuId.setValue(0);
dcuId.setDataType(2, DataType.UINT32);
dcuId.setAccess(2, AccessMode.READ_WRITE);
dcuId.setValue(0);
getItems().add(dcuId);
}
}

Is there any code or solution to change the data object description that appears in GXDLMSDirector?

Thank you.

Profile picture for user Kurumi

Kurumi

2 years 3 months ago

Hi, Your OBIS code is…

Hi,

Your OBIS code is invalid. E.g. 0.0.98.1.0.255 is reserved for the profile generic. You can't use it with a Data object.

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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin