Hi everyone,
I tried to read a electrical meter with gurux python library buy I'm facing with an error below. I installed gurux dlms library on raspberry pi 5 and I connect the meter with probe to the raspberry and I'm not able to reach it. I have an Exception("Serial port is not selected.". can you please have an issue to my problem. Thank you
python main.py -S /dev/ttyUSB0
gurux_dlms version: 1.0.181
gurux_net version: 1.0.22
gurux_serial version: 1.0.2
Authentication: 0
ClientAddress: 0x10
ServerAddress: 0x1
Traceback (most recent call last):
File "/home/gs2e/Desktop/gurux/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/main.py", line 89, in main
settings.media.open()
File "/home/gs2e/.local/lib/python3.11/site-packages/gurux_serial/GXSerial.py", line 226, in open
raise Exception("Serial port is not selected.")
Exception: Serial port is not selected.
Ended. Press any key to continue.
Hi, For some reason the…
Hi,
For some reason the Serial port version number was wrong in requirements.txt. It's now updated to the correct 1.0.21. Update the serial port component to version 1.0.21 and it works.
BR,
Mikko
Hi Mr Kurumi, Thank you for…
Hi Mr Kurumi,
Thank you for the solution to my concern. However, a new error has occurred. Here it is: Gurux.DLMS.python/Gurux.DLMS.XmlClient.python $ python main.py -S /dev/ttyUSB0
gurux_dlms version: 1.0.181
gurux_net version: 1.0.19
gurux_serial version: 1.0.21
------------------------------------------------------------
Messages\LN
Traceback (most recent call last):
File "/home/gs2e/Desktop/test/Gurux.DLMS.python/Gurux.DLMS.XmlClient.python/main.py", line 118, in main
actions = settings.client.load(file)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gs2e/.local/lib/python3.11/site-packages/gurux_dlms/GXDLMSXmlClient.py", line 92, in load
tree = ET.parse(filename)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 1218, in parse
tree.parse(source, parser)
File "/usr/lib/python3.11/xml/etree/ElementTree.py", line 569, in parse
source = open(source, "rb")
^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'Messages\\LN'
Ended. Press any key to continue.
Hi, Use Gurux.DLMS.Client…
Hi,
Use Gurux.DLMS.Client.Example, not Gurux.DLMS.XmlClient.python. You don't have the correct XML files.
BR,
Mikko