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 whether you accept or reject these cookies being set.

Information about database synchronization, storage, script and others
#1
Hello partners, I hope you are excellent especially in these times of pandemic. I come to you since perhaps they have some experience in this regard and could indicate some paths that I could take, with this I am not saying that they make me the codes, since I know that the purpose of this forum is to help with the concerns that arise. Already growing up in the world of logic machine and thanks to your help and special from Admin and Erwin, I have been able to take many things forward.


As for the inconvenience that I have is in a hotel, I have 10 logic machines, which are communicated by their visualization. In addition to the above there are certain configurations that I generate in any of the 10 and I synchronize them with the others through HTTP REQUEST, this option has helped me a lot in this regard. The problem is that I have to create some species of "groups" or rather the hotel will create them with which you will be free to do them, I have to associate rooms with these groups and in turn some actions which may or may not have some time schedules . The above must be added, saved, modified and deleted in any logic machine, but I must synchronize this information with the rest. As you realize, the above implies knowledge in databases, storage and other things that I do not know. Therefore, I ask you if you have information, threads, documentation and suggestions that may help me, to know where I should start. Thank you for your attention and any information will be very useful to me.
Reply
#2
Hi,

Can you explain what the purpose is of having several schedulers that are synced all the time, why don't you use 1 master scheduler that is located in 1 LM and control the scheduled objects in the other LM's over KNX IP? You can add the Master scheduler in every visu by a frame so when you change it, it change in all the visu's, this way you don't need to sync anything as it is centralized already..

BR,

Erwin
Reply
#3
Hello, thanks for answering. Synchronization is required because each logic machine controls from 5 to 12 rooms and if you have only one calendar server, there may be a possibility that if the logic machine with the calendar server goes down, the whole hotel will stop working (111 rooms On the other hand, if each logic machine has control and the calendar server, in case one of them fails, the worst thing that can happen is that 12 rooms stop working and 111 rooms stop working. On the other hand, in each logic machine, the same group addresses are repeated, which saves a lot of time on the links, script and others, that's why sometimes for a general configuration, it is convenient to synchronize it (it should be noted that the Synchronizations I do by request, since I have a filter table to prevent a telegram from jumping from one logic machine to another).
Reply
#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: 12)

BR,

Erwin
Reply


Forum Jump: