-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Hi everyone. My name is Jesús, I'm a junior engineer. First of all, thanks for your contribution with the python-pylontech lib, it is a great help. I'm using it to connect my force L1 Pylontech to my RaspBerry Pi and I have a problem with it. If you had time and could answer me, I would appreciate it.
My case is the next one: I'm using a R-485 to Ethernet adapter (RSETHER). I run the next command:
socat pty,link=$HOME/bat2,waitslave tcp:<IP_ADDRESS>:<PORT>
The problem is that I'm not sure what part of the code I've to change. I've change the next line from the pylontech.py file:
def init__(self, serial_port='/dev/ttyUSB0', baudrate=115200):
And I've changed it into:
def init__(self, serial_port='/home/jesus/bat2', baudrate=115200):
(Thats the rute to my virtual serial port) Then I run the script and I get the next fails:
Traceback (most recent call last):
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/PRUEBA.py", line 3,
print(p.get_values())
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/pylontech.py", line 269, in get_values
f = self.read_frame()
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/pylontech.py", line 199, in read_frame
f = self._decode_hw_frame(raw_frame=raw_frame)
File "/home/jesus/Desktop/GitHun/python-pylontech-master/pylontech/pylontech.py", line 181, in_decode_hw_frame
assert got_frame_checksum == int(frame_chksum, 16)
Value: invalid literal for int() with base 16: b''
PRUEBA is the name of my script. And thats everything. I don't understand the problem it is reporting, I don't know if I have to change anything else from the lib. And I think it is not a wiring problem, as I've check continuity and everything is ok.
Again, I would be very grateful with any answer.
Best Regards