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.

Screensaver based on group object state
#1
Hi
I'd like to start screensaver (dim after xx minutes) when night is active only. It would be nice to have it room specific but one general GO applied for whole visu is good enough.
Is it possible?
Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#2
Add this to Custom JavaScript, change 32/1/7 to night mode object address.

Code:
if (typeof setVisDim === 'function') {
  var oldfn = setVisDim, night;
  
  setVisDim = function() {
    // console.log('setVisDim', night);
    if (night) {
      oldfn();
    }
  }
  
  $(function() {
    grp.listen('32/1/7', function(obj) {
      night = obj.value;
      // console.log('night', night);
    });
  });
}
Reply
#3
Thank you. It does almost what I want. But it doesn't stop the actually running screensaver (dimming). Can I stop it somehow when '32/1/7' gets FALSE?
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#4
Code:
$(function() {
  grp.listen('32/1/7', function(obj) {
    night = obj.value;
    if (!night) {
      $E.modalBg.addClass('hide');
    }
  });
});
Reply


Forum Jump: