Trying to get a reading of a landis+gyr e650

17 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

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

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?

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: 
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 ?

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

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 ?

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.