Closed eliafino closed 4 years ago
What command are you running? Please supply the output after adding '-D' to the command (this provides a lot of debug messages) Also can you run the 'QPI' command and let me know the result
This is debug for QPI: log.txt
And this working good: inv.py.txt
Are you saying your working good gives a good response? (As there is not crc in the command you send) what response do you get? What do you get if you send QPI instead of QPIGS?
QPIGS response is ['217.4', '101543', '49.9', '0006.6', '220.6', '01500', '49.9', '006.7', '027', '411.1', '411.1', '054.2', '---.-', '078', '00000', '00000', '-----', '000.0', '000.0', '---.-', '032.0', 'D---100201']
QPI response is ['PI16']
Ok, so a new protocol. The master node base doesnt deal with alternative protocols very well, but I have started a branch to specifically deal with different protocols (branch is called refactor)
Next week I'll try adding pi16 protocol handler Do you know how to checkout a branch and use that code? What do you need that the linked tool doesnt provide?
Cheers
I see branch refactor, ok. The links I sent are part of a software that manages UPS, I reported it only to understand the protocol. I haven't found anything else.
No problem to send directly command QPIGS to serial or USB port. I can query QBSDV but I can't set "BSDV44.5 46.5"
+QBSDV+:: Query device for battery-discharging limits
+BSDVa b+:: Set cut-off battery-discharging voltage:
I can't send over 8 characters
UPDATE: Ok I send first 8 characters and after send another characters: First send "BSDV44.5" and after " 46.5"
I have added the first cut at PI16 (QPIGS and QPI only so far) Can you try it against your inverter to see if it gives the correct response
root@raspberrypi:~# mpp-solar -c QPIGS -P PI16 -p /dev/hidraw0
Traceback (most recent call last):
File "/usr/local/bin/mpp-solar", line 11, in
root@raspberrypi:~# mpp-solar -R -c QPIGS -P PI16 -p /dev/hidraw0
Parameter Value Unit
Traceback (most recent call last):
File "/usr/local/bin/mpp-solar", line 11, in
Can you post the full debug response (add -D
) to the command
Weird it seems null padded at the start and there IS a crc on the return. Can you also do a debug of QPI command so I can see what that gives
OK they both have crc, I wonder if all responses do. Maybe set commands responses have no crc? No nulls at the start of these 2 responses though.... I'll update to remove the crc of the responses tomorrow and try to add some more commands
Ok, thank you very much!
made some changes - so hopefully the response is correctly parsed now also added QPIBI command can you try with version 0.6.2
also let me know which commands you need the most (start with queries)
root@raspberrypi:/usr/src/mpp-solar# mpp-solar -c QPIGS -P PI16 -p /dev/hidraw0 Parameter Value Unit grid_voltage 221.8 V output_power 0 W grid_frequency 50.0 Hz output_current 1.8 A ac_output_voltage_r 233.4 V ac_output_power_r 349 W ac_output_frequency 50.1 Hz ac_output_current_r 1.4 A output_load_percent 7 % pbus_voltage 409.1 V sbus_voltage 409.1 V positive_battery_voltage 56.7 V negative_battery_voltage 0.0 V battery_capacity 93 % pv1_input_power 0 W pv2_input_power 0 W pv3_input_power 0 W pv1_input_voltage 0.0 V pv2_input_voltage 0.0 V pv3_input_voltage 0.0 V max_temperature 33.0 °C status_todo D---110001
Perfect my friend!
If you can, I need QMOD and QED
Great, also next will be testing the output modules What are you going to do with the data?
Internet page, MySQL and grafana
how do you plan to get it to those places? mqtt? direct? QMOD added
Directly to my MySQL server. Thanks for QMOD
Did QMOD give a reasonable response? added attempt at QED...
so i have the idea of output modules.
if you have python code for the mysql updates, it is possible that an output module could be created (probably with a config file somewhere for the specific details etc)
then the command becomes
mpp-solar -p /dev/hidraw0 -P PI16 -c QED19900101 -o mysql
or similar
Interesting... but for now QED -> "NAK", no way to have production for today: QED20200721
Not finished jet, here
try QED now not sure 'checksum' is the same as the CRC though, do you have an example that works from your python script?
I was unable to obtain the reading with any script, not even sending the command directly to the serial port. Only "NAK"
can you try QED with version 0.6.4
and post a debug log if it fails again
oh, missed padding the checksum, fixed in 0.6.5
Now I see "0000000", in the next days I can connect solar panels and try to read production.Thanks very much for now!
Great
Hi, thanks for this project!
I receive only NAK response... which setting for "-M"?
Regards, Elia