Open danieltroger opened 5 months ago
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:
still looks like somethign else is running - as a set command should return that much info
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)
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:
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).
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)
Yeah, it doesn't work with a different voltage either
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 :(
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
Changing voltages via /dev/hidraw wouldn't possible. I have testing 'hidraw' = rejected testing with 'ttyUSB0' = 'ACK' ;)
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
ttyUSB0 is serial, correct. To your question.. I have used a USB2RS232 adapter, it was still laying around.
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
@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
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:
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: