britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
73 stars 34 forks source link

Race condition setting discharge start and charge end time slots #30

Closed springfall2008 closed 1 year ago

springfall2008 commented 1 year ago

If you set the discharge start time slot followed by the discharge end time slot quickly (e.g. just in the gui or with a service), setting the end time slot overwrites the start time slot with the old value

springfall2008 commented 1 year ago
image image
springfall2008 commented 1 year ago

I think we have the same issue for charge slot times too

springfall2008 commented 1 year ago

It seems like a fairly easy fix in 'https://github.com/britkat1980/giv_tcp/blob/main/givenergy_modbus/client.py'. Maybe if you passed an illegal time value it could not write the register for the illegal value and leave the only value intact, e.g. 99:99:99 or suchlike Or add a mask Or add a new function just to write one register?

springfall2008 commented 1 year ago

Confirmed as fixed