jblance / mpp-solar

Python package to communicate to MPP Solar PIP-4048MS inverters (and similar)
MIT License
355 stars 149 forks source link

Not able to connect to MPP Hybrid LV2424 Inverter #53

Closed danb35 closed 3 years ago

danb35 commented 3 years ago

This looks similar to #25, but that issue is closed, and I'm not sure it's actually dealing with the same model (as the model numbering is still a little confusing to me). The "model name" is marked (both on the box and on the inverter itself) as "HV LV 2424." Using release 0.4.6, I'm not able to connect to--or at least retrieve useful information from--the inverter. Using some of the troubleshooting commands in the other issue, it looks like it's using protocol 18:

pi@solpiplog:~ $ sudo mpp-solar -c PI -M PI18 -d /dev/hidraw0
protocol_version                18              

But it won't even retrieve the device's serial number:

pi@solpiplog:~ $ sudo mpp-solar -M PI18 -d /dev/hidraw0
serial_number                                   

And an information query returns an error:

pi@solpiplog:~ $ sudo mpp-solar -c QPIRI -M PI18 -d /dev/hidraw0
error                           Invalid byte_response 
response                                        

Debug information below:

pi@solpiplog:~ $ sudo mpp-solar -c PI -D -M PI18 -d /dev/hidraw0
INFO:MPP-Solar:command PI
INFO:MPP-Solar:Serial device used: /dev/hidraw0, baud rate: 2400
DEBUG:MPP-Solar:Device matches hidraw regex
INFO:MPP-Solar:Loading commands for inverter model: PI18
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/_pi18_et.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command ET supported by model PI18
INFO:MPP-Solar:... command ET loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for ^P005ET
DEBUG:MPP-Solar:Calculating CRC for b'^P005ET'
DEBUG:MPP-Solar:Generated CRC 4e 91 4e91
DEBUG:MPP-Solar:Full byte command: b'^P005ETN\x91\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/_pi18_gs.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command GS supported by model PI18
INFO:MPP-Solar:... command GS loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for ^P005GS
DEBUG:MPP-Solar:Calculating CRC for b'^P005GS'
DEBUG:MPP-Solar:Generated CRC 58 14 5814
DEBUG:MPP-Solar:Full byte command: b'^P005GSX\x14\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/_pi18_mod.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command MOD supported by model PI18
INFO:MPP-Solar:... command MOD loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for ^P006MOD
DEBUG:MPP-Solar:Calculating CRC for b'^P006MOD'
DEBUG:MPP-Solar:Generated CRC dd be ddbe
DEBUG:MPP-Solar:Full byte command: b'^P006MOD\xdd\xbe\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/_pi18_pi.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PI supported by model PI18
INFO:MPP-Solar:... command PI loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for ^P005PI
DEBUG:MPP-Solar:Calculating CRC for b'^P005PI'
DEBUG:MPP-Solar:Generated CRC 71 8b 718b
DEBUG:MPP-Solar:Full byte command: b'^P005PIq\x8b\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/f.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command F supported all inverters
INFO:MPP-Solar:... command F loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for F
DEBUG:MPP-Solar:Calculating CRC for b'F'
DEBUG:MPP-Solar:Generated CRC 29 2 2902
DEBUG:MPP-Solar:Full byte command: b'F)\x02\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/mchgc.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command MCHGC supported all inverters
INFO:MPP-Solar:... command MCHGC loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for MCHGC
DEBUG:MPP-Solar:Calculating CRC for b'MCHGC'
DEBUG:MPP-Solar:Generated CRC 9d a2 9da2
DEBUG:MPP-Solar:Full byte command: b'MCHGC\x9d\xa2\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/mnchgc.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command MNCHGC supported all inverters
INFO:MPP-Solar:... command MNCHGC loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for MNCHGC
DEBUG:MPP-Solar:Calculating CRC for b'MNCHGC'
DEBUG:MPP-Solar:Generated CRC 57 23 5723
DEBUG:MPP-Solar:Full byte command: b'MNCHGCW#\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/muchgc.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command MUCHGC supported all inverters
INFO:MPP-Solar:... command MUCHGC loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for MUCHGC
DEBUG:MPP-Solar:Calculating CRC for b'MUCHGC'
DEBUG:MPP-Solar:Generated CRC bf 86 bf86
DEBUG:MPP-Solar:Full byte command: b'MUCHGC\xbf\x86\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pbcv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PBCV supported all inverters
INFO:MPP-Solar:... command PBCV loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PBCV
DEBUG:MPP-Solar:Calculating CRC for b'PBCV'
DEBUG:MPP-Solar:Generated CRC 64 5a 645a
DEBUG:MPP-Solar:Full byte command: b'PBCVdZ\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pbdv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PBDV supported all inverters
INFO:MPP-Solar:... command PBDV loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PBDV
DEBUG:MPP-Solar:Calculating CRC for b'PBDV'
DEBUG:MPP-Solar:Generated CRC fd cd fdcd
DEBUG:MPP-Solar:Full byte command: b'PBDV\xfd\xcd\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pbft.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PBFT supported all inverters
INFO:MPP-Solar:... command PBFT loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PBFT
DEBUG:MPP-Solar:Calculating CRC for b'PBFT'
DEBUG:MPP-Solar:Generated CRC bb ed bbed
DEBUG:MPP-Solar:Full byte command: b'PBFT\xbb\xed\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pbt.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PBT supported all inverters
INFO:MPP-Solar:... command PBT loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PBT
DEBUG:MPP-Solar:Calculating CRC for b'PBT'
DEBUG:MPP-Solar:Generated CRC 2f 11 2f11
DEBUG:MPP-Solar:Full byte command: b'PBT/\x11\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pcp.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PCP supported all inverters
INFO:MPP-Solar:... command PCP loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PCP
DEBUG:MPP-Solar:Calculating CRC for b'PCP'
DEBUG:MPP-Solar:Generated CRC 5c a4 5ca4
DEBUG:MPP-Solar:Full byte command: b'PCP\\\xa4\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pcvv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PCVV supported all inverters
INFO:MPP-Solar:... command PCVV loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PCVV
DEBUG:MPP-Solar:Calculating CRC for b'PCVV'
DEBUG:MPP-Solar:Generated CRC af ec afec
DEBUG:MPP-Solar:Full byte command: b'PCVV\xaf\xec\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pepd.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PEPD supported all inverters
INFO:MPP-Solar:... command PEPD loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PEPD
DEBUG:MPP-Solar:Calculating CRC for b'PEPD'
DEBUG:MPP-Solar:Generated CRC 85 99 8599
DEBUG:MPP-Solar:Full byte command: b'PEPD\x85\x99\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pf.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PF supported all inverters
INFO:MPP-Solar:... command PF loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PF
DEBUG:MPP-Solar:Calculating CRC for b'PF'
DEBUG:MPP-Solar:Generated CRC 26 bd 26bd
DEBUG:MPP-Solar:Full byte command: b'PF&\xbd\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pgr.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PGR supported all inverters
INFO:MPP-Solar:... command PGR loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PGR
DEBUG:MPP-Solar:Calculating CRC for b'PGR'
DEBUG:MPP-Solar:Generated CRC b0 22 b022
DEBUG:MPP-Solar:Full byte command: b'PGR\xb0"\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pop.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command POP supported all inverters
INFO:MPP-Solar:... command POP loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for POP
DEBUG:MPP-Solar:Calculating CRC for b'POP'
DEBUG:MPP-Solar:Generated CRC 19 c9 19c9
DEBUG:MPP-Solar:Full byte command: b'POP\x19\xc9\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/popm.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command POPM supported all inverters
INFO:MPP-Solar:... command POPM loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for POPM
DEBUG:MPP-Solar:Calculating CRC for b'POPM'
DEBUG:MPP-Solar:Generated CRC d3 71 d371
DEBUG:MPP-Solar:Full byte command: b'POPM\xd3q\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/ppcp.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PPCP supported all inverters
INFO:MPP-Solar:... command PPCP loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PPCP
DEBUG:MPP-Solar:Calculating CRC for b'PPCP'
DEBUG:MPP-Solar:Generated CRC 29 9f 299f
DEBUG:MPP-Solar:Full byte command: b'PPCP)\x9f\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/ppvokc.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PPVOKC supported all inverters
INFO:MPP-Solar:... command PPVOKC loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PPVOKC
DEBUG:MPP-Solar:Calculating CRC for b'PPVOKC'
DEBUG:MPP-Solar:Generated CRC af 9 af09
DEBUG:MPP-Solar:Full byte command: b'PPVOKC\xaf\t\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/psdv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PSDV supported all inverters
INFO:MPP-Solar:... command PSDV loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PSDV
DEBUG:MPP-Solar:Calculating CRC for b'PSDV'
DEBUG:MPP-Solar:Generated CRC 89 9e 899e
DEBUG:MPP-Solar:Full byte command: b'PSDV\x89\x9e\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/pspb.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command PSPB supported all inverters
INFO:MPP-Solar:... command PSPB loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for PSPB
DEBUG:MPP-Solar:Calculating CRC for b'PSPB'
DEBUG:MPP-Solar:Generated CRC 14 9c 149c
DEBUG:MPP-Solar:Full byte command: b'PSPB\x14\x9c\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/q1.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command Q1 supported all inverters
INFO:MPP-Solar:... command Q1 loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for Q1
DEBUG:MPP-Solar:Calculating CRC for b'Q1'
DEBUG:MPP-Solar:Generated CRC 1b fc 1bfc
DEBUG:MPP-Solar:Full byte command: b'Q1\x1b\xfc\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qboot.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QBOOT supported all inverters
INFO:MPP-Solar:... command QBOOT loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QBOOT
DEBUG:MPP-Solar:Calculating CRC for b'QBOOT'
DEBUG:MPP-Solar:Generated CRC b 88 b88
DEBUG:MPP-Solar:Full byte command: b'QBOOT\x0b\x88\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qdi.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QDI supported all inverters
INFO:MPP-Solar:... command QDI loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QDI
DEBUG:MPP-Solar:Calculating CRC for b'QDI'
DEBUG:MPP-Solar:Generated CRC 71 1b 711b
DEBUG:MPP-Solar:Full byte command: b'QDIq\x1b\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qflag.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QFLAG supported all inverters
INFO:MPP-Solar:... command QFLAG loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QFLAG
DEBUG:MPP-Solar:Calculating CRC for b'QFLAG'
DEBUG:MPP-Solar:Generated CRC 98 74 9874
DEBUG:MPP-Solar:Full byte command: b'QFLAG\x98t\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qgmn.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QGMN supported all inverters
INFO:MPP-Solar:... command QGMN loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QGMN
DEBUG:MPP-Solar:Calculating CRC for b'QGMN'
DEBUG:MPP-Solar:Generated CRC 49 29 4929
DEBUG:MPP-Solar:Full byte command: b'QGMNI)\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qid.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QID supported all inverters
INFO:MPP-Solar:... command QID loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QID
DEBUG:MPP-Solar:Calculating CRC for b'QID'
DEBUG:MPP-Solar:Generated CRC d6 ea d6ea
DEBUG:MPP-Solar:Full byte command: b'QID\xd6\xea\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qmchgcr.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QMCHGCR supported all inverters
INFO:MPP-Solar:... command QMCHGCR loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QMCHGCR
DEBUG:MPP-Solar:Calculating CRC for b'QMCHGCR'
DEBUG:MPP-Solar:Generated CRC d8 55 d855
DEBUG:MPP-Solar:Full byte command: b'QMCHGCR\xd8U\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qmn.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QMN supported all inverters
INFO:MPP-Solar:... command QMN loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QMN
DEBUG:MPP-Solar:Calculating CRC for b'QMN'
DEBUG:MPP-Solar:Generated CRC bb 64 bb64
DEBUG:MPP-Solar:Full byte command: b'QMN\xbbd\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qmod.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QMOD supported all inverters
INFO:MPP-Solar:... command QMOD loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QMOD
DEBUG:MPP-Solar:Calculating CRC for b'QMOD'
DEBUG:MPP-Solar:Generated CRC 49 c1 49c1
DEBUG:MPP-Solar:Full byte command: b'QMODI\xc1\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qmuchgcr.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QMUCHGCR supported all inverters
INFO:MPP-Solar:... command QMUCHGCR loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QMUCHGCR
DEBUG:MPP-Solar:Calculating CRC for b'QMUCHGCR'
DEBUG:MPP-Solar:Generated CRC 26 34 2634
DEBUG:MPP-Solar:Full byte command: b'QMUCHGCR&4\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qopm.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QOPM supported all inverters
INFO:MPP-Solar:... command QOPM loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QOPM
DEBUG:MPP-Solar:Calculating CRC for b'QOPM'
DEBUG:MPP-Solar:Generated CRC a5 c5 a5c5
DEBUG:MPP-Solar:Full byte command: b'QOPM\xa5\xc5\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qp2gs.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpgs-lv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpgs.json
DEBUG:MPP-Solar:-----No supports ['LV5048']
DEBUG:MPP-Solar:Command QPGS supported all inverters
INFO:MPP-Solar:... command QPGS loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QPGS
DEBUG:MPP-Solar:Calculating CRC for b'QPGS'
DEBUG:MPP-Solar:Generated CRC a3 8c a38c
DEBUG:MPP-Solar:Full byte command: b'QPGS\xa3\x8c\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpi.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QPI supported all inverters
INFO:MPP-Solar:... command QPI loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QPI
DEBUG:MPP-Solar:Calculating CRC for b'QPI'
DEBUG:MPP-Solar:Generated CRC be ac beac
DEBUG:MPP-Solar:Full byte command: b'QPI\xbe\xac\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpigs-lv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpigs.json
DEBUG:MPP-Solar:-----No supports ['LV5048']
DEBUG:MPP-Solar:Command QPIGS supported all inverters
INFO:MPP-Solar:... command QPIGS loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QPIGS
DEBUG:MPP-Solar:Calculating CRC for b'QPIGS'
DEBUG:MPP-Solar:Generated CRC b7 a9 b7a9
DEBUG:MPP-Solar:Full byte command: b'QPIGS\xb7\xa9\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpigs2.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpiri-lv.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpiri.json
DEBUG:MPP-Solar:-----No supports ['LV5048']
DEBUG:MPP-Solar:Command QPIRI supported all inverters
INFO:MPP-Solar:... command QPIRI loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QPIRI
DEBUG:MPP-Solar:Calculating CRC for b'QPIRI'
DEBUG:MPP-Solar:Generated CRC f8 54 f854
DEBUG:MPP-Solar:Full byte command: b'QPIRI\xf8T\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qpiws.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QPIWS supported all inverters
INFO:MPP-Solar:... command QPIWS loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QPIWS
DEBUG:MPP-Solar:Calculating CRC for b'QPIWS'
DEBUG:MPP-Solar:Generated CRC b4 da b4da
DEBUG:MPP-Solar:Full byte command: b'QPIWS\xb4\xda\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qvfw.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QVFW supported all inverters
INFO:MPP-Solar:... command QVFW loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QVFW
DEBUG:MPP-Solar:Calculating CRC for b'QVFW'
DEBUG:MPP-Solar:Generated CRC 62 99 6299
DEBUG:MPP-Solar:Full byte command: b'QVFWb\x99\r'
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.6-py3.7.egg/mppsolar/commands/qvfw2.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Command QVFW2 supported all inverters
INFO:MPP-Solar:... command QVFW2 loaded for inverter model: PI18
DEBUG:MPP-Solar:Generate full byte command for QVFW2
DEBUG:MPP-Solar:Calculating CRC for b'QVFW2'
DEBUG:MPP-Solar:Generated CRC c3 f5 c3f5
DEBUG:MPP-Solar:Full byte command: b'QVFW2\xc3\xf5\r'
DEBUG:MPP-Solar:Searching for cmd 'PI'
INFO:MPP-Solar:DIRECT USB connection: executing PI
Device Protocol Version inquiry
 -- queries the device protocol version

DEBUG:MPP-Solar:length of to_send: 10
DEBUG:MPP-Solar:2 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'^D00518;\x03\r'
DEBUG:MPP-Solar:Byte_Response length: 10
DEBUG:MPP-Solar:CRC resp     59, 3
DEBUG:MPP-Solar:Calculating CRC for b'^D00518'
DEBUG:MPP-Solar:Generated CRC 3b 3 3b03
DEBUG:MPP-Solar:CRC calc     59 3
DEBUG:MPP-Solar:CRCs match
DEBUG:MPP-Solar:getResponse with protocol = PI18
DEBUG:MPP-Solar:Response valid as no invalid situations found
DEBUG:MPP-Solar:getResponse with protocol = PI18
DEBUG:MPP-Solar:getResponse with protocol = PI18
protocol_version                18              
pi@solpiplog:~ $ 
danb35 commented 3 years ago

When passing -c QPIRI instead, the last section of the DEBUG output reads as follows:

DEBUG:MPP-Solar:Searching for cmd 'QPIRI'
INFO:MPP-Solar:DIRECT USB connection: executing QPIRI
Current Settings inquiry
 -- queries the current settings from the Inverter

DEBUG:MPP-Solar:length of to_send: 8
DEBUG:MPP-Solar:1 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'^0\x1b\xe3\r'
DEBUG:MPP-Solar:Byte_Response length: 5
DEBUG:MPP-Solar:CRC resp     27, 227
DEBUG:MPP-Solar:Calculating CRC for b'^0'
DEBUG:MPP-Solar:Generated CRC 1b e3 1be3
DEBUG:MPP-Solar:CRC calc     27 227
DEBUG:MPP-Solar:CRCs match
DEBUG:MPP-Solar:getResponse with protocol = PI18
DEBUG:MPP-Solar:Response invalid as insufficient number of elements in byte_response. Got 1, expected as least 25
INFO:MPP-Solar:Invalid byte_response
DEBUG:MPP-Solar:getResponse with protocol = PI18
error                           Invalid byte_response 
response                                        
pi@solpiplog:~ $ 
jblance commented 3 years ago

