Open zavoyko70 opened 2 years ago
Sorry - I don't understand. What is your question exactly?
Sorry - I don't understand. What is your question exactly?
I do not receive data from the inverter
Ah... so this is probably some hardware/configuration problem...
You might need to adjust the values for qpiri, qpiwis, qmod in inverter.conf. You can run each command under strace
and count how many bytes are returned, excluding the CRC, then set that value in inveret.conf:
strace -s 2048 inverter_poller -r QPIRI returns
write(4, "QPIRI\370T\r", 8) = 8 read(4, "(230.0 2", 102) = 8 read(4, "1.7 230.", 94) = 8 read(4, "0 50.0 2", 86) = 8 read(4, "1.7 5000", 78) = 8 read(4, " 5000 48", 70) = 8 read(4, ".0 48.0 ", 62) = 8 read(4, "44.0 59.", 54) = 8 read(4, "5 54.7 2", 46) = 8 read(4, " 02 100 ", 38) = 8 read(4, "1 2 3 9 ", 30) = 8 read(4, "01 0 1 5", 22) = 8 read(4, "4.0 0 1 ", 14) = 8 read(4, "000\252\22\r", 6) = 6 close(4) = 0
I have in inverter.conf qpiri=102. Likewise for the other commands. Each inverter returns replies with different lengths, these need to be configured.
Thank you, @dilyanpalauzov :)
@zavoyko70 does it resolve your issue?
I am getting the same errors as above on a LVX6048WP
I ran the strace command but I am not sure what I should be looking at in the output
TIA
The amount of read()
bytes is the value of the parameter qpiri in inverter.conf (here: 102). You shall see, if all the bytes are read, including the final checksum bytes and new line (in the above example: \252\22\r). Then increase/decrease the value of qpiri, until the result matches. Likewise for the other command/parameters in invertor.conf.
These are just hints. I am not going to write here encyclopaedia on I/O under Linux.
Thank you for your help! I will dig into this further
not sure if anyone can help with this error, I am thinking that maybe the hardware I am using is not up to snuff,
I am getting all ^0 returns when running cat on whatever device I choose, /ttyUSB0 or /hidraw0
and the below output when using the strace command above
read(4, 0x11f0230, 7) = -1 EAGAIN (Resource temporarily unavailable) clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=8571750198684952336}, 0x7ed94428) = 0 read(4, 0x11f0230, 7) = -1 EAGAIN (Resource temporarily unavailable)
If anyone knows if this is hardware or not that would be appreciated, I am using a usb to usb, or a R232 to usb for connection.
TIA
The device must appear under /dev the devdirectory, strace
or inverter_poller
must be run as root
. It is questionable what the 4 means above, there must an open()/openat() previously, which returns the 4, instead of an error.
Hi Manio.
MPP Solar / Infinisolar MPI 10k hybrid inverter
pi@raspberrypi:~/skymax-demo/build $ sudo ./inverter_poller -1 -d Thu Jun 2 11:13:12 2022 INVERTER: Debug set Thu Jun 2 11:13:12 2022 INVERTER: Current CRC: 49 C1 Thu Jun 2 11:13:12 2022 INVERTER: QMOD reply size (5 bytes) configuration options for the actual inverter polling process...es. Buffer: ^0
The device to read from... Use: /dev/ttyS0 if you have a serial device, /dev/ttyUSB0 if a USB<>Serial, /dev/hidraw0 if you're connecting via the USB port on the inverter.
device=/dev/hidraw0
How many times per hour is the program going to run... This is used to calculate the PV & Load Watt Hours between runs... If unsure, leave as default - it will run every minute...
(120 = every 30 seconds)... run_interval=120
This allows you to modify the amperage in case the inverter is giving an incorrect reading compared to measurement tools. Normally this will remain '1' amperage_factor=1.0
This allos you to modify the wattage in case the inverter is giving an incorrect reading compared to measurement tools. Normally this will remain '1' watt_factor=1.01
Thu Jun 2 11:13:12 2022 INVERTER: Current CRC: B7 A9 Thu Jun 2 11:13:15 2022 INVERTER: QPIGS read timeout Thu Jun 2 11:13:15 2022 INVERTER: QPIGS reply too short (8 bytes) Thu Jun 2 11:13:15 2022 INVERTER: Current CRC: F8 54 Thu Jun 2 11:13:18 2022 INVERTER: QPIRI read timeout Thu Jun 2 11:13:18 2022 INVERTER: QPIRI reply too short (8 bytes) Thu Jun 2 11:13:18 2022 INVERTER: Current CRC: B4 DA Thu Jun 2 11:13:21 2022 INVERTER: QPIWS read timeout Thu Jun 2 11:13:21 2022 INVERTER: QPIWS reply too short (8 bytes) Thu Jun 2 11:13:26 2022 INVERTER: Current CRC: 49 C1 Thu Jun 2 11:13:26 2022 INVERTER: QMOD reply size (5 bytes) ▒hu Jun 2 11:13:26 2022 INVERTER: QMOD: incorrect start/stop bytes. Buffer: ^0 Thu Jun 2 11:13:26 2022 INVERTER: Current CRC: B7 A9
Thanks