Hello, I am trying to read from HXE energy meter using optical probe. From the documentation, the meter works with Protocol mode E. Is there a python Library i can use to get this done, and also do i need any information before i can read from it?
Currently when I send '/?!\r\n', I get '/HXE5\2HXE12' as reply from the meter. what do i need to do next?
Can you try to read your meter with GXDLMSDirector first? I'll help you to read it with python after that.
When you can read your meter with GXDLMSDirector I know that communication between the PC and the meter is working.
done!.. tried using NO/LOW authentication but i couldn't read the values. I was only able to read only using High authentication with password '00 00 00 00 00 00' . at least i want to read voltage and current and was able to do that. I now need to implement this high authentication setting and read out using either python or C/C++. I need help
Hi,
Python is not support High authentication at the moment. We'll relese version at the end of this month that can read it. You can use ANSI C or ANSI C++ version.
Check the client example. It does what you want to do.
I have downloaded the ANSI C++ library, i ran make on the makefile in the development folder and it was successful, I also ran make in the GuruxDLMSClientExample folder after creating obj and bin directories.
Now, how can i run the GuruxDLMSClientExample.cpp file on a linux machine(Raspbian) ?
You need to hard-code the password. It's handled as a string and your meter expects that it's hex string.
The client example can handle only strings at the moment.
Try to add -i parameter. It depends on the meter is IEC 62056-21 needed when connection is started.
Most European meters are using it, but several India or China meters are not used it.
hello kurumi,
i have tried the new python library update and even hard coded the password. and when i check the log file, it's not receiving anything yet. please help
above contain screen shots of the hard coded password part and also results from running
$ python3 main.py -i -S /dev/ttyUSB0 -a HIGH -P "00 00 00 00 00 00" and still yet nothing is received when i check the log file
code output
pi@raspberrypi:~/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python $ python3 main.py -i -S /dev/ttyUSB0 -a HIGH -P '00 00 00 00 00 00'
password: 3030203030203030203030203030203030
Authentication: Authentication.HIGH
ClientAddress: 0x10
ServerAddress: 0x1
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 19:38:21
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 80, in main
reader.readAll()
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 423, in readAll
self.initializeConnection()
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 235, in initializeConnection
self.readDLMSPacket(data, reply)
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 91, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 142, in readDLMSPacket2
raise e
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 134, in readDLMSPacket2
raise TimeoutException("Failed to receive reply from the device in given time.")
gurux_common.TimeoutException.TimeoutException: Failed to receive reply from the device in given time.
Ended. Press any key to continue.
tried that two, noticed the -i doesn't flag the iec true, i had to hard code it and the initialization function is now being called. I don't receive any response when it sends "/?!\r\n", i get failed to receive media or something. I have tried so many combinations but i still havn't read from the meter. I can read it through GXDLMSDirector but i want to read it with python. I am using optical head via serial.
It's Hexing meter?
It's Hexing meter?
Yes..... hxe310-kp .... Help!
Yes..... hxe310-kp .... Help!
Hi,
Hi,
Can you try to read your meter with GXDLMSDirector first? I'll help you to read it with python after that.
When you can read your meter with GXDLMSDirector I know that communication between the PC and the meter is working.
BR,
Mikko
done!.. tried using NO/LOW
done!.. tried using NO/LOW authentication but i couldn't read the values. I was only able to read only using High authentication with password '00 00 00 00 00 00' . at least i want to read voltage and current and was able to do that. I now need to implement this high authentication setting and read out using either python or C/C++. I need help
Thank you,
Hi,
Hi,
Python is not support High authentication at the moment. We'll relese version at the end of this month that can read it. You can use ANSI C or ANSI C++ version.
Check the client example. It does what you want to do.
BR,
Mikko
Hello,
Hello,
I have downloaded the ANSI C++ library, i ran make on the makefile in the development folder and it was successful, I also ran make in the GuruxDLMSClientExample folder after creating obj and bin directories.
Now, how can i run the GuruxDLMSClientExample.cpp file on a linux machine(Raspbian) ?
Hi,
Hi,
Executable is found from bin-folder. The command-line parameters are the same.
BR,
Mikko
Hello, could you confirm me
Hello, could you confirm me what logical and physical address you used to Hexing meter
Thanks a lot. now i am
Thanks a lot. now i am getting passed the iec handshake, but afterwards i get "SNRMRequest failed 252". I am using a raspberry pi board
Hi,
Hi,
Did you change the client address and password?
BR,
Mikko
I passed it in as command
I passed it in as command from terminal bin directory as >>
$./gurux.dlms.client.bin -i -S /dev/ttyUSB0 -a High -P "00 00 00 00 00 00" -t Verbose
it only got passed the iec handshake
Hi,
Hi,
You need to hard-code the password. It's handled as a string and your meter expects that it's hex string.
The client example can handle only strings at the moment.
BR,
Mikko
Hello,
Hello,
The python update for high authentication, will it be available for use this month end? as you said
Thanks
Hi,
Hi,
We are testing it at the moment.
BR,
Mikko
Hi,
Hi,
There is a new version available from client example also in GitHub.
You can use High authentication like this:
-h localhost -p 4061 -a High -P Gurux
BR,
Mikko
Hi,
Hi,
I am using optical probe to read from the meter. will this still work?
Thanks
Hi,
Hi,
Try to add -i parameter. It depends on the meter is IEC 62056-21 needed when connection is started.
Most European meters are using it, but several India or China meters are not used it.
BR,
Mikko
hello kurumi,
hello kurumi,
i have tried the new python library update and even hard coded the password. and when i check the log file, it's not receiving anything yet. please help
above contain screen shots of the hard coded password part and also results from running
$ python3 main.py -i -S /dev/ttyUSB0 -a HIGH -P "00 00 00 00 00 00" and still yet nothing is received when i check the log file
code output
code output
pi@raspberrypi:~/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python $ python3 main.py -i -S /dev/ttyUSB0 -a HIGH -P '00 00 00 00 00 00'
password: 3030203030203030203030203030203030
Authentication: Authentication.HIGH
ClientAddress: 0x10
ServerAddress: 0x1
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 19:38:21
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 80, in main
reader.readAll()
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 423, in readAll
self.initializeConnection()
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 235, in initializeConnection
self.readDLMSPacket(data, reply)
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 91, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 142, in readDLMSPacket2
raise e
File "/home/pi/Gurux.DLMS.Python-master/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 134, in readDLMSPacket2
raise TimeoutException("Failed to receive reply from the device in given time.")
gurux_common.TimeoutException.TimeoutException: Failed to receive reply from the device in given time.
Ended. Press any key to continue.
This is the password hard
This is the password hard coded part
Hi,
Hi,
Your hard coded pasword is 3030203030203030203030203030203030.
It should be 00 00 00 00 00 00.
BR,
Mikko
hello,
hello,
tried that two, noticed the -i doesn't flag the iec true, i had to hard code it and the initialization function is now being called. I don't receive any response when it sends "/?!\r\n", i get failed to receive media or something. I have tried so many combinations but i still havn't read from the meter. I can read it through GXDLMSDirector but i want to read it with python. I am using optical head via serial.