Page 1 of 1

Simutaneous writing of global variables in dzvents can create data loss and errors

Posted: Monday 02 December 2024 17:47
by Kifo
I have several dzvents sripts writing global variables at domoticz.globalData. Recently I discovered, if two such scripts are triggered at the same time, this can result in
  • values getting lost (deleted from the list of global variables)
  • unspecfic error messages such as
    - dzVents: There was a problem writing the storage values
    - Lua script execution exceeds maximum number of lines
    - auth token mismatch
Especially writing complex data like history tables or larger objects at the same time can cause the issue. It does not happen all the time, but about 1 or 2 times a day.
After arranging the execution time of these scripts in a way that they are never executed at the same time, these effects disappeared.

Looks like dzvents is lacking an effectiv execution queue for writing the global data.