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

Can't set charge voltages on MPPSolar MPI 15K #485

Open
danieltroger opened this issue Apr 13, 2024 · 12 comments
Open

Can't set charge voltages on MPPSolar MPI 15K #485

danieltroger opened this issue Apr 13, 2024 · 12 comments

Comments

@danieltroger
Copy link

danieltroger commented Apr 13, 2024

Hi, I have the 15KW variant of https://www.mppsolar.com/v3/mpi12-15kwwpip65/

I'm mostly communicating with it with the PI17 protocol and many commands work fine. This is the device ID:

ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -n 'BPVInverter2' -T 'BPVInverter2' -P PI17 -o screen --getDeviceId
Command: Get Device ID - Generate a device id
--------------------------------------------------------------------------------
Parameter Value                 Unit
deviceid  17:061                    
--------------------------------------------------------------------------------

However, it doesn't respect the bulk charging voltage - it directly goes to the float charging voltage when charging. Therefore I wanted to write my own script that sets the float charging voltage to 58.4v until little current is flowing and then sets it back down to 53v. However, the mppsolar command this script would use doesn't seem to work.

I've tried a multitude of protocols but can't get it working. I'm running a raspberry pi zero 2w connected via USB - would appreciate some help.

Log:

ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -P PI17  -D  -c MCHGV0584,0530 
2024-04-13 15:30:34,414:INFO:__init__:main@205: Solar Device Command Utility, version: 0.16.29, python version: 3.10.12
2024-04-13 15:30:34,415:DEBUG:mqttbrokerc:__init__@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2024-04-13 15:30:34,416:DEBUG:__init__:main@240: MqttBroker name: localhost, port: 1883, user: None
2024-04-13 15:30:34,416:DEBUG:__init__:main@242: udp port 5555
2024-04-13 15:30:34,417:DEBUG:__init__:main@244: Using Postgres None
2024-04-13 15:30:34,417:DEBUG:__init__:main@247: Using Mongo None with mppsolar
2024-04-13 15:30:34,418:INFO:__init__:main@358: Creating device "unnamed" (type: "mppsolar") on port "/dev/hidraw0 (porttype=None)" using protocol "PI17"
2024-04-13 15:30:34,427:DEBUG:__init__:main@362: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-04-13 15:30:34,428:DEBUG:device:__init__@34: __init__ args ()
2024-04-13 15:30:34,428:DEBUG:device:__init__@35: __init__ kwargs {'name': 'unnamed', 'port': '/dev/hidraw0', 'protocol': 'PI17', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffffa6d113f0>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway'}
2024-04-13 15:30:34,429:DEBUG:__init__:get_port_type@39: port matches hidraw
2024-04-13 15:30:34,430:INFO:__init__:get_port@93: Using hidrawio for communications
2024-04-13 15:30:34,435:DEBUG:__init__:get_protocol@13: Protocol PI17
2024-04-13 15:30:35,406:DEBUG:device:__init__@39: __init__ name unnamed, port <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffa6d11300>, protocol PI17 protocol handler
2024-04-13 15:30:35,407:DEBUG:__init__:main@408: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xffffa6d11390>, 'MCHGV0584,0530', 'MCHGV0584,0530', 'screen', None, None)]
2024-04-13 15:30:35,408:INFO:__init__:main@413: Looping 1 commands
2024-04-13 15:30:35,408:INFO:__init__:main@423: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffa6d11300>, protocol: PI17 protocol handler for command: MCHGV0584,0530, tag: MCHGV0584,0530, outputs: screen
2024-04-13 15:30:35,409:INFO:device:run_command@51: Running command MCHGV0584,0530
2024-04-13 15:30:35,410:INFO:pi17:get_full_command@896: Using protocol b'PI17' with 48 commands
2024-04-13 15:30:35,410:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0584,0530'
2024-04-13 15:30:35,411:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-13 15:30:35,412:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-13 15:30:35,414:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-13 15:30:35,415:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-13 15:30:35,417:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-13 15:30:35,419:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-13 15:30:35,420:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-13 15:30:35,421:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-13 15:30:35,423:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-13 15:30:35,424:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-13 15:30:35,425:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-13 15:30:35,426:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-13 15:30:35,428:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-13 15:30:35,429:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-13 15:30:35,431:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-13 15:30:35,432:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-13 15:30:35,433:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-13 15:30:35,434:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-13 15:30:35,436:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-13 15:30:35,437:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-13 15:30:35,438:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-13 15:30:35,439:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-13 15:30:35,441:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0584,0530 to: MCHGV value: 0584,0530
2024-04-13 15:30:35,441:DEBUG:pi17:get_full_command@937: _pre_cmd: b'^S015MCHGV0584,0530'
2024-04-13 15:30:35,442:DEBUG:pi17:get_full_command@944: full command: b'^S015MCHGV0584,0530\r'
2024-04-13 15:30:35,442:INFO:device:run_command@81: full command b'^S015MCHGV0584,0530\r' for command MCHGV0584,0530
2024-04-13 15:30:35,443:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0584,0530'
2024-04-13 15:30:35,443:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-13 15:30:35,444:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-13 15:30:35,444:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-13 15:30:35,445:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-13 15:30:35,445:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-13 15:30:35,445:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-13 15:30:35,446:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-13 15:30:35,446:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-13 15:30:35,447:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-13 15:30:35,447:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-13 15:30:35,448:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-13 15:30:35,448:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-13 15:30:35,449:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-13 15:30:35,449:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-13 15:30:35,450:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-13 15:30:35,450:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-13 15:30:35,450:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-13 15:30:35,451:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-13 15:30:35,451:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-13 15:30:35,452:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-13 15:30:35,452:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-13 15:30:35,453:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-13 15:30:35,453:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0584,0530 to: MCHGV value: 0584,0530
2024-04-13 15:30:35,454:DEBUG:hidrawio:send_and_receive@28: length of to_send: 20
2024-04-13 15:30:35,454:DEBUG:hidrawio:send_and_receive@37: multiple chunk send
2024-04-13 15:30:35,455:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'^S015MCH'
2024-04-13 15:30:35,506:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'GV0584,0'
2024-04-13 15:30:35,558:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'530\r\x00\x00\x00\x00'
2024-04-13 15:30:36,011:DEBUG:hidrawio:send_and_receive@63: usb response was: b'^0\x1b\xe3\r'
2024-04-13 15:30:36,013:DEBUG:device:run_command@98: Send and Receive Response b'^0\x1b\xe3\r'
2024-04-13 15:30:36,014:INFO:abstractprotocol:decode@236: response passed to decode: b'^0\x1b\xe3\r'
2024-04-13 15:30:36,015:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0584,0530'
2024-04-13 15:30:36,015:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-13 15:30:36,016:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-13 15:30:36,017:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-13 15:30:36,018:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-13 15:30:36,019:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-13 15:30:36,019:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-13 15:30:36,020:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-13 15:30:36,021:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-13 15:30:36,021:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-13 15:30:36,022:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-13 15:30:36,022:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-13 15:30:36,023:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-13 15:30:36,023:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-13 15:30:36,024:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-13 15:30:36,024:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-13 15:30:36,025:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-13 15:30:36,025:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-13 15:30:36,026:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-13 15:30:36,026:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-13 15:30:36,027:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-13 15:30:36,027:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-13 15:30:36,028:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-13 15:30:36,028:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0584,0530 to: MCHGV value: 0584,0530
2024-04-13 15:30:36,029:INFO:abstractprotocol:decode@280: Processing response of type DEFAULT
2024-04-13 15:30:36,029:DEBUG:abstractprotocol:decode@284: trimmed and split responses: ['NAK']
2024-04-13 15:30:36,030:INFO:abstractprotocol:decode@291: Processing DEFAULT type responses
2024-04-13 15:30:36,030:DEBUG:abstractprotocol:decode@308: result NAK, key Command execution, resp_format ['ack', 'Command execution', {'NAK': 'Failed', 'ACK': 'Successful'}]
2024-04-13 15:30:36,031:INFO:device:run_command@116: Decoded response {'_command': 'MCHGV0584,0530', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0584,0530 was rejected', '']}
2024-04-13 15:30:36,031:DEBUG:__init__:main@427: results: {'_command': 'MCHGV0584,0530', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0584,0530 was rejected', '']}
2024-04-13 15:30:36,032:INFO:__init__:get_output@40: attempting to create output processor: screen
2024-04-13 15:30:36,037:DEBUG:screen:__init__@17: processor.screen __init__ args: (), kwargs: {}
2024-04-13 15:30:36,038:DEBUG:__init__:main@433: Using output filter: None
2024-04-13 15:30:36,038:INFO:screen:output@23: Using output processor: screen
2024-04-13 15:30:36,039:DEBUG:screen:output@24: kwargs {'data': {'_command': 'MCHGV0584,0530', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0584,0530 was rejected', '']}, 'tag': 'MCHGV0584,0530', 'name': 'unnamed', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffffa6d113f0>, 'udp_port': 5555, 'postgres_url': None, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway', 'mqtt_topic': None, 'filter': None, 'excl_filter': None, 'keep_case': False}
2024-04-13 15:30:36,039:DEBUG:screen:output@68: displayData: {'warning0': ['Command MCHGV0584,0530 was rejected', '']}
Command: MCHGV0584,0530 - Set battery charge voltages
--------------------------------------------------------------------------------
Parameter Value                 Unit
warning0  Command MCHGV0584,0530 was rejected       
--------------------------------------------------------------------------------


2024-04-13 15:30:36,040:DEBUG:__init__:main@459: Not daemon, so not looping
@danieltroger
Copy link
Author

danieltroger commented Apr 13, 2024

Sometimes it also gives me this random result, maybe because I have the mppsolar service running at the same time?

But even with it stopped I can't set the charging voltages.

ubuntu@ubuntu:~$ sudo  mpp-solar -P PI17  -p /dev/hidraw0  -c 'MCHGV0584,0528'
Command: MCHGV0584,0528 - Set battery charge voltages
--------------------------------------------------------------------------------
Parameter                    Value              Unit
unknown_value_in_response_1  00095                  
unknown_value_in_response_2  00119                  
unknown_value_in_response_3  00787                  
unknown_value_in_response_4  005                    
unknown_value_in_response_5  1                      
unknown_value_in_response_6  1                      
unknown_value_in_response_7  1                      
unknown_value_in_response_8  1                      
unknown_value_in_response_9  2                      
unknown_value_in_response_10 2                      
--------------------------------------------------------------------------------

Also these are some semi-related issues I found, but none helped with this exact problem:

  1. PI17 Protocol: Problem with BATS #369
  2. Full BMS support for PI17 #219
  3. PI17 Command ACCT2200-0259 was rejected #280

@jblance
Copy link
Owner

jblance commented Apr 16, 2024

still looks like somethign else is running - as a set command should return that much info

@jblance
Copy link
Owner

jblance commented Apr 16, 2024

can you try another setting command - eg set date/time
set battery charge voltages might be blocked by eg battery type setting (i know this was true for earlier pi30 inverters)

@danieltroger
Copy link
Author

danieltroger commented Apr 17, 2024

set battery charge voltages might be blocked by eg battery type setting (i know this was true for earlier pi30 inverters)

I have tried doing sudo mpp-solar -P pi17infini -p /dev/hidraw0 -c BT1 which changed the battery type to "Li-Fe" but it doesn't seem to be making any difference:

ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -P pi17m058 -c BATS
Command: BATS - Query battery setting
--------------------------------------------------------------------------------
Parameter                                                                           Value               Unit
battery_maximum_charge_current                                                      216.0               A   
battery_constant_charge_voltage                                                     58.4                V   
battery_floating_charge_voltage                                                     53.0                V   
battery_stop_charger_current_level_in_floating_charging                             0.0                 A   
keep_charged_time_of_battery_catch_stopped_charging_current_level                   60                  Minutes
battery_voltage_of_recover_to_charge_when_battery_stop_charger_in_floating_charging 53.0                V   
battery_under_voltage                                                               42.0                V   
battery_under_voltage_release                                                       51.2                V   
battery_weak_voltage_in_hybrid_mode                                                 42.0                V   
battery_weak_voltage_release_in_hybrid_mode                                         51.2                V   
battery_type                                                                        Li-Fe                   
ac_charger_keep_battery_voltage_function_enable/diable                              Disabled                
ac_charger_keep_battery_voltage                                                     48.0                V   
battery_temperature_sensor_compensation                                             0.0                 mV  
max._ac_charging_current                                                            1.0                 A   
battery_discharge_max_current_in_hybrid_mode                                        375                 A   
--------------------------------------------------------------------------------

I changed it back to ordinary now since the clock is already correct, if that works as trying another setting command?

ubuntu@ubuntu:~$ sudo  mpp-solar -P pi17infini  -p /dev/hidraw0  -c BT0
Command: BT0 - Set battery type
--------------------------------------------------------------------------------
Parameter Value                 Unit
bt        ACK                       
--------------------------------------------------------------------------------


ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -P pi17m058 -c BATS
Command: BATS - Query battery setting
--------------------------------------------------------------------------------
Parameter                                                                           Value               Unit
battery_maximum_charge_current                                                      216.0               A   
battery_constant_charge_voltage                                                     58.4                V   
battery_floating_charge_voltage                                                     53.0                V   
battery_stop_charger_current_level_in_floating_charging                             0.0                 A   
keep_charged_time_of_battery_catch_stopped_charging_current_level                   60                  Minutes
battery_voltage_of_recover_to_charge_when_battery_stop_charger_in_floating_charging 53.0                V   
battery_under_voltage                                                               42.0                V   
battery_under_voltage_release                                                       51.2                V   
battery_weak_voltage_in_hybrid_mode                                                 42.0                V   
battery_weak_voltage_release_in_hybrid_mode                                         51.2                V   
battery_type                                                                        Ordinary                
ac_charger_keep_battery_voltage_function_enable/diable                              Disabled                
ac_charger_keep_battery_voltage                                                     48.0                V   
battery_temperature_sensor_compensation                                             0.0                 mV  
max._ac_charging_current                                                            1.0                 A   
battery_discharge_max_current_in_hybrid_mode                                        375                 A   
--------------------------------------------------------------------------------

still looks like somethign else is running - as a set command should return that much info

Yeah it's weird that it did it. Could it be this command chunking issue that you mentioned somewhere? But then how does the solar power windows program set the voltages? Or that the inverter just expect the data in a different format? Here's a continuous log proving I stopped the service and it still rejects the set battery voltage command:

Expand log
ubuntu@ubuntu:~$ systemctl --user stop mpp-solar
ubuntu@ubuntu:~$ systemctl --user status mpp-solar
○ mpp-solar.service - MPP Solar Service
     Loaded: loaded (/etc/xdg/systemd/user/mpp-solar.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Wed 2024-04-17 17:44:44 UTC; 3s ago
    Process: 27472 ExecStart=/usr/bin/python3 /usr/local/bin/mpp-solar -C /etc/mpp-solar/mpp-solar.conf --daemon (code=killed, signal=TERM)
   Main PID: 27472 (code=killed, signal=TERM)
        CPU: 6.209s

Apr 17 17:44:33 ubuntu python3[27472]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff8f3b29e0>, protocol: PI17 prot>
Apr 17 17:44:36 ubuntu python3[27472]: Sleeping for 0 sec
Apr 17 17:44:36 ubuntu python3[27472]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff8f3b29e0>, protocol: PI17 prot>
Apr 17 17:44:38 ubuntu python3[27472]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff8f3b29e0>, protocol: PI17 prot>
Apr 17 17:44:41 ubuntu python3[27472]: Sleeping for 0 sec
Apr 17 17:44:41 ubuntu python3[27472]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff8f3b29e0>, protocol: PI17 prot>
Apr 17 17:44:44 ubuntu python3[27472]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff8f3b29e0>, protocol: PI17 prot>
Apr 17 17:44:44 ubuntu systemd[761]: Stopping MPP Solar Service...
Apr 17 17:44:44 ubuntu systemd[761]: Stopped MPP Solar Service.
Apr 17 17:44:44 ubuntu systemd[761]: mpp-solar.service: Consumed 6.209s CPU time.
ubuntu@ubuntu:~$ ps axu|grep mpp
ubuntu     27522  0.0  0.4   6416  1860 pts/0    S+   17:44   0:00 grep --color=auto mpp
ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -P PI17  -D  -c MCHGV0584,0530 
2024-04-17 17:45:03,779:INFO:__init__:main@205: Solar Device Command Utility, version: 0.16.29, python version: 3.10.12
2024-04-17 17:45:03,779:DEBUG:mqttbrokerc:__init__@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2024-04-17 17:45:03,780:DEBUG:__init__:main@240: MqttBroker name: localhost, port: 1883, user: None
2024-04-17 17:45:03,781:DEBUG:__init__:main@242: udp port 5555
2024-04-17 17:45:03,781:DEBUG:__init__:main@244: Using Postgres None
2024-04-17 17:45:03,782:DEBUG:__init__:main@247: Using Mongo None with mppsolar
2024-04-17 17:45:03,782:INFO:__init__:main@358: Creating device "unnamed" (type: "mppsolar") on port "/dev/hidraw0 (porttype=None)" using protocol "PI17"
2024-04-17 17:45:03,791:DEBUG:__init__:main@362: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-04-17 17:45:03,792:DEBUG:device:__init__@34: __init__ args ()
2024-04-17 17:45:03,792:DEBUG:device:__init__@35: __init__ kwargs {'name': 'unnamed', 'port': '/dev/hidraw0', 'protocol': 'PI17', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff996a2830>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway'}
2024-04-17 17:45:03,793:DEBUG:__init__:get_port_type@39: port matches hidraw
2024-04-17 17:45:03,794:INFO:__init__:get_port@93: Using hidrawio for communications
2024-04-17 17:45:03,799:DEBUG:__init__:get_protocol@13: Protocol PI17
2024-04-17 17:45:04,609:DEBUG:device:__init__@39: __init__ name unnamed, port <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff996a2890>, protocol PI17 protocol handler
2024-04-17 17:45:04,609:DEBUG:__init__:main@408: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xffff996a27d0>, 'MCHGV0584,0530', 'MCHGV0584,0530', 'screen', None, None)]
2024-04-17 17:45:04,610:INFO:__init__:main@413: Looping 1 commands
2024-04-17 17:45:04,611:INFO:__init__:main@423: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff996a2890>, protocol: PI17 protocol handler for command: MCHGV0584,0530, tag: MCHGV0584,0530, outputs: screen
2024-04-17 17:45:04,611:INFO:device:run_command@51: Running command MCHGV0584,0530
2024-04-17 17:45:04,612:INFO:pi17:get_full_command@896: Using protocol b'PI17' with 48 commands
2024-04-17 17:45:04,612:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0584,0530'
2024-04-17 17:45:04,613:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-17 17:45:04,614:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-17 17:45:04,615:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-17 17:45:04,617:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-17 17:45:04,619:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-17 17:45:04,620:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-17 17:45:04,621:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-17 17:45:04,622:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-17 17:45:04,624:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-17 17:45:04,625:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-17 17:45:04,626:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-17 17:45:04,627:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-17 17:45:04,629:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-17 17:45:04,631:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-17 17:45:04,632:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-17 17:45:04,633:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-17 17:45:04,634:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-17 17:45:04,635:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-17 17:45:04,637:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-17 17:45:04,638:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-17 17:45:04,640:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-17 17:45:04,641:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-17 17:45:04,642:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0584,0530 to: MCHGV value: 0584,0530
2024-04-17 17:45:04,643:DEBUG:pi17:get_full_command@937: _pre_cmd: b'^S015MCHGV0584,0530'
2024-04-17 17:45:04,643:DEBUG:pi17:get_full_command@944: full command: b'^S015MCHGV0584,0530\r'
2024-04-17 17:45:04,644:INFO:device:run_command@81: full command b'^S015MCHGV0584,0530\r' for command MCHGV0584,0530
2024-04-17 17:45:04,644:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0584,0530'
2024-04-17 17:45:04,645:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-17 17:45:04,645:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-17 17:45:04,646:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-17 17:45:04,646:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-17 17:45:04,646:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-17 17:45:04,647:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-17 17:45:04,647:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-17 17:45:04,648:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-17 17:45:04,648:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-17 17:45:04,649:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-17 17:45:04,649:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-17 17:45:04,650:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-17 17:45:04,650:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-17 17:45:04,650:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-17 17:45:04,651:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-17 17:45:04,651:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-17 17:45:04,652:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-17 17:45:04,652:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-17 17:45:04,653:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-17 17:45:04,653:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-17 17:45:04,654:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-17 17:45:04,654:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-17 17:45:04,654:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0584,0530 to: MCHGV value: 0584,0530
2024-04-17 17:45:04,715:DEBUG:hidrawio:send_and_receive@28: length of to_send: 20
2024-04-17 17:45:04,716:DEBUG:hidrawio:send_and_receive@37: multiple chunk send
2024-04-17 17:45:04,716:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'^S015MCH'
2024-04-17 17:45:04,768:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'GV0584,0'
2024-04-17 17:45:04,820:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'530\r\x00\x00\x00\x00'
2024-04-17 17:45:05,273:DEBUG:hidrawio:send_and_receive@63: usb response was: b'^0\x1b\xe3\r'
2024-04-17 17:45:05,275:DEBUG:device:run_command@98: Send and Receive Response b'^0\x1b\xe3\r'
2024-04-17 17:45:05,275:INFO:abstractprotocol:decode@236: response passed to decode: b'^0\x1b\xe3\r'
2024-04-17 17:45:05,276:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0584,0530'
2024-04-17 17:45:05,277:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-17 17:45:05,278:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-17 17:45:05,278:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-17 17:45:05,279:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-17 17:45:05,280:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-17 17:45:05,281:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-17 17:45:05,281:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-17 17:45:05,282:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-17 17:45:05,283:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-17 17:45:05,284:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-17 17:45:05,284:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-17 17:45:05,285:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-17 17:45:05,286:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-17 17:45:05,286:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-17 17:45:05,287:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-17 17:45:05,287:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-17 17:45:05,288:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-17 17:45:05,288:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-17 17:45:05,289:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-17 17:45:05,290:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-17 17:45:05,290:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-17 17:45:05,291:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-17 17:45:05,291:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0584,0530 to: MCHGV value: 0584,0530
2024-04-17 17:45:05,292:INFO:abstractprotocol:decode@280: Processing response of type DEFAULT
2024-04-17 17:45:05,292:DEBUG:abstractprotocol:decode@284: trimmed and split responses: ['NAK']
2024-04-17 17:45:05,293:INFO:abstractprotocol:decode@291: Processing DEFAULT type responses
2024-04-17 17:45:05,293:DEBUG:abstractprotocol:decode@308: result NAK, key Command execution, resp_format ['ack', 'Command execution', {'NAK': 'Failed', 'ACK': 'Successful'}]
2024-04-17 17:45:05,294:INFO:device:run_command@116: Decoded response {'_command': 'MCHGV0584,0530', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0584,0530 was rejected', '']}
2024-04-17 17:45:05,294:DEBUG:__init__:main@427: results: {'_command': 'MCHGV0584,0530', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0584,0530 was rejected', '']}
2024-04-17 17:45:05,295:INFO:__init__:get_output@40: attempting to create output processor: screen
2024-04-17 17:45:05,299:DEBUG:screen:__init__@17: processor.screen __init__ args: (), kwargs: {}
2024-04-17 17:45:05,300:DEBUG:__init__:main@433: Using output filter: None
2024-04-17 17:45:05,300:INFO:screen:output@23: Using output processor: screen
2024-04-17 17:45:05,301:DEBUG:screen:output@24: kwargs {'data': {'_command': 'MCHGV0584,0530', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0584,0530 was rejected', '']}, 'tag': 'MCHGV0584,0530', 'name': 'unnamed', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff996a2830>, 'udp_port': 5555, 'postgres_url': None, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway', 'mqtt_topic': None, 'filter': None, 'excl_filter': None, 'keep_case': False}
2024-04-17 17:45:05,302:DEBUG:screen:output@68: displayData: {'warning0': ['Command MCHGV0584,0530 was rejected', '']}
Command: MCHGV0584,0530 - Set battery charge voltages
--------------------------------------------------------------------------------
Parameter Value                 Unit
warning0  Command MCHGV0584,0530 was rejected       
--------------------------------------------------------------------------------


2024-04-17 17:45:05,302:DEBUG:__init__:main@459: Not daemon, so not looping
ubuntu@ubuntu:~$ 

For now, I reverse engineered the MPPSolar Solar Power app which is able to set these voltages, so that I can charge the battery fully without overcharging it. But the problem is that the internet connection on the pi connected to the inverter is super flaky and even might be down sometimes, so it would be AMAZING to be able to set the voltage locally (without having to rely on an internet connection).

@jblance
Copy link
Owner

jblance commented Apr 17, 2024

i see you are trying to set it the same as it is set, can you try a slightly different settings?
I only know what I can get from the documentation and people have tested (so it is possible there is a different format for your particular inverter)

@danieltroger
Copy link
Author

Yeah, it doesn't work with a different voltage either

Expand log
ubuntu@ubuntu:~$ systemctl --user stop mpp-solar
ubuntu@ubuntu:~$ systemctl --user status mpp-solar
○ mpp-solar.service - MPP Solar Service
     Loaded: loaded (/etc/xdg/systemd/user/mpp-solar.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Thu 2024-04-18 08:37:50 UTC; 1s ago
    Process: 42021 ExecStart=/usr/bin/python3 /usr/local/bin/mpp-solar -C /etc/mpp-solar/mpp-solar.conf --daemon (code=killed, signal=TERM)
   Main PID: 42021 (code=killed, signal=TERM)
        CPU: 22.547s

Apr 18 08:37:37 ubuntu python3[42021]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffb4fd29e0>, protocol: PI17 prot>
Apr 18 08:37:40 ubuntu python3[42021]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffb4fd29e0>, protocol: PI17 prot>
Apr 18 08:37:43 ubuntu python3[42021]: Sleeping for 0 sec
Apr 18 08:37:43 ubuntu python3[42021]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffb4fd29e0>, protocol: PI17 prot>
Apr 18 08:37:45 ubuntu python3[42021]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffb4fd29e0>, protocol: PI17 prot>
Apr 18 08:37:48 ubuntu python3[42021]: Sleeping for 0 sec
Apr 18 08:37:48 ubuntu python3[42021]: Getting results from device: mppsolar device - name: Inverter1_MPI15K, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffffb4fd29e0>, protocol: PI17 prot>
Apr 18 08:37:50 ubuntu systemd[761]: Stopping MPP Solar Service...
Apr 18 08:37:50 ubuntu systemd[761]: Stopped MPP Solar Service.
Apr 18 08:37:50 ubuntu systemd[761]: mpp-solar.service: Consumed 22.547s CPU time.
ubuntu@ubuntu:~$ ps axu|grep mpp
ubuntu     42144  0.0  0.4   6416  1844 pts/0    S+   08:38   0:00 grep --color=auto mpp
ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -P PI17  -D  -c MCHGV0570,0510
2024-04-18 08:38:31,988:INFO:__init__:main@205: Solar Device Command Utility, version: 0.16.29, python version: 3.10.12
2024-04-18 08:38:31,988:DEBUG:mqttbrokerc:__init__@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2024-04-18 08:38:31,989:DEBUG:__init__:main@240: MqttBroker name: localhost, port: 1883, user: None
2024-04-18 08:38:31,990:DEBUG:__init__:main@242: udp port 5555
2024-04-18 08:38:31,990:DEBUG:__init__:main@244: Using Postgres None
2024-04-18 08:38:31,991:DEBUG:__init__:main@247: Using Mongo None with mppsolar
2024-04-18 08:38:31,991:INFO:__init__:main@358: Creating device "unnamed" (type: "mppsolar") on port "/dev/hidraw0 (porttype=None)" using protocol "PI17"
2024-04-18 08:38:32,002:DEBUG:__init__:main@362: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-04-18 08:38:32,002:DEBUG:device:__init__@34: __init__ args ()
2024-04-18 08:38:32,003:DEBUG:device:__init__@35: __init__ kwargs {'name': 'unnamed', 'port': '/dev/hidraw0', 'protocol': 'PI17', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff9e8a2830>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway'}
2024-04-18 08:38:32,004:DEBUG:__init__:get_port_type@39: port matches hidraw
2024-04-18 08:38:32,004:INFO:__init__:get_port@93: Using hidrawio for communications
2024-04-18 08:38:32,010:DEBUG:__init__:get_protocol@13: Protocol PI17
2024-04-18 08:38:32,992:DEBUG:device:__init__@39: __init__ name unnamed, port <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff9e8a2890>, protocol PI17 protocol handler
2024-04-18 08:38:32,993:DEBUG:__init__:main@408: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xffff9e8a27d0>, 'MCHGV0570,0510', 'MCHGV0570,0510', 'screen', None, None)]
2024-04-18 08:38:32,993:INFO:__init__:main@413: Looping 1 commands
2024-04-18 08:38:32,994:INFO:__init__:main@423: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff9e8a2890>, protocol: PI17 protocol handler for command: MCHGV0570,0510, tag: MCHGV0570,0510, outputs: screen
2024-04-18 08:38:32,995:INFO:device:run_command@51: Running command MCHGV0570,0510
2024-04-18 08:38:32,995:INFO:pi17:get_full_command@896: Using protocol b'PI17' with 48 commands
2024-04-18 08:38:32,996:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0570,0510'
2024-04-18 08:38:32,996:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-18 08:38:32,998:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-18 08:38:33,000:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-18 08:38:33,001:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-18 08:38:33,003:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-18 08:38:33,004:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-18 08:38:33,006:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-18 08:38:33,007:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-18 08:38:33,008:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-18 08:38:33,009:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-18 08:38:33,010:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-18 08:38:33,012:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-18 08:38:33,013:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-18 08:38:33,015:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-18 08:38:33,016:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-18 08:38:33,017:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-18 08:38:33,018:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-18 08:38:33,020:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-18 08:38:33,021:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-18 08:38:33,023:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-18 08:38:33,024:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-18 08:38:33,025:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-18 08:38:33,027:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0570,0510 to: MCHGV value: 0570,0510
2024-04-18 08:38:33,027:DEBUG:pi17:get_full_command@937: _pre_cmd: b'^S015MCHGV0570,0510'
2024-04-18 08:38:33,028:DEBUG:pi17:get_full_command@944: full command: b'^S015MCHGV0570,0510\r'
2024-04-18 08:38:33,028:INFO:device:run_command@81: full command b'^S015MCHGV0570,0510\r' for command MCHGV0570,0510
2024-04-18 08:38:33,028:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0570,0510'
2024-04-18 08:38:33,029:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-18 08:38:33,029:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-18 08:38:33,030:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-18 08:38:33,030:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-18 08:38:33,031:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-18 08:38:33,031:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-18 08:38:33,032:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-18 08:38:33,032:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-18 08:38:33,032:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-18 08:38:33,033:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-18 08:38:33,033:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-18 08:38:33,034:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-18 08:38:33,034:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-18 08:38:33,035:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-18 08:38:33,035:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-18 08:38:33,035:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-18 08:38:33,036:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-18 08:38:33,036:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-18 08:38:33,037:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-18 08:38:33,037:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-18 08:38:33,038:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-18 08:38:33,038:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-18 08:38:33,038:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0570,0510 to: MCHGV value: 0570,0510
2024-04-18 08:38:33,099:DEBUG:hidrawio:send_and_receive@28: length of to_send: 20
2024-04-18 08:38:33,100:DEBUG:hidrawio:send_and_receive@37: multiple chunk send
2024-04-18 08:38:33,100:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'^S015MCH'
2024-04-18 08:38:33,152:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'GV0570,0'
2024-04-18 08:38:33,204:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'510\r\x00\x00\x00\x00'
2024-04-18 08:38:33,657:DEBUG:hidrawio:send_and_receive@63: usb response was: b'^0\x1b\xe3\r'
2024-04-18 08:38:33,659:DEBUG:device:run_command@98: Send and Receive Response b'^0\x1b\xe3\r'
2024-04-18 08:38:33,660:INFO:abstractprotocol:decode@236: response passed to decode: b'^0\x1b\xe3\r'
2024-04-18 08:38:33,661:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'MCHGV0570,0510'
2024-04-18 08:38:33,661:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EY
2024-04-18 08:38:33,662:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EM
2024-04-18 08:38:33,663:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: ED
2024-04-18 08:38:33,663:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EH
2024-04-18 08:38:33,664:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LON
2024-04-18 08:38:33,665:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PA
2024-04-18 08:38:33,666:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PB
2024-04-18 08:38:33,666:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PC
2024-04-18 08:38:33,667:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PD
2024-04-18 08:38:33,668:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PE
2024-04-18 08:38:33,668:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: PF
2024-04-18 08:38:33,669:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: DAT
2024-04-18 08:38:33,669:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: LST
2024-04-18 08:38:33,670:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDA
2024-04-18 08:38:33,670:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDB
2024-04-18 08:38:33,671:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDC
2024-04-18 08:38:33,672:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDD
2024-04-18 08:38:33,672:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDE
2024-04-18 08:38:33,673:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDF
2024-04-18 08:38:33,673:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: EDG
2024-04-18 08:38:33,673:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: BT
2024-04-18 08:38:33,674:DEBUG:abstractprotocol:get_command_defn@77: Regex commands _command: MCHGV
2024-04-18 08:38:33,674:DEBUG:abstractprotocol:get_command_defn@81: Matched: MCHGV0570,0510 to: MCHGV value: 0570,0510
2024-04-18 08:38:33,675:INFO:abstractprotocol:decode@280: Processing response of type DEFAULT
2024-04-18 08:38:33,676:DEBUG:abstractprotocol:decode@284: trimmed and split responses: ['NAK']
2024-04-18 08:38:33,676:INFO:abstractprotocol:decode@291: Processing DEFAULT type responses
2024-04-18 08:38:33,677:DEBUG:abstractprotocol:decode@308: result NAK, key Command execution, resp_format ['ack', 'Command execution', {'NAK': 'Failed', 'ACK': 'Successful'}]
2024-04-18 08:38:33,677:INFO:device:run_command@116: Decoded response {'_command': 'MCHGV0570,0510', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0570,0510 was rejected', '']}
2024-04-18 08:38:33,678:DEBUG:__init__:main@427: results: {'_command': 'MCHGV0570,0510', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0570,0510 was rejected', '']}
2024-04-18 08:38:33,678:INFO:__init__:get_output@40: attempting to create output processor: screen
2024-04-18 08:38:33,694:DEBUG:screen:__init__@17: processor.screen __init__ args: (), kwargs: {}
2024-04-18 08:38:33,695:DEBUG:__init__:main@433: Using output filter: None
2024-04-18 08:38:33,695:INFO:screen:output@23: Using output processor: screen
2024-04-18 08:38:33,696:DEBUG:screen:output@24: kwargs {'data': {'_command': 'MCHGV0570,0510', '_command_description': 'Set battery charge voltages', 'raw_response': ['^0\x1bã\r', ''], 'WARNING0': ['Command MCHGV0570,0510 was rejected', '']}, 'tag': 'MCHGV0570,0510', 'name': 'unnamed', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff9e8a2830>, 'udp_port': 5555, 'postgres_url': None, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway', 'mqtt_topic': None, 'filter': None, 'excl_filter': None, 'keep_case': False}
2024-04-18 08:38:33,697:DEBUG:screen:output@68: displayData: {'warning0': ['Command MCHGV0570,0510 was rejected', '']}
Command: MCHGV0570,0510 - Set battery charge voltages
--------------------------------------------------------------------------------
Parameter Value                 Unit
warning0  Command MCHGV0570,0510 was rejected       
--------------------------------------------------------------------------------


2024-04-18 08:38:33,698:DEBUG:__init__:main@459: Not daemon, so not looping
ubuntu@ubuntu:~$ mpp-solar -p /dev/hidraw0 -D -P pi17m058 -c BATS
2024-04-18 08:38:43,709:INFO:__init__:main@205: Solar Device Command Utility, version: 0.16.29, python version: 3.10.12
2024-04-18 08:38:43,710:DEBUG:mqttbrokerc:__init__@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2024-04-18 08:38:43,711:DEBUG:__init__:main@240: MqttBroker name: localhost, port: 1883, user: None
2024-04-18 08:38:43,712:DEBUG:__init__:main@242: udp port 5555
2024-04-18 08:38:43,712:DEBUG:__init__:main@244: Using Postgres None
2024-04-18 08:38:43,712:DEBUG:__init__:main@247: Using Mongo None with mppsolar
2024-04-18 08:38:43,713:INFO:__init__:main@358: Creating device "unnamed" (type: "mppsolar") on port "/dev/hidraw0 (porttype=None)" using protocol "pi17m058"
2024-04-18 08:38:43,722:DEBUG:__init__:main@362: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-04-18 08:38:43,722:DEBUG:device:__init__@34: __init__ args ()
2024-04-18 08:38:43,723:DEBUG:device:__init__@35: __init__ kwargs {'name': 'unnamed', 'port': '/dev/hidraw0', 'protocol': 'pi17m058', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff9b822830>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway'}
2024-04-18 08:38:43,724:DEBUG:__init__:get_port_type@39: port matches hidraw
2024-04-18 08:38:43,724:INFO:__init__:get_port@93: Using hidrawio for communications
2024-04-18 08:38:43,729:DEBUG:__init__:get_protocol@13: Protocol pi17m058
2024-04-18 08:38:44,543:DEBUG:device:__init__@39: __init__ name unnamed, port <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff9b822890>, protocol PI17 protocol handler modified for model 058
2024-04-18 08:38:44,543:DEBUG:__init__:main@408: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xffff9b8227d0>, 'BATS', 'BATS', 'screen', None, None)]
2024-04-18 08:38:44,544:INFO:__init__:main@413: Looping 1 commands
2024-04-18 08:38:44,544:INFO:__init__:main@423: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.hidrawio.HIDRawIO object at 0xffff9b822890>, protocol: PI17 protocol handler modified for model 058 for command: BATS, tag: BATS, outputs: screen
2024-04-18 08:38:44,545:INFO:device:run_command@51: Running command BATS
2024-04-18 08:38:44,545:INFO:pi17:get_full_command@896: Using protocol b'PI17m058' with 48 commands
2024-04-18 08:38:44,546:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'BATS'
2024-04-18 08:38:44,546:DEBUG:abstractprotocol:get_command_defn@73: Found command BATS in protocol b'PI17m058'
2024-04-18 08:38:44,547:DEBUG:pi17:get_full_command@911: _pre_cmd: b'^P005BATS'
2024-04-18 08:38:44,548:DEBUG:pi17:get_full_command@912: _prefix: ^P005
2024-04-18 08:38:44,548:DEBUG:pi17:get_full_command@919: full command: b'^P005BATS\r'
2024-04-18 08:38:44,549:INFO:device:run_command@81: full command b'^P005BATS\r' for command BATS
2024-04-18 08:38:44,549:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'BATS'
2024-04-18 08:38:44,550:DEBUG:abstractprotocol:get_command_defn@73: Found command BATS in protocol b'PI17m058'
2024-04-18 08:38:44,607:DEBUG:hidrawio:send_and_receive@28: length of to_send: 10
2024-04-18 08:38:44,608:DEBUG:hidrawio:send_and_receive@37: multiple chunk send
2024-04-18 08:38:44,608:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'^P005BAT'
2024-04-18 08:38:44,660:DEBUG:hidrawio:send_and_receive@44: sending chunk: b'S\r\x00\x00\x00\x00\x00\x00'
2024-04-18 08:38:46,616:DEBUG:hidrawio:send_and_receive@63: usb response was: b'^D0762160,0584,0584,0000,060,0530,0420,0512,0420,0512,1,,,0,0480,000,0010,0375\xf1\xe5\r'
2024-04-18 08:38:46,619:DEBUG:device:run_command@98: Send and Receive Response b'^D0762160,0584,0584,0000,060,0530,0420,0512,0420,0512,1,,,0,0480,000,0010,0375\xf1\xe5\r'
2024-04-18 08:38:46,620:INFO:abstractprotocol:decode@236: response passed to decode: b'^D0762160,0584,0584,0000,060,0530,0420,0512,0420,0512,1,,,0,0480,000,0010,0375\xf1\xe5\r'
2024-04-18 08:38:46,621:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'BATS'
2024-04-18 08:38:46,622:DEBUG:abstractprotocol:get_command_defn@73: Found command BATS in protocol b'PI17m058'
2024-04-18 08:38:46,623:INFO:abstractprotocol:decode@280: Processing response of type INDEXED
2024-04-18 08:38:46,623:DEBUG:abstractprotocol:decode@284: trimmed and split responses: [b'2160', b'0584', b'0584', b'0000', b'060', b'0530', b'0420', b'0512', b'0420', b'0512', b'1', b'', b'', b'0', b'0480', b'000', b'0010', b'0375']
2024-04-18 08:38:46,624:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,625:DEBUG:abstractprotocol:decode@475: Got defn [1, 'Battery maximum charge current', 'int:r/10', 'A']
2024-04-18 08:38:46,626:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery maximum charge current b'2160'
2024-04-18 08:38:46,626:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery maximum charge current, raw_value b'2160'
2024-04-18 08:38:46,627:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,628:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,629:DEBUG:abstractprotocol:decode@475: Got defn [2, 'Battery constant charge voltage', 'int:r/10', 'V']
2024-04-18 08:38:46,629:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery constant charge voltage b'0584'
2024-04-18 08:38:46,630:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery constant charge voltage, raw_value b'0584'
2024-04-18 08:38:46,630:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,631:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,632:DEBUG:abstractprotocol:decode@475: Got defn [3, 'Battery floating charge voltage', 'int:r/10', 'V']
2024-04-18 08:38:46,632:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery floating charge voltage b'0584'
2024-04-18 08:38:46,633:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery floating charge voltage, raw_value b'0584'
2024-04-18 08:38:46,633:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,634:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,634:DEBUG:abstractprotocol:decode@475: Got defn [4, 'Battery stop charger current level in floating charging', 'int:r/10', 'A']
2024-04-18 08:38:46,635:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery stop charger current level in floating charging b'0000'
2024-04-18 08:38:46,635:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery stop charger current level in floating charging, raw_value b'0000'
2024-04-18 08:38:46,636:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,636:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,637:DEBUG:abstractprotocol:decode@475: Got defn [5, 'Keep charged time of battery catch stopped charging current level', 'int', 'Minutes']
2024-04-18 08:38:46,637:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Keep charged time of battery catch stopped charging current level, raw_value b'060'
2024-04-18 08:38:46,638:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,639:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,639:DEBUG:abstractprotocol:decode@475: Got defn [6, 'Battery voltage of recover to charge when battery stop charger in floating charging', 'int:r/10', 'V']
2024-04-18 08:38:46,640:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery voltage of recover to charge when battery stop charger in floating charging b'0530'
2024-04-18 08:38:46,640:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery voltage of recover to charge when battery stop charger in floating charging, raw_value b'0530'
2024-04-18 08:38:46,640:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,641:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,642:DEBUG:abstractprotocol:decode@475: Got defn [7, 'Battery under voltage', 'int:r/10', 'V']
2024-04-18 08:38:46,642:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery under voltage b'0420'
2024-04-18 08:38:46,643:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery under voltage, raw_value b'0420'
2024-04-18 08:38:46,643:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,644:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,644:DEBUG:abstractprotocol:decode@475: Got defn [8, 'Battery under voltage release', 'int:r/10', 'V']
2024-04-18 08:38:46,645:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery under voltage release b'0512'
2024-04-18 08:38:46,645:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery under voltage release, raw_value b'0512'
2024-04-18 08:38:46,646:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,647:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,647:DEBUG:abstractprotocol:decode@475: Got defn [9, 'Battery weak voltage in hybrid mode', 'int:r/10', 'V']
2024-04-18 08:38:46,648:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery weak voltage in hybrid mode b'0420'
2024-04-18 08:38:46,648:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery weak voltage in hybrid mode, raw_value b'0420'
2024-04-18 08:38:46,648:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,649:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,650:DEBUG:abstractprotocol:decode@475: Got defn [10, 'Battery weak voltage release in hybrid mode', 'int:r/10', 'V']
2024-04-18 08:38:46,650:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery weak voltage release in hybrid mode b'0512'
2024-04-18 08:38:46,651:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery weak voltage release in hybrid mode, raw_value b'0512'
2024-04-18 08:38:46,651:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,652:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,652:DEBUG:abstractprotocol:decode@475: Got defn [11, 'Battery Type', 'option', ['Ordinary', 'Li-Fe']]
2024-04-18 08:38:46,653:DEBUG:abstractprotocol:process_response@118: Processing data_type: option for data_name: Battery Type, raw_value b'1'
2024-04-18 08:38:46,653:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,654:DEBUG:abstractprotocol:decode@475: Got defn [12, 'Reserved1', 'discard', '']
2024-04-18 08:38:46,654:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Reserved1, raw_value b''
2024-04-18 08:38:46,655:DEBUG:abstractprotocol:process_response@124: Discarding Reserved1:b''
2024-04-18 08:38:46,655:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,655:DEBUG:abstractprotocol:decode@475: Got defn [13, 'Reserved2', 'discard', '']
2024-04-18 08:38:46,656:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Reserved2, raw_value b''
2024-04-18 08:38:46,656:DEBUG:abstractprotocol:process_response@124: Discarding Reserved2:b''
2024-04-18 08:38:46,657:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,657:DEBUG:abstractprotocol:decode@475: Got defn [14, 'AC charger keep battery voltage function enable/diable', 'option', ['Disabled', 'Enabled']]
2024-04-18 08:38:46,658:DEBUG:abstractprotocol:process_response@118: Processing data_type: option for data_name: AC charger keep battery voltage function enable/diable, raw_value b'0'
2024-04-18 08:38:46,658:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,659:DEBUG:abstractprotocol:decode@475: Got defn [15, 'AC charger keep battery voltage', 'int:r/10', 'V']
2024-04-18 08:38:46,659:DEBUG:abstractprotocol:process_response@117: Got template r/10 for AC charger keep battery voltage b'0480'
2024-04-18 08:38:46,660:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: AC charger keep battery voltage, raw_value b'0480'
2024-04-18 08:38:46,660:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,661:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,661:DEBUG:abstractprotocol:decode@475: Got defn [16, 'Battery temperature sensor compensation', 'int:r/10', 'mV']
2024-04-18 08:38:46,662:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Battery temperature sensor compensation b'000'
2024-04-18 08:38:46,662:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery temperature sensor compensation, raw_value b'000'
2024-04-18 08:38:46,663:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,663:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,664:DEBUG:abstractprotocol:decode@475: Got defn [17, 'Max. AC charging current', 'int:r/10', 'A']
2024-04-18 08:38:46,664:DEBUG:abstractprotocol:process_response@117: Got template r/10 for Max. AC charging current b'0010'
2024-04-18 08:38:46,665:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Max. AC charging current, raw_value b'0010'
2024-04-18 08:38:46,665:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,666:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,667:DEBUG:abstractprotocol:decode@475: Got defn [18, 'Battery discharge max current in hybrid mode', 'int', 'A']
2024-04-18 08:38:46,667:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery discharge max current in hybrid mode, raw_value b'0375'
2024-04-18 08:38:46,668:DEBUG:abstractprotocol:process_response@201: Processing format string int(raw_value)
2024-04-18 08:38:46,668:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,669:DEBUG:abstractprotocol:decode@475: Got defn [19, 'Battery under SOC', 'int', '%']
2024-04-18 08:38:46,669:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery under SOC, raw_value extra
2024-04-18 08:38:46,670:DEBUG:abstractprotocol:process_response@124: Discarding Battery under SOC:extra
2024-04-18 08:38:46,670:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,670:DEBUG:abstractprotocol:decode@475: Got defn [20, 'Battery under back SOC', 'int', '%']
2024-04-18 08:38:46,671:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery under back SOC, raw_value extra
2024-04-18 08:38:46,671:DEBUG:abstractprotocol:process_response@124: Discarding Battery under back SOC:extra
2024-04-18 08:38:46,672:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,672:DEBUG:abstractprotocol:decode@475: Got defn [21, 'Battery weak SOC in hybrid mode', 'int', '%']
2024-04-18 08:38:46,673:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery weak SOC in hybrid mode, raw_value extra
2024-04-18 08:38:46,673:DEBUG:abstractprotocol:process_response@124: Discarding Battery weak SOC in hybrid mode:extra
2024-04-18 08:38:46,673:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,674:DEBUG:abstractprotocol:decode@475: Got defn [22, 'Battery weak back SOC in hybrid mode', 'int', '%']
2024-04-18 08:38:46,674:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Battery weak back SOC in hybrid mode, raw_value extra
2024-04-18 08:38:46,675:DEBUG:abstractprotocol:process_response@124: Discarding Battery weak back SOC in hybrid mode:extra
2024-04-18 08:38:46,675:DEBUG:abstractprotocol:decode@455: Processing INDEXED type responses
2024-04-18 08:38:46,676:DEBUG:abstractprotocol:decode@475: Got defn [23, 'Unknown', 'int', '']
2024-04-18 08:38:46,676:DEBUG:abstractprotocol:process_response@118: Processing data_type: int for data_name: Unknown, raw_value extra
2024-04-18 08:38:46,677:DEBUG:abstractprotocol:process_response@124: Discarding Unknown:extra
2024-04-18 08:38:46,677:INFO:device:run_command@116: Decoded response {'_command': 'BATS', '_command_description': 'Query battery setting', 'raw_response': ['^D0762160,0584,0584,0000,060,0530,0420,0512,0420,0512,1,,,0,0480,000,0010,0375ñå\r', ''], 'Battery maximum charge current': [216.0, 'A'], 'Battery constant charge voltage': [58.4, 'V'], 'Battery floating charge voltage': [58.4, 'V'], 'Battery stop charger current level in floating charging': [0.0, 'A'], 'Keep charged time of battery catch stopped charging current level': [60, 'Minutes'], 'Battery voltage of recover to charge when battery stop charger in floating charging': [53.0, 'V'], 'Battery under voltage': [42.0, 'V'], 'Battery under voltage release': [51.2, 'V'], 'Battery weak voltage in hybrid mode': [42.0, 'V'], 'Battery weak voltage release in hybrid mode': [51.2, 'V'], 'Battery Type': ['Li-Fe', ''], 'AC charger keep battery voltage function enable/diable': ['Disabled', ''], 'AC charger keep battery voltage': [48.0, 'V'], 'Battery temperature sensor compensation': [0.0, 'mV'], 'Max. AC charging current': [1.0, 'A'], 'Battery discharge max current in hybrid mode': [375, 'A']}
2024-04-18 08:38:46,678:DEBUG:__init__:main@427: results: {'_command': 'BATS', '_command_description': 'Query battery setting', 'raw_response': ['^D0762160,0584,0584,0000,060,0530,0420,0512,0420,0512,1,,,0,0480,000,0010,0375ñå\r', ''], 'Battery maximum charge current': [216.0, 'A'], 'Battery constant charge voltage': [58.4, 'V'], 'Battery floating charge voltage': [58.4, 'V'], 'Battery stop charger current level in floating charging': [0.0, 'A'], 'Keep charged time of battery catch stopped charging current level': [60, 'Minutes'], 'Battery voltage of recover to charge when battery stop charger in floating charging': [53.0, 'V'], 'Battery under voltage': [42.0, 'V'], 'Battery under voltage release': [51.2, 'V'], 'Battery weak voltage in hybrid mode': [42.0, 'V'], 'Battery weak voltage release in hybrid mode': [51.2, 'V'], 'Battery Type': ['Li-Fe', ''], 'AC charger keep battery voltage function enable/diable': ['Disabled', ''], 'AC charger keep battery voltage': [48.0, 'V'], 'Battery temperature sensor compensation': [0.0, 'mV'], 'Max. AC charging current': [1.0, 'A'], 'Battery discharge max current in hybrid mode': [375, 'A']}
2024-04-18 08:38:46,679:INFO:__init__:get_output@40: attempting to create output processor: screen
2024-04-18 08:38:46,685:DEBUG:screen:__init__@17: processor.screen __init__ args: (), kwargs: {}
2024-04-18 08:38:46,685:DEBUG:__init__:main@433: Using output filter: None
2024-04-18 08:38:46,686:INFO:screen:output@23: Using output processor: screen
2024-04-18 08:38:46,687:DEBUG:screen:output@24: kwargs {'data': {'_command': 'BATS', '_command_description': 'Query battery setting', 'raw_response': ['^D0762160,0584,0584,0000,060,0530,0420,0512,0420,0512,1,,,0,0480,000,0010,0375ñå\r', ''], 'Battery maximum charge current': [216.0, 'A'], 'Battery constant charge voltage': [58.4, 'V'], 'Battery floating charge voltage': [58.4, 'V'], 'Battery stop charger current level in floating charging': [0.0, 'A'], 'Keep charged time of battery catch stopped charging current level': [60, 'Minutes'], 'Battery voltage of recover to charge when battery stop charger in floating charging': [53.0, 'V'], 'Battery under voltage': [42.0, 'V'], 'Battery under voltage release': [51.2, 'V'], 'Battery weak voltage in hybrid mode': [42.0, 'V'], 'Battery weak voltage release in hybrid mode': [51.2, 'V'], 'Battery Type': ['Li-Fe', ''], 'AC charger keep battery voltage function enable/diable': ['Disabled', ''], 'AC charger keep battery voltage': [48.0, 'V'], 'Battery temperature sensor compensation': [0.0, 'mV'], 'Max. AC charging current': [1.0, 'A'], 'Battery discharge max current in hybrid mode': [375, 'A']}, 'tag': 'BATS', 'name': 'unnamed', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff9b822830>, 'udp_port': 5555, 'postgres_url': None, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway', 'mqtt_topic': None, 'filter': None, 'excl_filter': None, 'keep_case': False}
2024-04-18 08:38:46,688:DEBUG:screen:output@68: displayData: {'battery_maximum_charge_current': [216.0, 'A'], 'battery_constant_charge_voltage': [58.4, 'V'], 'battery_floating_charge_voltage': [58.4, 'V'], 'battery_stop_charger_current_level_in_floating_charging': [0.0, 'A'], 'keep_charged_time_of_battery_catch_stopped_charging_current_level': [60, 'Minutes'], 'battery_voltage_of_recover_to_charge_when_battery_stop_charger_in_floating_charging': [53.0, 'V'], 'battery_under_voltage': [42.0, 'V'], 'battery_under_voltage_release': [51.2, 'V'], 'battery_weak_voltage_in_hybrid_mode': [42.0, 'V'], 'battery_weak_voltage_release_in_hybrid_mode': [51.2, 'V'], 'battery_type': ['Li-Fe', ''], 'ac_charger_keep_battery_voltage_function_enable/diable': ['Disabled', ''], 'ac_charger_keep_battery_voltage': [48.0, 'V'], 'battery_temperature_sensor_compensation': [0.0, 'mV'], 'max._ac_charging_current': [1.0, 'A'], 'battery_discharge_max_current_in_hybrid_mode': [375, 'A']}
Command: BATS - Query battery setting
--------------------------------------------------------------------------------
Parameter                                                                           Value               Unit
battery_maximum_charge_current                                                      216.0               A   
battery_constant_charge_voltage                                                     58.4                V   
battery_floating_charge_voltage                                                     58.4                V   
battery_stop_charger_current_level_in_floating_charging                             0.0                 A   
keep_charged_time_of_battery_catch_stopped_charging_current_level                   60                  Minutes
battery_voltage_of_recover_to_charge_when_battery_stop_charger_in_floating_charging 53.0                V   
battery_under_voltage                                                               42.0                V   
battery_under_voltage_release                                                       51.2                V   
battery_weak_voltage_in_hybrid_mode                                                 42.0                V   
battery_weak_voltage_release_in_hybrid_mode                                         51.2                V   
battery_type                                                                        Li-Fe                   
ac_charger_keep_battery_voltage_function_enable/diable                              Disabled                
ac_charger_keep_battery_voltage                                                     48.0                V   
battery_temperature_sensor_compensation                                             0.0                 mV  
max._ac_charging_current                                                            1.0                 A   
battery_discharge_max_current_in_hybrid_mode                                        375                 A   
--------------------------------------------------------------------------------


2024-04-18 08:38:46,690:DEBUG:__init__:main@459: Not daemon, so not looping
ubuntu@ubuntu:~$ systemctl --user start mpp-solar
ubuntu@ubuntu:~$ 

Ok, interesting to know that you've gotten here without reverse engineering and only with docs. Do you have any docs for this specific inverter? In your experience, will MPPSolar reply with docs when asked for this? I assume they're quite unresponsive because the premature float bug is still not fixed, years later. Where did you get the docs that you have?

Worst case I assume one would have to sniff the communication between the windows app and the inverter, but I have no experience with doing that :(

@jblance
Copy link
Owner

jblance commented Apr 18, 2024

The docs are here https://github.com/jblance/mpp-solar/tree/master/docs/protocols
The docs have come from a variety of places and people (randomly) I have never managed to get any from mppsolar directly
If you can sniff any app the can set the voltages on the serial port we can figure out what is being sent

@PaulEPop
Copy link

PaulEPop commented Jun 3, 2024

Changing voltages via /dev/hidraw wouldn't possible.
I have testing 'hidraw' = rejected
testing with 'ttyUSB0' = 'ACK'
;)

@danieltroger
Copy link
Author

Ahh, I see @PaulEPop, thanks for the information. I wonder how the WatchPower/SolarPower PC application does it then, because that one can set the voltages via USB…

ttyUSB0 is serial, right? Would love to hear how you connect the inverter to the serial port on a raspberry pi

@PaulEPop
Copy link

PaulEPop commented Jun 3, 2024

ttyUSB0 is serial, correct.
To your question.. I have used a USB2RS232 adapter, it was still laying around.

@jblance
Copy link
Owner

jblance commented Jun 3, 2024

can anyone sniffer the watchpower app setting the voltages via a 'hidraw' connection (ie direct USB without USB to RS232 adapter)

as it works via serial, the command must be correct - i expect it is to do with the breaking up of the send into multiple chunks to send via hidraw, but I thought the current approach had resolved the issue (obviously not)

unfortunately I dont have an inverter of that uses this protocol to test against

@riogrande75
Copy link

@jblance MPI 15K needs solarpower app, watchpower app is for offgrid devices only (axpert,etc.).

@danieltroger Can you set the float charging voltage to 58,3V via SolarPower (windows)? Does it get stored correctly in memory and does it remain for some minutes? If you have BMS connected (via BMS-Box or Card) then this settings get overwritten in inverter's config.

BTW: Latest protocol description for hybrid inverters I got from voltronic can be found here:
Infini-Solar_10KW%252615KW_protocol_20230129.xlsx

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