Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding commands for LV5048. #11

Closed
DMIINC opened this issue Mar 26, 2020 · 257 comments
Closed

Adding commands for LV5048. #11

DMIINC opened this issue Mar 26, 2020 · 257 comments

Comments

@DMIINC
Copy link

DMIINC commented Mar 26, 2020

LV5048 5KW protocol-20190222 for customer.pdf
Hello,

Thank you for your help last week. I was in touch with MPP Solar and they provided communication protocol for LV5048. See attached. Is there way to integrate some of these commands with what you have written so far?

@jblance
Copy link
Owner

jblance commented Mar 26, 2020

Hi

Yep - if you want to do it just for you - the approach is too add/change the json files in mpp-solar/commands folder (if you do it in the download copy you'll need to reinstall afterward)

For me to do it more generically would take a bit longer as I'd need to add a way to filter commands based on what device you have (though that is probably a good idea for the future)

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

Which file? Is it lot of typing. I have a daughter at the house with nothing to do due to virus. Is it mostly copy paste type of adding commands?

Thanks,

@jblance
Copy link
Owner

jblance commented Mar 26, 2020

Depends what you want to change...
While the mpp-solar can do a summary for you with -s etc. You can also just use the raw commands like -c QPIGS, some of these are the same (e.g. QPIGS), some have changed a little (like QPGSn) and some are new (e.g. QPIGS2)
e.g. to update QPGSn you'd edit the mppsolar/commands/qpgs.json (from the downloaded content)
to create support for a new command like QPIGS2 copy mppsolar/commands/qpigs.json to mppsolar/commands/qpig2.json and update the content

Then re-install the package with sudo python ./setup.py install

Hope this helps - if not let me know your priorities and I'll try to get time to look at implementing something

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

I really do I appreciate your help. But before we put a lot of work on this, what would be the easiest way to see if these commands can communicate with all 6 inverters. 2 per chassis for 3 chassis. All I can do now is one half of one chassis.

@jblance
Copy link
Owner

jblance commented Mar 26, 2020

So what command is working now?
If you are using -s, try -c QPIGS then -c QPGS0, and -c QPGS1, and -c QPGS2 and let me see what you get

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

i@raspberrypi:~ $ sudo mpp-solar -c QPIGS -R
(122.5 59.9 122.5 59.9 0539 0486 021 228 56.10 003 100 0036 0000 000.0 00.00 00000 0100010 00 00 00000 110�p
pi@raspberrypi:~ $

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

pi@raspberrypi:~ $ sudo mpp-solar -c QPGS0 -R
2020-03-26 19:16:27,944 - MPP-Solar - mppcommand.py - ERROR - Response invalid as insufficient number of elements in response. Got 1, expected as least 27
(NAKss
pi@raspberrypi:~ $ sudo mpp-solar -c QPGS0
2020-03-26 19:16:52,081 - MPP-Solar - mppcommand.py - ERROR - Response invalid as insufficient number of elements in response. Got 1, expected as least 27
pi@raspberrypi:~ $ i@raspberrypi:~ $ sudo mpp-solar -c QPIGS -R
bash: i@raspberrypi:~: command not found

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

pi@raspberrypi:~ $ sudo mpp-solar -c QPI
protocol_id PI41

@jblance
Copy link
Owner

jblance commented Mar 26, 2020

what about sudo mpp-solar -c QPGS1 -R ?

I take it that you are using a USB to serial converter?

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

pi@raspberrypi:~ $ sudo mpp-solar -c QPGS1 -R
2020-03-26 19:33:02,609 - MPP-Solar - mppcommand.py - ERROR - Response invalid as insufficient number of elements in response. Got 1, expected as least 27
(NAKss

Same thing for additional numbers

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

Yes usb to serial

@jblance
Copy link
Owner

jblance commented Mar 26, 2020

So, sudo mpp-solar -c QPIGS -R works?
what about sudo mpp-solar -c QMOD and sudo mpp-solar -c QDI ?

(coz QPGS0 should work accord to the doc you sent

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

pi@raspberrypi:~ $ sudo mpp-solar -c QMOD
device_mode Line
pi@raspberrypi:~ $ sudo mpp-solar -c QDI
ac_output_frequency 60.0 Hz
ac_output_voltage 120.0 V
battery_bulk_charge_voltage 56.4 V
battery_float_charge_voltage 54.0 V
battery_recharge_voltage 46.0 V
battery_redischarge_voltage 54.0 V
battery_type AGM
battery_under_voltage 42.0 V
buzzer enabled
charger_source_priority Solar + Utility
input_voltage_range Appliance
lcd_backlight enabled
lcd_reset_to_default enabled
max_ac_charging_current 0030 A
max_charging_current 60 A
output_mode parallel output
output_source_priority Utility first
over_temperature_restart disabled
overload_bypass disabled
overload_restart disabled
power_saving disabled
primary_source_interrupt_alarm enabled
pv_ok_condition As long as one unit of inverters has connect PV, parallel system will consider PV OK
pv_power_balance PV input max current will be the max charged current
record_fault_code disabled
unknown_value_in_response 000

Yes, on all 3 commands

@DMIINC
Copy link
Author

DMIINC commented Mar 26, 2020

Unless all of them need to be connected via usb or serial to raspberry pi

@jblance
Copy link
Owner

jblance commented Mar 27, 2020

thats not what the doc says (i.e. it implies you can get details from any using QPGSn)
I've added a QP2GSn command, can you install the latest from git and try mpp-solar -c QP2GS0 -M LV5048 and maybe mpp-solar -c QP2GS0 -M LV5048 -D if it doesnt work
The new -M command is to limit commands to inverters that support them

@DMIINC
Copy link
Author

DMIINC commented Mar 27, 2020

pi@raspberrypi:~ $ mpp-solar -c QP2GS0 -M LV5048
ERROR:MPP-Solar:Response invalid as insufficient number of elements in response. Got 1, expected as least 17
pi@raspberrypi:~ $ mpp-solar -c QP2GS0 -M LV5048 -D
INFO:MPP-Solar:command QP2GS0
INFO:MPP-Solar:Serial device used: /dev/ttyUSB0, baud rate: 2400
INFO:MPP-Solar:Loading commands for inverter model: LV5048
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/f.json
DEBUG:MPP-Solar:Command F supported all inverters
INFO:MPP-Solar:... command F loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for F
DEBUG:MPP-Solar:Calculating CRC for F
DEBUG:MPP-Solar:Generated CRC 29 2 2902
DEBUG:MPP-Solar:Full command: F)
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/mchgc.json
DEBUG:MPP-Solar:Command MCHGC supported all inverters
INFO:MPP-Solar:... command MCHGC loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for MCHGC
DEBUG:MPP-Solar:Calculating CRC for MCHGC
DEBUG:MPP-Solar:Generated CRC 9d a2 9da2
DEBUG:MPP-Solar:Full command: MCHGC��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/mnchgc.json
DEBUG:MPP-Solar:Command MNCHGC supported all inverters
INFO:MPP-Solar:... command MNCHGC loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for MNCHGC
DEBUG:MPP-Solar:Calculating CRC for MNCHGC
DEBUG:MPP-Solar:Generated CRC 57 23 5723
DEBUG:MPP-Solar:Full command: MNCHGCW#
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/muchgc.json
DEBUG:MPP-Solar:Command MUCHGC supported all inverters
INFO:MPP-Solar:... command MUCHGC loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for MUCHGC
DEBUG:MPP-Solar:Calculating CRC for MUCHGC
DEBUG:MPP-Solar:Generated CRC bf 86 bf86
DEBUG:MPP-Solar:Full command: MUCHGC��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pbcv.json
DEBUG:MPP-Solar:Command PBCV supported all inverters
INFO:MPP-Solar:... command PBCV loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PBCV
DEBUG:MPP-Solar:Calculating CRC for PBCV
DEBUG:MPP-Solar:Generated CRC 64 5a 645a
DEBUG:MPP-Solar:Full command: PBCVdZ
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pbdv.json
DEBUG:MPP-Solar:Command PBDV supported all inverters
INFO:MPP-Solar:... command PBDV loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PBDV
DEBUG:MPP-Solar:Calculating CRC for PBDV
DEBUG:MPP-Solar:Generated CRC fd cd fdcd
DEBUG:MPP-Solar:Full command: PBDV��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pbft.json
DEBUG:MPP-Solar:Command PBFT supported all inverters
INFO:MPP-Solar:... command PBFT loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PBFT
DEBUG:MPP-Solar:Calculating CRC for PBFT
DEBUG:MPP-Solar:Generated CRC bb ed bbed
DEBUG:MPP-Solar:Full command: PBFT��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pbt.json
DEBUG:MPP-Solar:Command PBT supported all inverters
INFO:MPP-Solar:... command PBT loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PBT
DEBUG:MPP-Solar:Calculating CRC for PBT
DEBUG:MPP-Solar:Generated CRC 2f 11 2f11
DEBUG:MPP-Solar:Full command: PBT/
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pcp.json
DEBUG:MPP-Solar:Command PCP supported all inverters
INFO:MPP-Solar:... command PCP loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PCP
DEBUG:MPP-Solar:Calculating CRC for PCP
DEBUG:MPP-Solar:Generated CRC 5c a4 5ca4
DEBUG:MPP-Solar:Full command: PCP\�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pcvv.json
DEBUG:MPP-Solar:Command PCVV supported all inverters
INFO:MPP-Solar:... command PCVV loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PCVV
DEBUG:MPP-Solar:Calculating CRC for PCVV
DEBUG:MPP-Solar:Generated CRC af ec afec
DEBUG:MPP-Solar:Full command: PCVV��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pepd.json
DEBUG:MPP-Solar:Command PEPD supported all inverters
INFO:MPP-Solar:... command PEPD loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PEPD
DEBUG:MPP-Solar:Calculating CRC for PEPD
DEBUG:MPP-Solar:Generated CRC 85 99 8599
DEBUG:MPP-Solar:Full command: PEPD��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pf.json
DEBUG:MPP-Solar:Command PF supported all inverters
INFO:MPP-Solar:... command PF loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PF
DEBUG:MPP-Solar:Calculating CRC for PF
DEBUG:MPP-Solar:Generated CRC 26 bd 26bd
DEBUG:MPP-Solar:Full command: PF&�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pgr.json
DEBUG:MPP-Solar:Command PGR supported all inverters
INFO:MPP-Solar:... command PGR loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PGR
DEBUG:MPP-Solar:Calculating CRC for PGR
DEBUG:MPP-Solar:Generated CRC b0 22 b022
DEBUG:MPP-Solar:Full command: PGR�"
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pop.json
DEBUG:MPP-Solar:Command POP supported all inverters
INFO:MPP-Solar:... command POP loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for POP
DEBUG:MPP-Solar:Calculating CRC for POP
DEBUG:MPP-Solar:Generated CRC 19 c9 19c9
DEBUG:MPP-Solar:Full command: POP�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/popm.json
DEBUG:MPP-Solar:Command POPM supported all inverters
INFO:MPP-Solar:... command POPM loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for POPM
DEBUG:MPP-Solar:Calculating CRC for POPM
DEBUG:MPP-Solar:Generated CRC d3 71 d371
DEBUG:MPP-Solar:Full command: POPM�q
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/ppcp.json
DEBUG:MPP-Solar:Command PPCP supported all inverters
INFO:MPP-Solar:... command PPCP loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PPCP
DEBUG:MPP-Solar:Calculating CRC for PPCP
DEBUG:MPP-Solar:Generated CRC 29 9f 299f
DEBUG:MPP-Solar:Full command: PPCP)�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/ppvokc.json
DEBUG:MPP-Solar:Command PPVOKC supported all inverters
INFO:MPP-Solar:... command PPVOKC loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PPVOKC
DEBUG:MPP-Solar:Calculating CRC for PPVOKC
DEBUG:MPP-Solar:Generated CRC af 9 af09
DEBUG:MPP-Solar:Full command: PPVOKC�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/psdv.json
DEBUG:MPP-Solar:Command PSDV supported all inverters
INFO:MPP-Solar:... command PSDV loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PSDV
DEBUG:MPP-Solar:Calculating CRC for PSDV
DEBUG:MPP-Solar:Generated CRC 89 9e 899e
DEBUG:MPP-Solar:Full command: PSDV��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/pspb.json
DEBUG:MPP-Solar:Command PSPB supported all inverters
INFO:MPP-Solar:... command PSPB loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for PSPB
DEBUG:MPP-Solar:Calculating CRC for PSPB
DEBUG:MPP-Solar:Generated CRC 14 9c 149c
DEBUG:MPP-Solar:Full command: PSPB�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/q1.json
DEBUG:MPP-Solar:Command Q1 supported all inverters
INFO:MPP-Solar:... command Q1 loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for Q1
DEBUG:MPP-Solar:Calculating CRC for Q1
DEBUG:MPP-Solar:Generated CRC 1b fc 1bfc
DEBUG:MPP-Solar:Full command: Q1
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qboot.json
DEBUG:MPP-Solar:Command QBOOT supported all inverters
INFO:MPP-Solar:... command QBOOT loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QBOOT
DEBUG:MPP-Solar:Calculating CRC for QBOOT
DEBUG:MPP-Solar:Generated CRC b 88 b88
DEBUG:MPP-Solar:Full command: QBOOT

DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qdi.json
DEBUG:MPP-Solar:Command QDI supported all inverters
INFO:MPP-Solar:... command QDI loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QDI
DEBUG:MPP-Solar:Calculating CRC for QDI
DEBUG:MPP-Solar:Generated CRC 71 1b 711b
DEBUG:MPP-Solar:Full command: QDIq

EBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qflag.json
DEBUG:MPP-Solar:Command QFLAG supported all inverters
INFO:MPP-Solar:... command QFLAG loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QFLAG
DEBUG:MPP-Solar:Calculating CRC for QFLAG
DEBUG:MPP-Solar:Generated CRC 98 74 9874
DEBUG:MPP-Solar:Full command: QFLAG�t
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qid.json
DEBUG:MPP-Solar:Command QID supported all inverters
INFO:MPP-Solar:... command QID loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QID
DEBUG:MPP-Solar:Calculating CRC for QID
DEBUG:MPP-Solar:Generated CRC d6 ea d6ea
DEBUG:MPP-Solar:Full command: QID��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qmchgcr.json
DEBUG:MPP-Solar:Command QMCHGCR supported all inverters
INFO:MPP-Solar:... command QMCHGCR loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QMCHGCR
DEBUG:MPP-Solar:Calculating CRC for QMCHGCR
DEBUG:MPP-Solar:Generated CRC d8 55 d855
DEBUG:MPP-Solar:Full command: QMCHGCR�U
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qmod.json
DEBUG:MPP-Solar:Command QMOD supported all inverters
INFO:MPP-Solar:... command QMOD loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QMOD
DEBUG:MPP-Solar:Calculating CRC for QMOD
DEBUG:MPP-Solar:Generated CRC 49 c1 49c1
DEBUG:MPP-Solar:Full command: QMODI�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qmuchgcr.json
DEBUG:MPP-Solar:Command QMUCHGCR supported all inverters
INFO:MPP-Solar:... command QMUCHGCR loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QMUCHGCR
DEBUG:MPP-Solar:Calculating CRC for QMUCHGCR
DEBUG:MPP-Solar:Generated CRC 26 34 2634
DEBUG:MPP-Solar:Full command: QMUCHGCR&4
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qopm.json
DEBUG:MPP-Solar:Command QOPM supported all inverters
INFO:MPP-Solar:... command QOPM loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QOPM
DEBUG:MPP-Solar:Calculating CRC for QOPM
DEBUG:MPP-Solar:Generated CRC a5 c5 a5c5
DEBUG:MPP-Solar:Full command: QOPM��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qp2gs.json
DEBUG:MPP-Solar:Command QP2GSn supported by model LV5048
INFO:MPP-Solar:... command QP2GSn loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QP2GSn
DEBUG:MPP-Solar:Calculating CRC for QP2GSn
DEBUG:MPP-Solar:Generated CRC af 3e af3e
DEBUG:MPP-Solar:Full command: QP2GSn�>
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpgs.json
DEBUG:MPP-Solar:Command QPGSn supported all inverters
INFO:MPP-Solar:... command QPGSn loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QPGSn
DEBUG:MPP-Solar:Calculating CRC for QPGSn
DEBUG:MPP-Solar:Generated CRC 84 e1 84e1
DEBUG:MPP-Solar:Full command: QPGSn��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpi.json
DEBUG:MPP-Solar:Command QPI supported all inverters
INFO:MPP-Solar:... command QPI loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QPI
DEBUG:MPP-Solar:Calculating CRC for QPI
DEBUG:MPP-Solar:Generated CRC be ac beac
DEBUG:MPP-Solar:Full command: QPI��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpigs-lv.json
DEBUG:MPP-Solar:Command QPIGS supported by model LV5048
INFO:MPP-Solar:... command QPIGS loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QPIGS
DEBUG:MPP-Solar:Calculating CRC for QPIGS
DEBUG:MPP-Solar:Generated CRC b7 a9 b7a9
DEBUG:MPP-Solar:Full command: QPIGS��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpigs.json
DEBUG:MPP-Solar:Command QPIGS not supported on inverter LV5048
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpigs2.json
DEBUG:MPP-Solar:Command QPIGS2 supported by model LV5048
INFO:MPP-Solar:... command QPIGS2 loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QPIGS2
DEBUG:MPP-Solar:Calculating CRC for QPIGS2
DEBUG:MPP-Solar:Generated CRC 68 2d 682d
DEBUG:MPP-Solar:Full command: QPIGS2h-
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpiri-lv.json
DEBUG:MPP-Solar:Command QPIRI supported by model LV5048
INFO:MPP-Solar:... command QPIRI loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QPIRI
DEBUG:MPP-Solar:Calculating CRC for QPIRI
DEBUG:MPP-Solar:Generated CRC f8 54 f854
DEBUG:MPP-Solar:Full command: QPIRI�T
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpiri.json
DEBUG:MPP-Solar:Command QPIRI not supported on inverter LV5048
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qpiws.json
DEBUG:MPP-Solar:Command QPIWS supported all inverters
INFO:MPP-Solar:... command QPIWS loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QPIWS
DEBUG:MPP-Solar:Calculating CRC for QPIWS
DEBUG:MPP-Solar:Generated CRC b4 da b4da
DEBUG:MPP-Solar:Full command: QPIWS��
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qvfw.json
DEBUG:MPP-Solar:Command QVFW supported all inverters
INFO:MPP-Solar:... command QVFW loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QVFW
DEBUG:MPP-Solar:Calculating CRC for QVFW
DEBUG:MPP-Solar:Generated CRC 62 99 6299
DEBUG:MPP-Solar:Full command: QVFWb�
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python2.7/dist-packages/mpp_solar-0.2.2-py2.7.egg/mppsolar/commands/qvfw2.json
DEBUG:MPP-Solar:Command QVFW2 supported all inverters
INFO:MPP-Solar:... command QVFW2 loaded for inverter model: LV5048
DEBUG:MPP-Solar:Generate full command for QVFW2
DEBUG:MPP-Solar:Calculating CRC for QVFW2
DEBUG:MPP-Solar:Generated CRC c3 f5 c3f5
DEBUG:MPP-Solar:Full command: QVFW2��
DEBUG:MPP-Solar:Searching for cmd 'QP2GS0'
DEBUG:MPP-Solar:Matched: QP2GSn Value: 0
DEBUG:MPP-Solar:Generate full command for QP2GSn0
DEBUG:MPP-Solar:Calculating CRC for QP2GSn0
DEBUG:MPP-Solar:Generated CRC 4c 56 4c56
DEBUG:MPP-Solar:Full command: QP2GSn0LV
INFO:MPP-Solar:SERIAL connection: executing QP2GSn
Parallel Information inquiry
-- example: QP2GS1 queries the values of various metrics from instance 1 of parallel setup Inverters (numbers from 0)

DEBUG:MPP-Solar:port /dev/ttyUSB0, baudrate 2400
DEBUG:MPP-Solar:Command execution attempt 1...
DEBUG:MPP-Solar:serial response was: (NAKss
DEBUG:MPP-Solar:Response length: 7
DEBUG:MPP-Solar:CRC resp 73 73
DEBUG:MPP-Solar:Calculating CRC for (NAK
DEBUG:MPP-Solar:Generated CRC 73 73 7373
DEBUG:MPP-Solar:CRC calc 73 73
DEBUG:MPP-Solar:CRCs match
ERROR:MPP-Solar:Response invalid as insufficient number of elements in response. Got 1, expected as least 17
INFO:MPP-Solar:Invalid response
pi@raspberrypi:~ $

@jblance
Copy link
Owner

jblance commented Mar 28, 2020

Weird - your inverter doesn't seem to respond to the new commands in the documentation, or the documentation is incorrrect? Maybe you have a 2 digit ID or the ID isnt 0-3??
Did it come with software?

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

Yes. Windows side. It is called watch power. https://usa-mpp-solar.com/manuals/Software/WatchPowerV1.13SP3(latest)/ and you can find Linux stuff on that link.

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

I know just weird. I have been pulling my hair out for last 4 weeks. Just can't figure it out.

@jblance
Copy link
Owner

jblance commented Mar 28, 2020

Can you check the inverters to see what IDs are set
Page39 of the user manual has some details
https://usa-mpp-solar.com/manuals/LV5048%20split%20phase%20manual-20191024.pdf

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

They are set as they requested it. System is performing flawlessly.

@jblance
Copy link
Owner

jblance commented Mar 28, 2020

So the dip switches have the IDs set to 0 and 1?

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

If you look at the diagram all three are set as they want them to be.

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020 via email

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

20200327_203013_resized
20200327_203029_resized
20200327_203411_resized

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

Watch power app does see all three.

@jblance
Copy link
Owner

jblance commented Mar 28, 2020

Nice setup
I was meaning the ID number - was wondering if they were set to something other than 0,1,2 - the manual says it could be 0-7 and as long as they are all different everything will work
image
image

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

Yes they are different
#1 off off off
#2 on off off and
#3 off on off

@DMIINC
Copy link
Author

DMIINC commented Mar 28, 2020

Thanks,

@jblance
Copy link
Owner

jblance commented Mar 28, 2020

Does the command QPIGS2 work?
i.e. mpp-solar -c QPIGS2 -M LV5048 -I

@DMIINC
Copy link
Author

DMIINC commented Apr 2, 2020

How do I start from begining. All I see is this

GNU nano 3.2 /tmp/crontab.qBSB5G/crontab

Edit this file to introduce tasks to be run by cron.

Each task to run has to be defined through a single line

indicating with different fields when the task will be run

and what command to run for the task

To define the time you can provide concrete values for

minute (m), hour (h), day of month (dom), month (mon),

and day of week (dow) or use '*' in these fields (for 'any').

Notice that tasks will be started based on the cron's system

daemon's notion of time and timezones.

Output of the crontab jobs (including errors) is sent through

email to the user the crontab file belongs to (unless redirected).

For example, you can run a backup of all your user accounts

at 5 a.m every week with:

0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

                                        [ Read 23 lines ]

^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos M-U Undo
^X Exit ^R Read File ^\ Replace ^U Uncut Text ^T To Spell ^_ Go To Line M-E Redo

@jblance
Copy link
Owner

jblance commented Apr 2, 2020

use the arrow keys to go to the bottom (any line with a # is a comment)
once there type or paste in the command
* * * * * /usr/local/bin/mpp-info-pub -q localhost -c QPGS0,QP2GS0,QPGS1,QP2GS1,QPGS2,QP2GS2
then control + o and enter to write out the file
then control + x to exit
then crontab -l to check <- post this output

@DMIINC
Copy link
Author

DMIINC commented Apr 2, 2020

pi@raspberrypi:~ $ crontab -l

Edit this file to introduce tasks to be run by cron.

Each task to run has to be defined through a single line

indicating with different fields when the task will be run

and what command to run for the task

To define the time you can provide concrete values for

minute (m), hour (h), day of month (dom), month (mon),

and day of week (dow) or use '*' in these fields (for 'any').

Notice that tasks will be started based on the cron's system

daemon's notion of time and timezones.

Output of the crontab jobs (including errors) is sent through

email to the user the crontab file belongs to (unless redirected).

For example, you can run a backup of all your user accounts

at 5 a.m every week with:

0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

For more information see the manual pages of crontab(5) and cron(8)

m h dom mon dow command

        • /usr/local/bin/mpp-info-pub -q localhost -c QPGS0,QP2GS0,QPGS1,QP2GS1,QPGS2,QP2GS2

pi@raspberrypi:~ $

@jblance
Copy link
Owner

jblance commented Apr 2, 2020

looks ok
as a side note when you are pasting 'code' if you put 3 backticks (next to the 1 key on my keyboard) at the start and the end it will look like below

code
# comment
etc 
* * 

makes it easier to read and follow

@jblance
Copy link
Owner

jblance commented Apr 2, 2020

now after a minute the CMD1 window should show more info (might pay to stop and rerun the command)

@DMIINC
Copy link
Author

DMIINC commented Apr 2, 2020

Ok. Close this CMD 1 and open new one and execute same command again I will assume

@jblance
Copy link
Owner

jblance commented Apr 2, 2020

basically yes
in a clear window run mosquitto_sub -h localhost -v -t "#"

@DMIINC
Copy link
Author

DMIINC commented Apr 2, 2020

I did. Waiting for data

@DMIINC
Copy link
Author

DMIINC commented Apr 2, 2020

no data yet

@jblance
Copy link
Owner

jblance commented Apr 3, 2020

is the command (with the * * * * *) all on one line?

@DMIINC
Copy link
Author

DMIINC commented Apr 3, 2020

yes

@jblance
Copy link
Owner

jblance commented Apr 3, 2020

we'll need to add your model to the command and track errors, i.e. change the command part of the crontab to
/usr/local/bin/mpp-info-pub -q localhost -M LV5048 -c QPGS0,QP2GS0,QPGS1,QP2GS1,QPGS2,QP2GS2 > /home/pi/cron.out 2>&1

@jblance
Copy link
Owner

jblance commented Apr 3, 2020

do you use any chat system (might be easier than these messages?)

@DMIINC
Copy link
Author

DMIINC commented Apr 3, 2020

what do you have?

@jblance
Copy link
Owner

jblance commented Apr 3, 2020

hangouts, messenger, whatsapp etc

@DMIINC
Copy link
Author

DMIINC commented Apr 3, 2020

whats up I have

@DMIINC
Copy link
Author

DMIINC commented Apr 3, 2020

whatsapp i meant I am at 404-710-4876

@DMIINC
Copy link
Author

DMIINC commented Apr 3, 2020

I installed everything including the telegraf.

@jblance
Copy link
Owner

jblance commented Apr 3, 2020

Did you configure grafana with an influx source?

@jblance
Copy link
Owner

jblance commented Apr 3, 2020

Which instructions did you use ?

@DMIINC
Copy link
Author

DMIINC commented Apr 3, 2020

On your github page
and no on grafana with an influx source

@jblance
Copy link
Owner

jblance commented Apr 4, 2020

Commands added and filter by model available for LV5048

@jblance jblance closed this as completed Apr 4, 2020
@cheomfp
Copy link

cheomfp commented Apr 13, 2020

Very interesting the project!
I have one of these inverters (MPP SOLAR LV5048), and I would like them to help me get all this started, as I don't have much knowledge in the area. I have Teamviwer installed on the Raspberry Pi in case one of you is willing to give me remote assistance, I will be very grateful to you!

@DMIINC
Copy link
Author

DMIINC commented Apr 13, 2020

Hello,
jblance has done amazing job on this. Thank you. I have never even typed single command in Linux until getting the Raspberry Pi and was able , albeit with little help to get this going. By the looks of it you might be ahead of me since you knew how to install team viewer. Have you tried installing his code? He wrote couple of read me files that will help you greatly to get it going. If you don't mind please read through them to better understand what we are trying to do. I will help as much as I can. I am still working on word document on how to install (for us Linux challenged people) and get it going but will run it by jblance before posting it. Thanks,

@cheomfp
Copy link

cheomfp commented Apr 13, 2020

Hello! I really appreciate your time.
I have read the status of my inverter (mpp-solar -s -d dev / hydraw0), I am using USB direct, but I have not yet managed to link everything with GRAFANA. I don't know where to write the commands to get the graphical reading in grafana. I apologize I am a beginner in this, the little I have achieved is thanks to the JBLANCE project and you ...

@DMIINC
Copy link
Author

DMIINC commented Apr 13, 2020

Half way down the main page you can click on the link Setup Instructions or https://github.com/jblance/mpp-solar/blob/master/docs/MQTT_Influx_Grafana.md. Now that you have his code installed you will need to get other stuff going. MQTT, Influxdb, Telegraf, Grafana and https://github.com/jblance/mpp-solar/tree/master/daemon

@cheomfp
Copy link

cheomfp commented Apr 13, 2020

Hello!
I'm still testing, but I haven't seen anything on GRAFANA. I have installed everything with successes, I think I am missing some configuration.
the investor responds to the compando, here is a photo attached:
inv

@DMIINC
Copy link
Author

DMIINC commented Apr 13, 2020

Have you followed links in previous post? Or if you have issue try opening new thread. But by the looks of it you are getting somewhere.

@cheomfp
Copy link

cheomfp commented Apr 13, 2020

I have made several attempts but not yet any reading in Grafana.
In the terminal all the commands respond but I don't know what to do after there.
I am very thankfull for your help. I will keep trying until I get results.
THANK YOU!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants