britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
71 stars 32 forks source link

BUG: REST documentation, setChargeRate, setDischargeRate #174

Open slopemad opened 3 months ago

slopemad commented 3 months ago

The documentation specifies the chargeRate and dischargeRate values should be as a percentage of max

setChargeRate | Sets the charge power as a percentage. 100% == 2.6kW | /setChargeRate | {"chargeRate","100"} setDischargeRate | Sets the discharge power as a percentage. 100% == 2.6kW | /setDischargeRate | {"dischargeRate","100"}

When I set the charge/discharge rate through the api, if I use a value of 100 or lower, it sets the charge rate to zero

2024-03-21 04:30:10,801 - Inv1 - write       -  [INFO    ] - Setting battery charge rate to: 100 (0)
2024-03-21 04:30:21,032 - Inv1 - write       -  [INFO    ] - Setting battery charge rate 0 was a success

but if I use an absolute value of, say, 1300 (rather than 50) then it correctly sets the value (to 1253, as expected).

2024-03-21 08:06:09,706 - Inv1 - write       -  [INFO    ] - Setting battery charge rate to: 1300 (12)
2024-03-21 08:06:11,686 - Inv1 - write       -  [INFO    ] - Setting battery charge rate 12 was a success
springfall2008 commented 2 months ago

They don't set percentage they set watts