13.06.2016, 16:52
(13.06.2016, 14:09)Erwin van der Zwart Wrote: Hi Buuuudzik,
I would definitly check your scripts, we use our controller for buildings up to 20 floors where we have approx 500 KNX devices behind each controller (as zone coupler) and those have much more data then a single house. We run all scripts server side...
Also be aware when you open your visu on multiple locations your logic runs multiple times, don't write to the controller on those cases, but keep client side logic inside visu only.
BR,
Erwin
I know this and I am aware about that in such case logic can run multiple times.
I can show my mechanism which is based on this:
http://forum.logicmachine.net/showthread...l+statuses
This is what I do:
This lamps has tag "Room1" and change the status of Room1_status:
Lamp1.1_status
Lamp1.2_status
Lamp1.3_status...
The same is with rooms which have tags e.g. "Floor1_status":
Room1_status
Room2_status
Room3_status...
Third level is "Central_status" which is configured in the same way.
All of this functions are based on the function tag_or(tag) which is included in user-libraries:
Code:
function tag_or(tag)
local objects, result
result = false
objects = grp.tag(tag)
for _, object in ipairs(objects) do
result = result or object.data
end
return result
end
The advantage of this solution is that the statuses are structured and simple to change or extend with new one.
I respect you Erwin, and probably there some other way to do this but I don't know in what other way I can do this. How do you do this in your big projects? Do you create also Room statuses or no?