Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. Com_read Getting Failed For Billing Profile and Instantaneous Profile

com_read getting failed for billing profile and instantaneous profile

By Somesh_8073, 22 May, 2025
Forums
Gurux.DLMS

hello,
below code is for to read instantaneous and billing profile - - >

void
read_meter_instantaneous_profile()
{
gxProfileGeneric profile;
char * data = NULL;
cosem_init(&profile.base, DLMS_OBJECT_TYPE_PROFILE_GENERIC, "1.0.94.91.0.255");

com_read(&profile.base, 2);

/* Read rows by entry */
com_readRowsByEntry(&profile, 1, 2);

/* Read rows by Range */
// gxtime start_time;
// gxtime end_time;
// end_time.value = 1742302940; //EPOCH time
// start_time.value = end_time.value - 1 * 60 * 60;
// com_readRowsByRange(&profile, &start_time, &end_time);

obj_toString(&profile.base, &data);
obj_clear(&profile.base);
printk("DEBUG_METER_DATA : Meter Instantaneous Profile --- %s", data);

obj_clearProfileGenericBuffer(&profile.captureObjects);
obj_clearProfileGenericBuffer(&profile.buffer);
free(data);
}

-------------------------------------------------------------------------------------------------

void
read_meter_billing_profile()
{
gxProfileGeneric profile;
char * data = NULL;
cosem_init(&profile.base, DLMS_OBJECT_TYPE_PROFILE_GENERIC, "1.0.98.1.0.255");

com_read(&profile.base, 2);

/* Read rows by entry */
com_readRowsByEntry(&profile, 1, 1);

/* Read rows by Range */
// gxtime start_time;
// gxtime end_time;
// end_time.value = 1741768215; //EPOCH time
// start_time.value = end_time.value - 1 * 60 * 60; /* 12 hours */
// com_readRowsByRange(&profile, &start_time, &end_time);

obj_toString(&profile.base, &data);
obj_clear(&profile.base);
printk("DEBUG_METER_DATA : Meter Billing --- %s", data);

obj_clearProfileGenericBuffer(&profile.captureObjects);
obj_clearProfileGenericBuffer(&profile.buffer);
free(data);
}

we are able to read,
/* Read Logical Name "0.0.42.0.0.255" */
read_logical_name();

/* Read Serial No "0.0.96.1.0.255" */
read_meter_serial_no();

/* Read Device ID "0.0.96.1.2.25" */
read_deviceID_meter();

/* Read Meter Manufacturer "0.0.96.1.1.255" */
read_meter_manufacturer();

/* Read Meter Type "0.0.94.91.9.255" */
read_meter_type();

/* Read Meter Category "0.0.94.91.11.255" */
read_meter_category();

/* Read Firmware Version "1.0.0.2.0.255" */
read_meter_firmware_version();

/* Read Manufacturing Date "0.0.96.1.4.255" */
read_meter_manufacturing_date();

/*Read clock and set micro controller to use meter time if it's not set. "0.0.1.0.0.255" */
read_meter_clock();

/* Read Meter Daily Load Profile "1.0.99.2.0.255" */
read_meter_daily_load_profile();

/* Read Meter Block Load Profile "1.0.99.1.0.255" */
read_meter_block_load_profile();
-------------------------------------------------------------

com_read is getting failed , showing Invalid Object on terminal logs,
but when i connect with DLMSDirector, able to read data for billing and instantaneous profile.

Profile picture for user Kurumi

Kurumi

3 weeks 4 days ago

Hi, Some meters don't…

Hi,

Some meters don't implement read rows by range to instantaneous and billing profile; you need to do it with a normal read.

BR,
Mikko

Somesh_8073

3 weeks 4 days ago

hi, i got stuck,since very…

hi,

i got stuck,since very long time in it.

can you just help me out with the piece of code, (how to do normal read for instantaneous and billing profile data)
so it is better for me to do further implementation.

Somesh_8073

3 weeks 4 days ago

hi, i tried with com_read,…

hi,

i tried with com_read, but it's getting failed.

Profile picture for user Kurumi

Kurumi

3 weeks 1 day ago

Hi, com_read works for…

Hi,

com_read works for instantaneous profile. Make sure that you have connected with an authentication level that can access those objects.

BR,
Mikko

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/17/2025 - 13:03
    Gurux.DLMS.Python 1.0.182
  • Wed, 06/04/2025 - 13:35
    gurux.dlms.c 9.0.2506.0401
  • Fri, 05/30/2025 - 08:30
    gurux.dlms.c 9.0.2505.3001
  • Tue, 05/27/2025 - 08:10
    Gurux.Serial.Android 2.0.12
  • Mon, 05/26/2025 - 08:39
    gurux.dlms.c 9.0.2505.2601

New forum topics

  • Day profile action item add error (String is not recognized as valid DateTime value)
  • Create gateway protocol in c
  • Error while reading event log object
  • GXDLMS Simulator – AssociationLogicalName Not Listed
  • Failed to read meter through raspberry pi 5 and probe
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin