AchimKre / venus.dbus-tasmota-smartmeter

MIT License
4 stars 2 forks source link

UpdateIndex is incremented too often / script runs twice #3

Open tm-107 opened 5 months ago

tm-107 commented 5 months ago

Hello, the UpdateIndex should be increased by 1 with each run. For me, however, it is increased by 2 each time (or 2x +1 very quickly in succession). Could this be a reason why the script crashed twice for me?

tm-107 commented 5 months ago

I have now found that the error only occurs with a pause time of 1000ms. At other break times the intervals between the runs were no longer correct at all.

In my opinion the error is in line 70. This is just a duplication of line 67, which then apparently leads to a double repetition. And it has nothing to do with the log either. At least that's the conclusion of the analysis with my modest Python knowledge and so far the script with line 70 commented out is running without errors. In addition, the load average is now a lot lower.

In any case, that could have been a reason why the script got stuck for me (and apparently others too) a few times.