Pi18 has different commands Try one of the below instead of PI GS ET MOD

jblance commented 3 years ago

Probably better to use the latest code for your model of inverter to be honest (even though it is marked unstable)

danb35 commented 3 years ago

Ah, that looks better:

pi@solpiplog:~ $ mpp-solar -c GS -M PI18 -d /dev/hidraw0
ac_output_active_power          1014            W
ac_output_apparent_power        1097            VA
ac_output_frequency             60.0            Hz
ac_output_voltage               120.6           V
battery_capacity                100             %
battery_charging_current        1               A
battery_discharge_current       0               A
battery_power_direction         charge          
battery_voltage                 27.1            V
battery_voltage_from_scc        27.1            V
battery_voltage_from_scc2       0.0             V
dc/ac_power_direction           AC-DC           
grid_frequency                  60.0            Hz
grid_voltage                    120.6           V
inverter_heat_sink_temperature  33              oC
line_power_direction            input           
load_connection                 connect         
local_parallel_id               0               
mppt1_charger_status            charging        
mppt1_charger_temperature       38              oC
mppt2_charger_status            abnormal        
mppt2_charger_temperature       0               oC
output_load_percent             42              %
pv1_input_power                 35              W
pv1_input_voltage               65.6            V
pv2_input_power                 0               W
pv2_input_voltage               0.0             V
setting_value_configuration_state   Something changed 
pi@solpiplog:~ $ mpp-solar -c ET -M PI18 -d /dev/hidraw0
total_generated_energy          317             KWh
pi@solpiplog:~ $ mpp-solar -c MOD -M PI18 -d /dev/hidraw0
working_mode                    Hybrid mode(Line mode, Grid mode) 

I'll give the new code a shot. [s]Is there a reference for Pi18?[/s] Never mind, I see https://github.com/jblance/mpp-solar/blob/master/docs/PI18_InfiniSolar-V-protocol-20170926.pdf

jblance commented 3 years ago

There is a doc in the docs directory and the new code should have an option to display avaliable commands (pi18 hasn't had many implemented as yet)