jblance / mpp-solar

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

Q1 query protocol change? #23

Closed danieltroger closed 4 years ago

danieltroger commented 4 years ago

this is what happens when I try q1 query on PIP-4024MSP:

Note this line DEBUG:MPP-Solar:usb byte_response was: b'(1 0 0000 15472 00001 00 00 03 000 026 019 028 00 00 000 0040 0000 0000 00.00 11\x0e\xc8\r' and compare with ["(00000 00000 01 01 00 059 045 053 068 00 00 000 0040 0580 0000 50.00 139", "39B9"] from here

They seem to have added 3 more values

pi@zero:/var/log $ mpp-solar -d /dev/hidraw0 -c Q1 -D
INFO:MPP-Solar:command Q1
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: standard
[...snip...]
DEBUG:MPP-Solar:Searching for cmd 'Q1'
INFO:MPP-Solar:DIRECT USB connection: executing Q1
Q1 query

DEBUG:MPP-Solar:length of to_send: 5
DEBUG:MPP-Solar:1 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'(1 0 0000 15472 00001 00 00 03 000 026 019 028 00 00 000 0040 0000 0000 00.00 11\x0e\xc8\r'
Traceback (most recent call last):
  File "/usr/local/bin/mpp-solar", line 11, in <module>
    load_entry_point('mpp-solar==0.4.1', 'console_scripts', 'mpp-solar')()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/__init__.py", line 83, in main
    results = mp.getResponseDict(args.command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mpputils.py", line 40, in getResponseDict
    return self.inverter.getResponseDict(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 215, in getResponseDict
    result = self.execute(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 351, in execute
    return self._doDirectUsbCommand(command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 335, in _doDirectUsbCommand
    command.setByteResponse(response_line)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 139, in setByteResponse
    self.response_dict = self.getResponseDict()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 443, in getResponseDict
    msgs[key] = [resp_format[2][int(result)], '']
IndexError: list index out of range
jblance commented 4 years ago

Yeah it definitely looks different to what I have seen - unfortuately it is also an undocumented command - so makes it very difficult to use I found it useful, but cant really do much without knowing what it actually is (and different models seem to use different command response definitions too)

jblance commented 4 years ago

Do you know what each of the response items are? Can you also run a mpp-solar -c QPI command and provide the output Cheers

danieltroger commented 4 years ago
pi@zero:~ $ mpp-solar -c QPI -d /dev/hidraw0 
protocol_id                     87              
unknown_value_in_byte_response  000
danieltroger commented 4 years ago

That sucks :( I don't really know what the values are. I'm trying to figure out how many watts I'm getting from solar, but maybe multiplying battery_voltage_from_scc and pv_input_current is the easiest way. Idk how watchpower does it.

What makes it even more difficult is that the command returns different stuff every time it is run. Here's what I got atm, have seen some other responses too:

pi@zero:~ $ mpp-solar -c Q1 -D -d /dev/hidraw0 
INFO:MPP-Solar:command Q1
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: standard
[...snip...]
DEBUG:MPP-Solar:Searching for cmd 'Q1'
INFO:MPP-Solar:DIRECT USB connection: executing Q1
Q1 query
DEBUG:MPP-Solar:length of to_send: 5
DEBUG:MPP-Solar:1 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'(0 0 0000 15472 00001 01 01 00 034 027 025 032 01 00 000 0040 0024 0000 00.00 11\xaa\xe0\r'
Traceback (most recent call last):
  File "/usr/local/bin/mpp-solar", line 11, in <module>
    load_entry_point('mpp-solar==0.4.1', 'console_scripts', 'mpp-solar')()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/__init__.py", line 83, in main
    results = mp.getResponseDict(args.command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mpputils.py", line 40, in getResponseDict
    return self.inverter.getResponseDict(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 215, in getResponseDict
    result = self.execute(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 351, in execute
    return self._doDirectUsbCommand(command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 335, in _doDirectUsbCommand
    command.setByteResponse(response_line)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 139, in setByteResponse
    self.response_dict = self.getResponseDict()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 443, in getResponseDict
    msgs[key] = [resp_format[2][int(result)], '']
IndexError: list index out of range
pi@zero:~ $ mpp-solar -c Q1 -D -d /dev/hidraw0 
INFO:MPP-Solar:command Q1
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: standard
[...snip...]
DEBUG:MPP-Solar:Searching for cmd 'Q1'
INFO:MPP-Solar:DIRECT USB connection: executing Q1
Q1 query

DEBUG:MPP-Solar:length of to_send: 5
DEBUG:MPP-Solar:1 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'(1 92932003106050 L 00 238.0 50.\x00 \x00\x00\x00\x00\x00\x00100 \x00\x00\x00\x00090.6 014 00262 00262 006 10100011 0 1 140 140 02 14 000]b\r'
Traceback (most recent call last):
  File "/usr/local/bin/mpp-solar", line 11, in <module>
    load_entry_point('mpp-solar==0.4.1', 'console_scripts', 'mpp-solar')()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/__init__.py", line 83, in main
    results = mp.getResponseDict(args.command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mpputils.py", line 40, in getResponseDict
    return self.inverter.getResponseDict(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 215, in getResponseDict
    result = self.execute(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 351, in execute
    return self._doDirectUsbCommand(command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 335, in _doDirectUsbCommand
    command.setByteResponse(response_line)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 139, in setByteResponse
    self.response_dict = self.getResponseDict()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 443, in getResponseDict
    msgs[key] = [resp_format[2][int(result)], '']
ValueError: invalid literal for int() with base 10: 'L'
jblance commented 4 years ago

Is Watchpower running at the same time? That second response looks like the response to a QPGS0 command

danieltroger commented 4 years ago

Nope, but the mpp-solar dameon. That might explain it

jblance commented 4 years ago

Yeah, can only have one thing trying to communicate at a time or you'll get strange results

danieltroger commented 4 years ago

So idk if I miscommunicated this, but when I opened the issue I stopped the mpp-solar daemon before I tried it. Trying other things I had commands succeed at the same time, which is why I assumed it would work, but the Q1 response is unexpected to the script, even when the daemon is definitely stoppped.

If you closed it because it's impossible to know which values are which that's fine and keep it closed, I just wanted to make it clear that I didn't originally encounter the issue because I had the daemon running.

pi@zero:~ $ systemctl --user stop mpp-solar
pi@zero:~ $  mpp-solar -d /dev/hidraw0 -c Q1 -D
INFO:MPP-Solar:command Q1
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: standard
[...snip...]
DEBUG:MPP-Solar:Searching for cmd 'Q1'
INFO:MPP-Solar:DIRECT USB connection: executing Q1
Q1 query
DEBUG:MPP-Solar:length of to_send: 5
DEBUG:MPP-Solar:1 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'(1 0 0000 07280 00001 00 00 03 000 030 023 032 01 00 000 0040 0000 0000 00.00 11\xbaW\r'
Traceback (most recent call last):
  File "/usr/local/bin/mpp-solar", line 11, in <module>
    load_entry_point('mpp-solar==0.4.1', 'console_scripts', 'mpp-solar')()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/__init__.py", line 83, in main
    results = mp.getResponseDict(args.command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mpputils.py", line 40, in getResponseDict
    return self.inverter.getResponseDict(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 215, in getResponseDict
    result = self.execute(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 351, in execute
    return self._doDirectUsbCommand(command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 335, in _doDirectUsbCommand
    command.setByteResponse(response_line)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 139, in setByteResponse
    self.response_dict = self.getResponseDict()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 443, in getResponseDict
    msgs[key] = [resp_format[2][int(result)], '']
IndexError: list index out of range

pi@zero:~ $ systemctl --user status mpp-solar
● mpp-solar.service - MPP Solar Service
   Loaded: loaded (/etc/systemd/user/mpp-solar.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2020-06-16 02:12:25 CEST; 1min 32s ago
  Process: 7484 ExecStart=/usr/bin/python3 /usr/local/bin/mpp-solar-service -c /etc/mpp-solar/mpp-solar.conf (code=killed, signal=TERM)
 Main PID: 7484 (code=killed, signal=TERM)

Jun 16 02:12:15 zero python3[7484]: MPP-Solar-Service: item {'mp': <mppsolar.mpputils.mppUtils object at 0xb5e4e250>, 'command': 'QPGS0', 'format': 'influx2', 'tag': 'Inverter1'}
Jun 16 02:12:18 zero python3[7484]: MPP-Solar-Service: sleeping for 0sec
Jun 16 02:12:18 zero python3[7484]: MPP-Solar-Service: item {'mp': <mppsolar.mpputils.mppUtils object at 0xb5fb24d0>, 'command': 'QPIGS', 'format': 'influx2', 'tag': 'Inverter1'}
Jun 16 02:12:21 zero python3[7484]: MPP-Solar-Service: item {'mp': <mppsolar.mpputils.mppUtils object at 0xb5e4e250>, 'command': 'QPGS0', 'format': 'influx2', 'tag': 'Inverter1'}
Jun 16 02:12:25 zero python3[7484]: MPP-Solar-Service: sleeping for 0sec
Jun 16 02:12:25 zero python3[7484]: MPP-Solar-Service: item {'mp': <mppsolar.mpputils.mppUtils object at 0xb5fb24d0>, 'command': 'QPIGS', 'format': 'influx2', 'tag': 'Inverter1'}
Jun 16 02:12:25 zero systemd[375]: Stopping MPP Solar Service...
Jun 16 02:12:25 zero systemd[375]: mpp-solar.service: Main process exited, code=killed, status=15/TERM
Jun 16 02:12:25 zero systemd[375]: mpp-solar.service: Succeeded.
Jun 16 02:12:25 zero systemd[375]: Stopped MPP Solar Service.

pi@zero:~ $ mpp-solar -d /dev/hidraw0 -c Q1 -D
INFO:MPP-Solar:command Q1
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: standard
[...snip...]
DEBUG:MPP-Solar:Searching for cmd 'Q1'
INFO:MPP-Solar:DIRECT USB connection: executing Q1
Q1 query
DEBUG:MPP-Solar:length of to_send: 5
DEBUG:MPP-Solar:1 chunk send
DEBUG:MPP-Solar:usb byte_response was: b'(1 0 0000 07280 00001 00 00 03 000 030 023 032 01 00 000 0040 0000 0000 00.00 11\xbaW\r'
Traceback (most recent call last):
  File "/usr/local/bin/mpp-solar", line 11, in <module>
    load_entry_point('mpp-solar==0.4.1', 'console_scripts', 'mpp-solar')()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/__init__.py", line 83, in main
    results = mp.getResponseDict(args.command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mpputils.py", line 40, in getResponseDict
    return self.inverter.getResponseDict(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 215, in getResponseDict
    result = self.execute(cmd)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 351, in execute
    return self._doDirectUsbCommand(command)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppinverter.py", line 335, in _doDirectUsbCommand
    command.setByteResponse(response_line)
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 139, in setByteResponse
    self.response_dict = self.getResponseDict()
  File "/usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.1-py3.7.egg/mppsolar/mppcommand.py", line 443, in getResponseDict
    msgs[key] = [resp_format[2][int(result)], '']
IndexError: list index out of range
pi@zero:~ $ 
jblance commented 4 years ago

Yeah, unfortunately Q1 is undocumented - if you can determine what the response items are it is easy enough to create a definition file (the current version is definitely wrong for your inverter) There are only 4 or 5 responses in your debug that might be of use, so you may be able to determine what they are from Watchpower and/or trial and error.

Even the current definitions for Q1 are pretty rough (and grabbed from a forum)

Sorry I cant really be of any help

jblance commented 4 years ago

Also check QPIGS raw output (or update to latest code from github), I have updated it based on @nigel16494's feedback - there is a 'PV Input Power' value is some responses (not sure if it is true for QPI = 87 000 though)

danieltroger commented 4 years ago

OMFG you're awesome! I updated and it added PV input power. I'm happy! Fuck Q1, pw input power is all I want. pv_input_power 429 W

pi@zero:~/mpp-solar $ mpp-solar -d /dev/hidraw1 -c QPIGS -D
INFO:MPP-Solar:command QPIGS
INFO:MPP-Solar:Serial device used: /dev/hidraw1, baud rate: 2400
DEBUG:MPP-Solar:Device matches hidraw regex
INFO:MPP-Solar:Loading commands for inverter model: standard
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.3-py3.7.egg/mppsolar/commands/_pi18_et.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.3-py3.7.egg/mppsolar/commands/_pi18_gs.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.3-py3.7.egg/mppsolar/commands/_pi18_mod.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.3-py3.7.egg/mppsolar/commands/_pi18_pi.json
DEBUG:MPP-Solar:-----No supports 
DEBUG:MPP-Solar:Loading command information from /usr/local/lib/python3.7/dist-packages/mpp_solar-0.4.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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.3-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.3-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: standard
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.3-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: standard
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.3-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.3-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: standard
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.3-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.3-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.3-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: standard
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.3-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: standard
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.3-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: standard
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.3-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: standard
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 'QPIGS'
INFO:MPP-Solar:DIRECT USB connection: executing QPIGS
General Status Parameters inquiry
 -- queries the value of various metrics 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'(233.2 50.0 229.6 49.9 1057 1029 025 419 26.50 000 100 0036 0016 076.5 26.50 00025 01010110 00 00 00429 010\x1bJ\r'
DEBUG:MPP-Solar:Byte_Response length: 110
DEBUG:MPP-Solar:CRC resp     27, 74
DEBUG:MPP-Solar:Calculating CRC for b'(233.2 50.0 229.6 49.9 1057 1029 025 419 26.50 000 100 0036 0016 076.5 26.50 00025 01010110 00 00 00429 010'
DEBUG:MPP-Solar:Generated CRC 1b 4a 1b4a
DEBUG:MPP-Solar:CRC calc     27 74
DEBUG:MPP-Solar:CRCs match
DEBUG:MPP-Solar:Response valid as no invalid situations found
ac_input_frequency              50.0            Hz
ac_input_voltage                233.2           V
ac_output_active_power          1029            W
ac_output_apparent_power        1057            VA
ac_output_frequency             49.9            Hz
ac_output_load                  25              %
ac_output_voltage               229.6           V
battery_capacity                100             %
battery_charging_current        0               A
battery_discharge_current       25              A
battery_voltage                 26.5            V
battery_voltage_from_scc        26.5            V
bus_voltage                     419             V
inverter_heat_sink_temperature  36              Deg_C
is_ac_charging_on               0               True - 1/False - 0
is_battery_voltage_to_steady_while_charging 0               True - 1/False - 0
is_charging_on                  1               True - 1/False - 0
is_charging_to_float            0               True - 1/False - 0
is_configuration_changed        1               True - 1/False - 0
is_load_on                      1               True - 1/False - 0
is_reserved                     0               True - 1/False - 0
is_sbu_priority_version_added   0               True - 1/False - 0
is_scc_charging_on              1               True - 1/False - 0
is_scc_firmware_updated         0               True - 1/False - 0
is_switched_on                  1               True - 1/False - 0
pv_input_current_for_battery    16.0            A
pv_input_power                  429             W
pv_input_voltage                76.5            V
rsv1                            0               A
rsv2                            0               A
pi@zero:~/mpp-solar $