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.

Visu Heartbeat
#2
I think something like this should work..

Add this to your custom JS and adjust the usename for each panel and the group address where you want to receive the live signal
Code:
$(function(){
  setInterval(
    function () {
    if(Globals.user == null){
        // Action when visu has a disabled logon
    } else if(Globals.user == "username panel 1"){
        grp.update('1/1/1', true)
    } else if(Globals.user == "username panel 2"){
        grp.update('1/1/2', true)
    } else if(Globals.user == "username panel 3"){
        grp.update('1/1/3', true)
    } else if(Globals.user == "username panel 4"){
        grp.update('1/1/4', true)
    }
    }, 60000); // Interval of live signal every minute
});
For monitoring in the controller you can add a resident script to 60 seconds, tag your live signal objects with the tag "Live Signal"
Code:
livesignals = grp.tag('Live Signal')
for key, object in pairs(livesignals) do
  difference = os.time() - object.updatetime
  if difference > 120 then
    log(object.name .. ' is offline')
  end
end
Reply


Messages In This Thread
Visu Heartbeat - by sebastian.strasser - 07.02.2022, 10:00
RE: Visu Heartbeat - by Erwin van der Zwart - 09.02.2022, 08:19

Forum Jump: