09.02.2022, 08:19
(This post was last modified: 09.02.2022, 08:21 by Erwin van der Zwart.)
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
For monitoring in the controller you can add a resident script to 60 seconds, tag your live signal objects with the tag "Live Signal"
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
});
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