22.06.2022, 11:59
Thanks admin
this is the code I used
I used two for loop because first digit of the grp-addr changed
while the addresses are not in series there are some addresses in the for loop not used, is there any issue in this case?
Another case:
some devices has to alarm objects, I added two additional classes like (off-40 off-41) but it didn't work as logic or, moreover when refresh the page its updated correct!
Is there a solution for this case
BR,
this is the code I used
I used two for loop because first digit of the grp-addr changed
while the addresses are not in series there are some addresses in the for loop not used, is there any issue in this case?
Code:
$(function(){
if (window.grp) {
function listen(j,i) {
grp.listen(j + '/7/' + i, function(object) {
$('.acoff-' + j+'-'+i).toggleClass('acoff', object.value == false);
});
}
for (var j = 11; j <= 12; j++) {
for (var i = 7; i <= 55; i++) {
listen(j,i);
}
}
}
});
Another case:
some devices has to alarm objects, I added two additional classes like (off-40 off-41) but it didn't work as logic or, moreover when refresh the page its updated correct!
Is there a solution for this case
BR,
Best Regards,