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.

Information about database synchronization, storage, script and others
#4
Hi,

I was triggered by the request and wanted to see if it was do-able and offcourse as always there is a way and i liked the challenge (:

You need to create sync.lp on the master controller so run the script once in there, now we can request the scheduler data from the main database from another controller.

In the other controllers you need to create a event based script with a trigger or a resident/scheduled script at the desired interval, you also need to create the schedulers and holidays with the exact same names as in the main controller., events can be empty as they are synced anyway.

Events and holidays will by synced from the main controller, all scheduler events and holidays with the same name will be cleared first (after a check that request for data was succesful) and then populated with the data from the main controller. All schedulers events and holidays in the slave controller with another name will stay untouched.

The start/end date from schedulers with the same name as in the main controller will also be syncronised, including the active state. So if you disable the scheduler or events in the main controller, they will be also synced as disabled in the slaves.

Group adrresses for output and disabling the scheduler are not synced so you can attached them to any addresses you like in the slaves.

It works even over the internet, i just uploaded my scheduler events to the LM demo and it was poulated with all events i have at home (:

Here are the 2 files you need:

.lua   Create sync lp.lua (Size: 1.21 KB / Downloads: 37)

BR,

Erwin
Reply


Messages In This Thread
RE: Information about database synchronization, storage, script and others - by Erwin van der Zwart - 11.06.2020, 00:16

Forum Jump: