Open byte4geek opened 2 years ago
some time i have this:
Fri Jun 10 13:25:06 2022 INVERTER: Debug set
Fri Jun 10 13:25:07 2022 DEBUG: Current CRC: 49 C1
Fri Jun 10 13:25:07 2022 DEBUG: Send buffer hex bytes: ( 51 4d 4f 44 49 c1 0d )
Fri Jun 10 13:25:07 2022 DEBUG: 7 bytes written, 7 bytes sent, 0 bytes remaining
Fri Jun 10 13:25:07 2022 DEBUG: 5 bytes read, 5 total bytes: 10 00 00 28 42 e7 c9 0a
Fri Jun 10 13:25:13 2022 DEBUG: QMOD read timeout
Fri Jun 10 13:25:14 2022 DEBUG: Found reply <cr> at byte: -35295495
i discover that sometimes this docker can't establish serial speed, this cause random error of parse bytes read from serial. I suggest you to schedule this python script at boot:
crontab -e
@reboot python3 /home/cristian/set_serial.py > /home/cristian/set_serial_out.txt
root@srvubuntu:/home/cristian# cat set_serial.py
import serial
serialport = serial.Serial("/dev/ttyUSB0", 2400, timeout=0.5)
serialport.write(b"QMOD 4\r")
response = serialport.readlines(None)
print(response)
serialport.write(b"QPIGS 5\r")
response = serialport.readlines(None)
print(response)
My inverter.conf value:
device=/dev/ttyUSB0
qmod=5
qpigs=110
qpiri=103
qpiws=32
I'm trying to use the serial port but no response from the inverter:
Whit the same serial adapter and windows PC i'm able to connect to the inverter using the WatchPower tool.