Trying to get a reading of a landis+gyr e650

61 posts / 0 new
Last post
ilhan
Trying to get a reading of a landis+gyr e650

Hi,
I have tried to read out the Landys-Gyr E650, finding out it's a DLMS meter

I'm using the following hardware:

- Raspberry Pi 3B
- A RS485 cable connected to the meter, installed by the network operator.
- the RS485 cable connected through ch341-uart converter through usb on the raspberry Pi

Having cloned https://github.com/gurux/gurux.dlms.python and installed all the dependencies, I have tried to get it working through, but so far I get the following outputs:

```
~/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python $ python main.py -S /dev/ttyUSB0
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 17:13:41
DisconnectRequest
```

What else could I try ?

Kurumi
Kurumi's picture

Hi,

I'm not quite sure what converter you have, but In my mind, ch341 UART is for 5V/3.3V.
RS485 is using 12V.

Check is your converter working anymore and buy a converter for RS485.

BR,
Mikko

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

ilhan

Hi Mikko,
Thanks for you answers, yes the ch341 is for 5V, what product do you recommend.

The DSO has placed an RS485 cable which is just a D+ and D- Cable, I placed the Red in the D+ and Green in D-, I currently get the following output:

python main.py -S /dev/ttyUSB0
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 16:26:33
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 80, in main
reader.readAll()
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 423, in readAll
self.initializeConnection()
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 235, in initializeConnection
self.readDLMSPacket(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 91, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/pi/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 142, in readDLMSPacket2
raise e
TimeoutException: Failed to receive reply from the device in given time.
Ended. Press any key to continue.

- Besides the converter could it also be a default password that it's missing as it's and industrial meter ?

Best, Ilhan

Best,Ilhan

Kurumi
Kurumi's picture

Hi Ilhan,

If you are using RS-232 converter (ch341), the connection is newer work. You need an RS-485 converter.

BR,
Mikko

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

ilhan

The converter is sold as RS485, it's this one https://www.reichelt.nl/framboos-pi-usb-rs485-interface-rs485-ch340c-rpi...

Should this one work ? Or not because it's 5V

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

We have not used this model. You need to try. Note that there are no drivers for Windows 10.
Let me know if you have any problems.

BR,

Mikko

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

ilhan

We are running it on a raspberry Pi 3, which is linux and the ch340 is in the linux directory, so no drivers are needed.

What device would you recommend for this?

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

We haven't try with this RS-485 converter. I have to say that it's cheap.
We have used example Exsys converters.

BR,
Mikko

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

ilhan

I'm looking at the manual of Exsys rs485-usb converter: https://cdn-reichelt.de/documents/datenblatt/E910/EXSYS_EX1309T_MN_ENG.pdf

The RS-485 connection the DSO placed was orignally in a rj-11 connection, I stripped it and only the green and red cable are left. Which connection do I put them in (see attached picture) ?

Image: 

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

If you have only two wires use the upper (default). Lower is for four wires.

BR,
Mikko

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

ilhan

Hi again,

I got the exsys cable in and this will I'll head up to solar panel meter to install it. I'm using the https://github.com/Gurux/Gurux.DLMS.Python/tree/master/Gurux.DLMS.Client... to test the connection and my usual testing command is : `python main.py -S /dev/ttyUSB0`

If you would want to set a different baudrate, how would you do this using the Example Python Client ?

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

At the moment the best way to set serial port settings is modifying main.py.
We'll improve the example client so you can give serial port settings as a parameter.

BR,
Mikko

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

ilhan

Hi Mikko,

I'm still working on get some data out of the Landis+Gyr E650. I was today at the office of the manufacturer and he was able to get a reading with aan optical cable with the software of the manufacturer called .map110

We tried on his windows pc with the Exsys with .map110 over the RS485 port, but that didn't work. I'm wondering if I should install the D2XX Direct Drivers, but I think the VPC drivers that are included in the kernel should be enough.

Using the :

- Python DLMS Gurux EXAMPLE main.py to get a first sign of response.
- Connected is the Exsys USB RS485 converter, I'm using the VCP driver that is in the kernel my USB and it maps to the "ttyUSB0" port.
- For the Exsys, I'm using the `RS485-2W` diagram, pin number 2 is up and all the rest is down.
- After a `pip install -r requirements.txt` in the Client example folder.

The main command I'm resting with is python main.py -S /dev/ttyUSB0, where the result itsn't different. I see the RX light of the meter burning, but it gives the following output:

Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 12:29:27
DisconnectRequest

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

Check the cables if the meter manufacturer was unable to read the meter using RS-485.
Can you read your meter using an optical cable? Just add -i parameter and that should work.

BR,
Mikko

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

ilhan

So the manufacturer had access to an optical cable, I'm just using the exsys rs485-USB and having hard time getting a reading. What should I check in terms of the cable ?

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

Serial port reading is causing sometimes problems because there is no clear reason if connection is broken. With TCP/IP error message is clear if the client can't make the connection to the meter.

With serial port connection settings might be wrong or cable is not connected correctly.

BR,
Mikko

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

ilhan

sudo python main.py -S /dev/ttyUSB0

Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 303, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 522, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 674, in parsePDU2
raise GXDLMSException(AssociationResult.PERMANENT_REJECTED, SourceDiagnostic.NOT_SUPPORTED)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

I believe that your meter don't allow connection without an authentication. You need to use Low authentication to connect to the meter. You need to know the Low-level password and change the client address.

If you add -t Verbose parameter I can check this from the bytes.
BR,
Mikko

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

ilhan

So I tried I think again all types of combinations, in order to let this work.

Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python$ sudo python main.py -S /dev/ttyUSB0 -a Low

Authentication: Authentication.LOW
ClientAddress: 0x10
ServerAddress: 0x1
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 302, in initializeConnection
self.readDataBlock(self.client.aarqRequest(), reply)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 491, in aarqRequest
_GXAPDU.generateAarq(self.settings, self.settings.cipher, None, buff)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 274, in generateAarq
cls.getAuthenticationString(settings, data, encryptedData)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 93, in getAuthenticationString
len_ = len(callingAuthenticationValue)
TypeError: object of type 'NoneType' has no len()
Ended. Press any key to continue.

The meter provider and meter manufacturer, say it doesn't have a password, I get the following output, also trying out different client addresses doesn't give me anything different. I see the RX and TX lights going on and off when I send a command, so the connection to the smart meter works.

http://www.gurux.fi/sites/default/files/20200303_115353.jpg

Image: 

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

It seems that the meter has replied. Can you run this with -t Verbose parameter as I ask in the previous post.

Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python$ sudo python main.py -S /dev/ttyUSB0 -a Low -t Verbose

BR,
Mikko

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

ilhan

I get the following then:

Authentication: Authentication.LOW
ClientAddress: 0x10
ServerAddress: 0x1
TX: 13:44:51 7E A0 07 03 21 93 0F 01 7E
RX: 13:44:51 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
DisconnectRequest
TX: 13:44:51 7E A0 07 03 21 53 03 C7 7E
RX: 13:44:51 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 302, in initializeConnection
self.readDataBlock(self.client.aarqRequest(), reply)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 491, in aarqRequest
_GXAPDU.generateAarq(self.settings, self.settings.cipher, None, buff)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 274, in generateAarq
cls.getAuthenticationString(settings, data, encryptedData)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 93, in getAuthenticationString
len_ = len(callingAuthenticationValue)
TypeError: object of type 'NoneType' has no len()
Ended. Press any key to continue.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

If you don't use the password, your authentication level is None.
Try with this:
Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python$ sudo python main.py -S /dev/ttyUSB0 -t Verbose

BR,
Mikko

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

ilhan

sudo python main.py -S /dev/ttyUSB0 -t Verbose
[sudo] password for ilhan:
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
TX: 09:33:54 7E A0 07 03 21 93 0F 01 7E
RX: 09:33:54 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 09:33:54 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 00 1E 1D FF FF C5 E4 7E
RX: 09:33:54 7E A0 36 21 03 30 D7 60 E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 02 BE 0F 04 0D 08 00 06 5F 04 00 18 02 20 09 60 FA 00 C0 3F 7E
DisconnectRequest
TX: 09:33:54 7E A0 07 03 21 53 03 C7 7E
RX: 09:33:54 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 303, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 522, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 674, in parsePDU2
raise GXDLMSException(AssociationResult.PERMANENT_REJECTED, SourceDiagnostic.NOT_SUPPORTED)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

Your meter is using Short Name referencing.
Try this:
sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn

BR,

Mikko

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

ilhan

That is helping, getting a lot of Verbose messages, not sure what they all mean...

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn
[sudo] password for ilhan:
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
TX: 10:57:57 7E A0 07 03 21 93 0F 01 7E
RX: 10:57:57 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 10:57:57 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 02 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 0F 59 7E
RX: 10:57:57 7E A8 4E 21 03 30 6A 85 E6 E7 00 0C 81 93 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F FF 16 1E 00 02 02 0F FF 16 1E 00 02 02 0F FF 16 1E 1F 98 7E
DisconnectRequest
TX: 10:57:57 7E A0 07 03 21 53 03 C7 7E
RX: 10:57:57 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 302, in initializeConnection
self.readDataBlock(self.client.aarqRequest(), reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 177, in readDataBlock
self.readDataBlock(it, reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 179, in readDataBlock
self.readDLMSPacket(data, reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 116, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 167, in readDLMSPacket2
raise e
AttributeError: GXReplyData instance has no attribute 'setValue'
Ended. Press any key to continue.

Best,Ilhan

ilhan

Could this error be, as this Meter is not connected to the grid?
It's just connected to a power source and not reporting any power values at the moment.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

No, this is an error in the source code. We'll fix this and release a new version today.

BR,
Mikko

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

Kurumi
Kurumi's picture

Hi,

I was checking bytes more and I was wrong. This is not the reply message and I don't know where this is coming. The frame is correct, but data is not. Can you try to read it again? I want to see is meter returning same reply.

BR,
Mikko

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

ilhan

I left the office already, saw your reply too late, Ill try it again, it was giving me a longer version of response before, somehow wasn't able to replicate that again with the same command. You'll have it first thing tomorrow. You think trying out a different code base of Gurux such a the Java version will give me different results ?

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

All programming languages produces the same response. Received data is response for the read.

BR,
Mikko

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

ilhan

I'm on the latest release, tried running it again. I get the same error:

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
TX: 12:03:57 7E A0 07 03 21 93 0F 01 7E
RX: 12:03:57 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 12:03:57 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 02 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 0F 59 7E
RX: 12:03:57 7E A8 4E 21 03 30 6A 85 E6 E7 00 0C 81 93 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F 00 16 FF 00 02 02 0F FF 16 1E 00 02 02 0F FF 16 1E 00 02 02 0F FF 16 1E 1F 98 7E
DisconnectRequest
TX: 12:03:57 7E A0 07 03 21 53 03 C7 7E
RX: 12:03:57 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 302, in initializeConnection
self.readDataBlock(self.client.aarqRequest(), reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 177, in readDataBlock
self.readDataBlock(it, reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 179, in readDataBlock
self.readDLMSPacket(data, reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 116, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 167, in readDLMSPacket2
raise e
AttributeError: GXReplyData instance has no attribute 'setValue'
Ended. Press any key to continue.

Would changing the switches with Exsys help, not really sure what all of these stand for, but also putting from 4 to 8 on on, doesn't change the outcome of the commands.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

This is very interesting. The client tries to make a connection to the meter and the meter replies read-response. And the values are the same. I'm wondering is this meter some kind of event mode and meter is sending readout data. There should 93 items on the read response.

Is this your own meter or is this meter of the electricity utilizer?

BR,
Mikko
<ReadResponse Qty="93" >
<Data>
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="FF" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="FF" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="FF" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="FF" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="FF" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="FF" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="FF" />
<Enum Value="1E" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="FF" />
<Enum Value="1E" />
</Structure>
</Data>
<Data>
<Structure Qty="02" >
<Int8 Value="FF" />
<Enum Value="1E" />
</Structure>
</Data>

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

ilhan

Not fully understanding what you mean, The meter is currently connected on my desk to a power source. It just turns it on, but there is currently no energy being drawn from it. I don't know it what kind of mode this puts it, but I have seen it works with an optical cable on-site of the manufacturer Landis+Gyr.

I got this meter, to experiment and make it work, so I don't have to do this where the actual meter is that I want to read out (which is on a rooftop connected to solar panels).

What can you advise we do next, also I want to escalate this in the Netherlands for a professional to do it, as this is not my expertise. You have any advice how to proceed further ?

Image: 

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

I'm sorry for the bad explanation. I believe that your meter is sending readouts all the time as a notification message and you don't need to connect to it. I'm not 100% sure of this because this is the first time when I have seen meter working like this.

I need some time to think about how we can handle this.

BR,
Mikko

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

ilhan

If I would try to go to a connected meter, which is the exact same type, you think the readings can be different? As this is a demo model that is being used for testing purposes and without the .map110 software it might react differently to the Gurux software.

Best, Ilhan

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

Can you read this meter with Map110 and sent log to me by email? I can check the bytes and try to verify the reason.

BR,
Mikko

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

ilhan

I personally cannot, as I don't have the software and/or the cable. If you know exactly what needs to be read out, I can ask the manufacturer ?

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

You don't need the cable. It's great If you can ask map110 from the manufacturer.
Let me know what happened.

BR,
Mikko

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

ilhan

So I got the request from the Landis+Gyr with an example.
You can find the logs here:
https://pastebin.com/7HTFDmEv

In the logfile of dMAP110 you will see a reading of the “Energy Total Registers” op security level 1 (UID 32 of Hex 20) with static password 00000000

It communicates with the meter with over Ethernet which loops through a connection via RS485.( this is a translation I got from the manufacturer, tried to translate it the best way)

For the configuration of the tracer see the attached image

Image: 

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

Thank you for this info. I don't know why invalid data is returned when default settings are used.
Try with this:

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -s 25205 -a Low -P 00000000

BR,
Mikko

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

ilhan

Hey, again today I am not in the office to test this, but can test it on thursday.

Thank you for your effort for making this work, one thing that I would like to clarify about the supplied logs is that this is not the same meter I have on my desk.

I see that you have supplied -s 25205 to the command, this is something that you have seen from the logs? I am not the one that created the logs, I just copied them from the manafacturer that send them to me. The difference is that I'm only using a Exsys USB-RS485 Cable and the logs are connected in a different way as I mentioned in the previous post.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

25205 is server address. What is your meter serial number? I believe that the server address is count from it.

BR,
Mikko

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

ilhan

I got the following back from the manufacturer:

The serial number you can also find n the dmap110 screens: 50377821
The “Physical address” for DLMS is derived of it, the last 4 digits + 1000: 8821

Image: 

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

Yes, it's using the default serial number formula. Try with this:

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -n 50377821 -a Low -P 00000000

BR,
Mikko

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

ilhan

The Machine I have in front of me to test has a serial nr of 5039997 and I used the following command:

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -n 50399974 -a Low -P 00000000

gurux_dlms version: 1.0.54
gurux_net version: 1.0.12
gurux_serial version: 1.0.13
Authentication: Authentication.LOW
ClientAddress: 0x10
ServerAddress: 0x6ade
TX: 10:36:13 7E A0 0A 00 02 AA BD 21 93 E9 96 7E
RX: 10:36:13 7E A0 21 21 00 02 AA BD 73 AD 0D 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 10:36:13 7E A0 47 00 02 AA BD 21 10 33 C9 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 30 30 30 30 30 30 30 30 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 84 75 7E
RX: 10:36:13 7E A0 39 21 00 02 AA BD 30 17 16 E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 0F 04 0D 08 00 06 5F 04 00 18 02 20 09 60 FA 00 18 3A 7E
DisconnectRequest
TX: 10:36:13 7E A0 0A 00 02 AA BD 21 53 E5 50 7E
RX: 10:36:14 7E A0 21 21 00 02 AA BD 73 AD 0D 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 84, in main
reader.readAll(settings.outputFile)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 487, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 304, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 522, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 807, in parsePDU2
raise GXDLMSException(resultComponent, resultDiagnosticValue)
GXDLMSException: Access Error : Device reports a hardware fault.

I also used the following command based on what the manufacturer said to add +1000 to the serial no.

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -n 50400974 -a Low -P 00000000
gurux_dlms version: 1.0.54
gurux_net version: 1.0.12
gurux_serial version: 1.0.13
Authentication: Authentication.LOW
ClientAddress: 0x10
ServerAddress: 0x47b6
TX: 10:37:59 7E A0 0A 00 02 1E 6D 21 93 96 0A 7E
^CEnded. Press any key to continue.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

This is correct.
sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -n 50399974 -a Low -P 00000000

Try to run
pip install --upgrade gurux-dlms

BR,

Mikko

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

ilhan

No Change :

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -n 50399974 -a Low -P 00000000
gurux_dlms version: 1.0.55
gurux_net version: 1.0.12
gurux_serial version: 1.0.13
Authentication: Authentication.LOW
ClientAddress: 0x10
ServerAddress: 0x6ade
TX: 16:02:08 7E A0 0A 00 02 AA BD 21 93 E9 96 7E
RX: 16:02:08 7E A0 21 21 00 02 AA BD 73 AD 0D 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 16:02:08 7E A0 47 00 02 AA BD 21 10 33 C9 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 30 30 30 30 30 30 30 30 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 84 75 7E
RX: 16:02:08 7E A0 39 21 00 02 AA BD 30 17 16 E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 0F 04 0D 08 00 06 5F 04 00 18 02 20 09 60 FA 00 18 3A 7E
DisconnectRequest
TX: 16:02:08 7E A0 0A 00 02 AA BD 21 53 E5 50 7E
RX: 16:02:08 7E A0 21 21 00 02 AA BD 73 AD 0D 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 84, in main
reader.readAll(settings.outputFile)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 487, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 304, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 523, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 807, in parsePDU2
raise GXDLMSException(resultComponent, resultDiagnosticValue)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Best,Ilhan

Kurumi
Kurumi's picture

Hi,

There was an issue and I made a report from this.
http://www.gurux.fi/node/15147

It's now fixed. Get the latest version.

BR,
Mikko

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

ilhan

With the latest packages I get the same, what do you recommend ?

sudo python main.py -S /dev/ttyUSB0 -t Verbose -r sn -c 16 -n 50399974 -a Low -P 00000000
gurux_dlms version: 1.0.60
gurux_net version: 1.0.17
gurux_serial version: 1.0.14
Authentication: Authentication.LOW
ClientAddress: 0x10
ServerAddress: 0x6ade
TX: 12:42:54 7E A0 0A 00 02 AA BD 21 93 E9 96 7E
RX: 12:42:54 7E A0 21 21 00 02 AA BD 73 AD 0D 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 12:42:54 7E A0 47 00 02 AA BD 21 10 33 C9 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 30 30 30 30 30 30 30 30 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 84 75 7E
RX: 12:42:54 7E A0 39 21 00 02 AA BD 30 17 16 E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 0F 04 0D 08 00 06 5F 04 00 18 02 20 09 60 FA 00 18 3A 7E
DisconnectRequest
TX: 12:42:54 7E A0 0A 00 02 AA BD 21 53 E5 50 7E
RX: 12:42:54 7E A0 21 21 00 02 AA BD 73 AD 0D 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
Traceback (most recent call last):
File "main.py", line 84, in main
reader.readAll(settings.outputFile)
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 487, in readAll
self.initializeConnection()
File "/home/ilhan/dev/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 304, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 523, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/ilhan/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 807, in parsePDU2
raise GXDLMSException(resultComponent, resultDiagnosticValue)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Best,Ilhan

ilhan

I have access to the .map110 software and it works with the same adapter and the meter out of the box on DLMS settings, I can provide you with information you need about it.

I also see you have uploaded a new version, I'll try it.

Best,Ilhan

Kurumi
Kurumi's picture

Hi Ilhan,

Can you try to read this using Python3? For some reason Raspberry Pi Python 2.7 is not call useLogicalNameReferencing property. This is changed to the method, but testing is taking some time.
BR,
Mikko

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

Pages