I cannot read data from iskra MT880 with DLMS, python and serial ports.

10 posts / 0 new
Last post
bryan.escobar
I cannot read data from iskra MT880 with DLMS, python and serial ports.

Hi,

I am trying to read data from the iskra MT880 with DLMS using python and serial port, but it has been impossible to extract the information.

When I run the code, I get the following response:

gurux_dlms version: 1.0.104
gurux_net version: 1.0.17
gurux_serial version: 1.0.15
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x4f

But then I get an error saying "Resource temporarily unavailable".

How can I fix this and be able to read the data from the meter?

Best regards and thank you for any useful hint.

Kurumi
Kurumi's picture

Hi Bryan,

Is this error message coming from the serial port? Can you send and receive any data from the meter?
If you are receiving bytes from the meter, your server or client address is wrong. Download GXDLMSDirector and try to connect with it. In the latest version, you can see the correct command line parameters when you select the meter.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

bryan.escobar

Hi Nikko,

Thank you so much for your answer. I was able to receive information from the meter following your instructions about the GXDLSMDirector, but this information arrives to me in hexadecimal system. Is there any way to receive the measurement data in decimal system or is it necessary to transform this information separately?

Best regards.

bryan.escobar

Hi Mikko,

No, I can't send and receive data from the meters.
It waits for a moment and then shows the message "Resource temporarily unavailable".

Best regards.

Kurumi
Kurumi's picture

Hi Bryan,

You can't get data in a decimal system. DLMS is quite a complicated protocol.

So it seems that this error message is coming from the serial port. What Operating system you are using? What is the manufacturer and model of the USB to the serial port converter?
Do you have a link for the converter?

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

bryan.escobar

Hi Mikko,

I am using Ubuntu and I don't have link for the converter. This is an example of the response I am getting and I need to interpret and translate.

TX: 18:06:48 7E A0 08 02 9F 21 D1 4A 2A 7E
RX: 18:06:48 7E A8 A4 21 02 9F 5C ED B5 06 01 00 4C 1E 00 FF 02 02 01 03 02 03 0F 01 16 00 00 02 03 0F 02 16 00 00 02 03 0F 03 16 00 00 01 01 02 02 0F 01 16 00 02 04 12 00 03 11 00 09 06 01 00 51 07 01 FF 02 02 01 03 02 03 0F 01 16 00 00 02 03 0F 02 16 00 00 02 03 0F 03 16 00 00 01 01 02 02 0F 01 16 00 02 04 12 00 03 11 00 09 06 01 00 51 07 02 FF 02 02 01 03 02 03 0F 01 16 00 00 02 03 0F 02 16 00 00 02 03 0F 03 16 00 00 01 01 02 02 0F 01 16 00 02 04 12 00 03 11 00 09 06 01 00 51 07 04 FF 02 02 01 32 E6 7E

What do you recommend?

Best regards.

Kurumi
Kurumi's picture

Hi,

Data is coming in multiple frames and your client is asking for the next frame. You can't translate this before all the frames are received and you have complete data.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

bryan.escobar

Hi,

I understand. I followed your recommendations but after a while it shows the following message:

Error! Index: 1 Access Error : Device reports Read-Write denied.
Access Error : Device reports Read-Write denied.
Attribute3 is not readable.
Attribute2 is not readable.
Attribute4 is not readable.
Attribute5 is not readable.

How can I fix this?

Best regards

Kurumi
Kurumi's picture

Hi,

Meter reports that you can't read those values. If you have read the association view and check the access right before read there is nothing that you can do about it. Meter is saying that value is readable when you read the association view, but it's not.
You can skip those errors. Check that you check the access rights like this:

if it.canRead(pos):
val = self.read(it, pos)

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

bryan.escobar

Hi,

Thank you for your support. I have a question, can I read the power, voltage and current values from the main.py code of the DLMS.Client.Example? If not, how can I get these values?

Best regards.