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. Execute Method of Unknown Objects In Python

Execute method of unknown objects in Python

By tarek89 , 12 May, 2023
Forums
Gurux.DLMS

Hi,

I'm want to execute a method of an unkonwn object using Python.
In my exemple, i have :

item: an object cosem that generate automaticaly, so i dont have this type.
index: index of method is known

how i can execute the method with index for any item ?

Profile picture for user Kurumi

Kurumi

3 years 4 months ago

Hi, It's not possible to…

Hi,

It's not possible to execute or read/write for the unknown object. You always need to know the object type. All objects should be in the association view.

BR,
Mikko

tarek89

3 years 4 months ago

Thanks, The object is known…

Thanks,

The object is known from meter and it is present in association view, but for the user it is unknown, so i want to automaticaly execute the method related to a an index and obis code entered by the user.

tarek89

3 years 4 months ago

More explanation: in my case…

More explanation:
in my case, i have a method that return object instance.
for exemple:
* method name : create_item()
* input: obis_code, method_index, data
==> item = create_item(obis_code, method_index, data)
if i want to execute the method 1 of object with obis_code '1.2.1.6.1.255', item will be 'GXDLMSExtendedRegister' instance, so item.reset(client) will be executed.

how i can do that?

tarek89

3 years 4 months ago

Other question, For…

Other question,

For attributs , we have a method called 'getDataType' to return the dataType of attributs.
But how to get the dataType of method?

Profile picture for user Kurumi

Kurumi

3 years 4 months ago

Hi, You need to find the…

Hi,

You need to find the object from the assciation view and use that object type.

Methods are more complex and you need to check what method you want to execute and give the correct parameters.

What you need to do is check what is the object type and then call wanted method with correct parameters.

With method the data types can be quite complex. For that reason it's not possible to return data type for the method.

BR,
Mikko

tarek89

3 years 4 months ago

Hello, That means we cannot…

Hello,

That means we cannot get the data Type of methods?

Profile picture for user Kurumi

Kurumi

3 years 4 months ago

Hi, Yes, you can't get the…

Hi,

Yes, you can't get the data type for the methods. Simple methods use only integer values, but with complex methdos, you need to write different kinds of arrays or structures.

BR,
Mikko

tarek89

3 years 4 months ago

Thank you !

Thank you !

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin