This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Use of a table as a global variable for several scripts
#4
(28.01.2026, 09:30)admin Wrote: Use storage. It's only written to the SD card once every 30 minutes.
But keep in mind that it's possible to lose some data if several scripts write to the same storage key in parallel.

Describe what exactly you need to store and how this data will be used.

I'm logging in a database some objects, with additional info and works perfect, but it consume a lot of resources when too many varibles change at the same time.

To avoid this I pretend that events scripts instead of publishing in the database, they could storage in memory somehow a list with the name, the updatetime and the value of the monitorized variables. 
Then define a period to publish this list of register in the database WHEN THE DEVICE has low loadl

I thought that a global variable will works ...
Reply


Messages In This Thread
RE: Use of a table as a global variable for several scripts - by kike - 28.01.2026, 09:48

Forum Jump: