sermatec-opensource / homeassistant-sermatec-inverter

Home Assistant custom component for the Sermatec solar inverter.
MIT License
8 stars 2 forks source link

Peak-Valley Mode Configuration Loss in Home Assistant Integration #61

Open mboron opened 1 month ago

mboron commented 1 month ago

I'm having an issue with switching the operating mode in the Home Assistant integration.

Switching operating mode from "Peak-Valley" to "General Mode" works well in most cases. Just sometimes I'm getting the "Error setting parameter: Inverter didn't provide data." error. But the second or third attempt succeeds.

The real issue is when switching operating mode from "General Mode" to "Peak-Valley". This action clears my configuration of timings in "Peak-Valley" mode. E.g. I can set up "Flat" for 00:00 - 24:00. When I turn on the "Peak-Valley" mode, this configuration disappears.

My inverter:

Home Assistant:

Before switching to the "Peak-Valley" mode: IMG_3803

After switching to the "Peak-Valley" mode: IMG_3804

andreondra commented 1 month ago

Hi, thanks for reporting this.

The problem with setting parameters is caused by the inverter -- sometimes it just won't send any data.

The issue with switching to Peak-Valley mode: this is probably caused by the fact that the inverter requires to set all data again on every mode change. The script simply sends "no data", which apparently means "delete everything". This would require a bigger change in comm script and thorough testing (my inverter's fw is older and some stuff in protocol is different).