Logic Machine Forum
Passage from one HK/LM to another - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Passage from one HK/LM to another (/showthread.php?tid=852)



Passage from one HK/LM to another - Gadjoken - 20.06.2017

Hi,
I would like to know if there is a simple way to switch from viewing one HomeLynk / LM to another without nesting the visualization of the other but really opening up the visualization of the second HK / LM.
Thanks.



RE: Passage from one HK/LM to another - Erwin van der Zwart - 20.06.2017

Hi,

Use this as custom javascript on object bit 1/1/1 in both controllers:
Code:
$(function() {
  if (typeof grp != 'undefined') {
     grp.listen('1/1/1', function(object, state) {
         var value = object.value;
         if (state == 'value') {
            if (value == 0) {
              $(location).attr('href', 'http://admin:admin@192.168.0.10/scada-vis');
            } else {
              $(location).attr('href', 'http://admin:admin@192.168.0.11/scada-vis');    
           }
         }
      }, true);  
  }
});
Make sure both controllers have this custom javascript, the object 1/1/1 and can communicate over KNX IP or KNX TP so object value will be always the same in both controllers

BR,

Erwin


RE: Passage from one HK/LM to another - Gadjoken - 22.06.2017

Hi Erwin,
Very good.
Thanks