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

Solax Modbus integration: button.solis_update_charge_discharge_times button pressing #371

Open
stevebuk1 opened this issue Jan 11, 2025 · 3 comments

Comments

@stevebuk1
Copy link
Collaborator

stevebuk1 commented Jan 11, 2025

button.solis_update_charge_discharge_times needs pressing when different times have been written to the number entities. It does not need pressing for updates to inverter current.

However, when the times are correct but the current is changed, PV_opt presses button.solis_update_charge_discharge_times:

11/01, 00:00:38     INFO: Currently in charge/discharge/hold slot
11/01, 00:00:38     INFO: Current charge/discharge window ends in 389.4 minutes.
11/01, 00:00:38     INFO: Charge status is active, not setting start time
11/01, 00:00:38     INFO: Setting end time to 11-Jan 06:30 GMT
11/01, 00:00:38     INFO: Setting power to 800
11/01, 00:00:38     INFO: Setting SOC to 82
11/01, 00:00:38     INFO: Entity: number.solis_timed_charge_end_hours Value:  6.0  Old State:  6.0 New state: None Diff:  0.0 Tol:  0.0
11/01, 00:00:38     INFO: Entity: number.solis_timed_charge_end_minutes Value: 30.0  Old State: 30.0 New state: None Diff:  0.0 Tol:  0.0
11/01, 00:00:39     INFO: Entity: number.solis_timed_charge_current Value: 15.7  Old State: 15.8 New state: 15.7 Diff:  0.1 Tol:  0.1
11/01, 00:00:39     INFO: Current 15.7A written to inverter
11/01, 00:00:39     INFO: Something changed - need to press the appropriate Button
11/01, 00:00:39     INFO: Successfully pressed button button.solis_update_charge_discharge_times
11/01, 00:00:39     INFO: Waiting for inverter Read cycle: 18 seconds

This also happens when the current actually need changing:

11/01, 02:00:14     INFO: Currently in charge/discharge/hold slot
11/01, 02:00:14     INFO: Current charge/discharge window ends in 269.8 minutes.
11/01, 02:00:14     INFO: Charge status is active, not setting start time
11/01, 02:00:14     INFO: Setting end time to 11-Jan 06:30 GMT
11/01, 02:00:14     INFO: Setting power to 900
11/01, 02:00:14     INFO: Setting SOC to 85
11/01, 02:00:14     INFO: Entity: number.solis_timed_charge_end_hours Value:  6.0  Old State:  6.0 New state: None Diff:  0.0 Tol:  0.0
11/01, 02:00:14     INFO: Entity: number.solis_timed_charge_end_minutes Value: 30.0  Old State: 30.0 New state: None Diff:  0.0 Tol:  0.0
11/01, 02:00:14     INFO: Entity: number.solis_timed_charge_current Value: 17.7  Old State: 17.6 New state: None Diff:  0.1 Tol:  0.1
11/01, 02:00:14     INFO: Inverter already at correct current
11/01, 02:00:14     INFO: Something changed - need to press the appropriate Button
11/01, 02:00:15     INFO: Successfully pressed button button.solis_update_charge_discharge_times

The issue is caused by changed being an or of the response from _set_times and _set_current where changed is consequently used to press the button. The button should only be pressed if _set_times reports a change.

@fboundy
Copy link
Owner

fboundy commented Jan 11, 2025 via email

@stevebuk1
Copy link
Collaborator Author

stevebuk1 commented Jan 11, 2025

I imagined it might be needed for the new firmware, just concerned that for the old its more avoidable EEPROM writes to the time registers as current does tend to vary if on an overnight tariff.

@fboundy
Copy link
Owner

fboundy commented Jan 11, 2025 via email

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

2 participants