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. Create ACTION_SCHEDULE

Create ACTION_SCHEDULE

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 imand , 14 January, 2021
Forums
Gurux DLMS for Java

Dear Team,

I'm trying to write four schedules to a meter. But I'm getting Data Block Unavailable all the time.
I suspect it has something to do with default values inserted by GDXDateTime.

Here is the my Java code. I copied this from one of your posts.

GXReplyData reply = new GXReplyData();
GXDLMSActionSchedule ac = new GXDLMSActionSchedule("0.0.15.128.3.255");

GXTime schedule[] = { new GXTime(255, 0, 0, 0), new GXTime(255, 15, 0, 0),
new GXTime(255, 30, 0, 0), new GXTime(255, 45, 0, 0) };
ac.setExecutionTime(schedule);
try {
byte[][] result = client.write(ac, 4);
readDataBlock(result, reply);
} catch (Exception e) {
e.printStackTrace();
}

Here is the XML trace.

<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<SetRequest>
<SetRequestNormal>
<!--Priority: HIGH ServiceClass: CONFIRMED invokeID: 1-->
<InvokeIdAndPriority Value="193" />
<AttributeDescriptor>
<!--ACTION_SCHEDULE-->
<ClassId Value="22" />
<!--0.0.15.128.3.255-->
<InstanceId Value="00000F8003FF" />
<AttributeId Value="4" />
</AttributeDescriptor>
<Value>
<Array Qty="4" >
<Structure Qty="2" >
<OctetString Value="FF0000FF" />
<OctetString Value="FFFFFFFF05" />
</Structure>
<Structure Qty="2" >
<OctetString Value="FF0F00FF" />
<OctetString Value="FFFFFFFF05" />
</Structure>
<Structure Qty="2" >
<OctetString Value="FF1E00FF" />
<OctetString Value="FFFFFFFF05" />
</Structure>
<Structure Qty="2" >
<OctetString Value="FF2D00FF" />
<OctetString Value="FFFFFFFF05" />
</Structure>
</Array>
</Value>
</SetRequestNormal>
</SetRequest>
</PDU>
</WRAPPER>

A default milliseconds (hundredths) is inserted: FF. I wanted to set it to 0 but it's overwritten. How do I keep the 0?

A default week value is added to the date: 05. It should be FF. How do I change it to FF?

Thanks in advance.

Dayah

Profile picture for user Kurumi

Kurumi

5 years 4 months ago

Hi,

Hi,

There is a historical reason for this because hundredths was causing problems with some big meter manufacturers. For this reason, hundredths are skipped if it's zero.
You need to remove it by yourself. Like this:

GXTime value = new GXTime(255, 0, 0, 0);
value.getSkip().remove(DateTimeSkips.MILLISECOND);

DayOfWeek should be ignored by default when you create the time object, but it's missing from this constructor. It's added to the next version. In the meantime you can add it like this:

You can ignore week date like this:
value.getSkip().add(DateTimeSkips.DAY_OF_WEEK);

BR,
Mikko

imand

5 years 4 months ago

In reply to Hi, by Kurumi

Hi Mikko,

Hi Mikko,

That did it. I needed to set the MILLISECOND to 0 again after removing the skipping value.

<WRAPPER len="83" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<SetRequest>
<SetRequestNormal>
<!--Priority: HIGH ServiceClass: CONFIRMED invokeID: 1-->
<InvokeIdAndPriority Value="193" />
<AttributeDescriptor>
<!--ACTION_SCHEDULE-->
<ClassId Value="22" />
<!--0.0.15.128.3.255-->
<InstanceId Value="00000F8003FF" />
<AttributeId Value="4" />
</AttributeDescriptor>
<Value>
<Array Qty="4" >
<Structure Qty="2" >
<OctetString Value="FF000000" />
<OctetString Value="FFFFFFFFFF" />
</Structure>
<Structure Qty="2" >
<OctetString Value="FF0F0000" />
<OctetString Value="FFFFFFFFFF" />
</Structure>
<Structure Qty="2" >
<OctetString Value="FF1E0000" />
<OctetString Value="FFFFFFFFFF" />
</Structure>
<Structure Qty="2" >
<OctetString Value="FF2D0000" />
<OctetString Value="FFFFFFFFFF" />
</Structure>
</Array>
</Value>
</SetRequestNormal>
</SetRequest>
</PDU>
</WRAPPER>

Thank you! Really appreciated it.

I have another question regarding meter firmware version check. I will create another post for this.

Dayah

  • 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