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
#1
Hello,

i am not familiar with javascript.
is it possible to create in Javascript a Heartbeat on a GroupAdress?
The GroupAdress have to be based on the Username or anything else.

I have the Problem that sometimes the Visu is not showing on ipad in safari after many days(Display is Black, Guided Access). I want to create a error when the visu is not connected.

In the Project i have 50 Spacelynks with 4 Ipads per Spacelynk with a different Visu per iPad
Reply
#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


Forum Jump: