kwindrem / ExtTransferSwitch

7 stars 1 forks source link

Run timer incorrect on Venus 3.10~21 #9

Closed drtinaz closed 1 year ago

drtinaz commented 1 year ago

Kevin, in followup to our conversation on victron community...

The run timer appears to be doing strange things on Venus os beta 3.10~21. I uninstalled exttransferswitch and guimods and the current run timer and daily timers function properly. I then installed exttransferswitch and did a 5 minute test run. Within a few seconds of the generator starting, both timers (current run timer, and daily run timer) instantly added 15 minutes to their totals. Before this test run the current timer was at 0 and the daily timer was at 5. After the 5 minute test run was complete, the current timer reset to 0, and the daily timer was at 20. (the daily timer should have had only run a total of 10 minutes)

After this test, I reverted back to release 3.0 and repeated the 5 minute test run. The timers worked as expected with no 'extra' minutes being added.

One other issue that I noticed is a previous problem reappeared. (In the beta version, not the the stable release). Previously there was an issue with the ac input being re-enabled after the cool down period but before the generator had actually shut down, resulting in the inverter switching back to generator right before it actually shut down. This behavior is back in 3.10~21.

kwindrem commented 1 year ago

Thanks for the detailed report. I'll look into it.

kwindrem commented 1 year ago

I found an issue in the ExtTransferSwitch version that caused the jump in value when starting the generator you reported but did not find any "double value" increases in today's run time. It's possible the jump was causing the nearly double time you reported in the Victron community posting.

Things are complicated by the fact that ExtTransferSwitch and GuiMods both modify startstop.py. And I did not find any problems in the GuiMods version. This is odd because you should have been running the GuiMods version yesterday. Today, your test (with GuiMods uninstalled) would have been running the ExtTransferSwitch version and I believe your numbers are consistent with the bug I found.

There are new versions of ExtTransferSwitch and GuiMods packages you should try.

As far as the post-cooldown issue, I could not duplicate that here. One note: if the generator was not actually feeding the Multi during your test run, there should not have been a cool-down or post-cooldown period. The generator would go from running directly to stopped.

Let me know what you find.

drtinaz commented 1 year ago

Fyi, the generator was feeding the multi and charging batteries during the test run. When I say "test run" I did not mean to imply that I actually used the test run function, but rather just a timed manual run start. Sorry for my confusing terminology.

kwindrem commented 1 year ago

Did you notice the generator went through a cool-down period at the end of the run? Then no post-cooldown period?

I'm seeing a proper transition: running -> cooldown -> stopping -> stopped with the appropriate time between each step.

Looking at the code, I note that the post-cooldown period was 30 seconds for v3.00/01 and is now 15 seconds per Victron. Could it be that the 15 seconds isn't long enough?

FYI: If you don't have a cool-down period set, there won't be any cool-down OR post-cooldown periods.

I log the transitions between states so if you have access to the logs you can see that and when loads are shed and restored.

tail -50 /data/log/gen/current | tai64nlocal

will give you time stamps.

You can also get to the logs by doing a settings backup in PackageManager with a USB stick installed. All the logs are placed in logs.zip on the stick. you can post that here and I'll look at it.

drtinaz commented 1 year ago

Yes it did a cool down period, then no post cool down period. My generator takes about 3 seconds from the time the relay opens until full stop, so 15 seconds should be sufficient.

Unfortunately it will be a few days before I am able to dive back into this too deep. I'm still travelling and dealing with some mechanical issues once I get to my next destination. For the time being I have reverted to 3.0 for stability while I'm on the road.

kwindrem commented 1 year ago

Thanks for the update and sorry you are having to go through all this. Reverting to v3.00/01 is a good idea.

kwindrem commented 1 year ago

I found a bug in the code that explains the end of cool-down issue you were seeing. The bug allowed the generator to continue running through the post cool-down period!!! Obviously wrong. Should be OK in v7.77 of GuiMods and v2.6 of ExtTransferSwitch

drtinaz commented 1 year ago

I can confirm that it is functioning properly again. Bothe the timer and the end of cool down function.

kwindrem commented 1 year ago

Thanks for confirming and thanks for your detailed reporting.