Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. HelmutS

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 20
    • Best 2
    • Groups 1

    HelmutS

    @HelmutS

    2
    Reputation
    5
    Profile views
    20
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    HelmutS Follow
    Starter

    Best posts made by HelmutS

    • RE: [Vorlage] Variable Zeitsteuerung mit VIS Editor

      Ändere im Script mal folgende Funktion:

          // Double-Click Aktion aus Tabelle für Spezialfunktionen
          on({id: "javascript.0.Timer." + path + ".dblClickTarget", change: "any"}, function (obj) {
          	
              var btnSource = obj.state.val.split("~")[2]; // Button-Funktion wird eingelesen
      
              if (btnSource == "dev" || btnSource == "time"){ // Edit-Dialog öffnen bei Doppelklick Geräte- oder IST-Zeit-Button
                  setState("vis.0.control.data"/*Data for control vis*/, DlgWidget);
                  setState('vis.0.control.instance'/*Control vis*/, "FFFFFFFF");
                  setState("vis.0.control.command"/*Command for vis*/, 'dialog');
                  delFocusOnTimer(false); // Auswahl des Timers nicht automatisch zurücksetzen!
              }
              if (btnSource == "nr"){ // Aktivieren/Deaktivieren des Timers
                  setState("javascript.0.Timer." + path + ".Editor.Aktiv", !getState("javascript.0.Timer." + path + ".Editor.Aktiv").val);
              }
      
          });
      

      Dann funktioniert bei mir der Doppelklick
      Zeile 8 ist neu

      posted in Visualisierung
      H
      HelmutS
    • RE: Beta Test js-controller 3.0.x auf GitHub

      @apollon77
      Installiert sind js-controller 3.0.7 und tr-064 4.0.0.
      Läuft, danke

      posted in Tester
      H
      HelmutS

    Latest posts made by HelmutS

    • RE: Test Adapter Admin 5.0.x: Alpha der neuen UI

      @jb_sullivan
      In Version 5.1.0 ist alles wieder gut (auch der Fehler beim Log)

      posted in Tester
      H
      HelmutS
    • RE: Test Adapter Admin 5.0.x: Alpha der neuen UI

      @thomas-braun
      Danke

      posted in Tester
      H
      HelmutS
    • RE: Test Adapter Admin 5.0.x: Alpha der neuen UI

      Ich kann unter Admin 5.0.32 nicht mehr auf die Einstellungen der Adapter zugreifen. Der "Schraubenschlüssel" ist ausgegraut.
      Unter 5.0.31 funktioniert es noch.

      posted in Tester
      H
      HelmutS
    • RE: [Vorlage] Variable Zeitsteuerung mit VIS Editor

      @echicor
      Was ist beim EDIT-Button unter Dialog eingestellt?

      posted in Visualisierung
      H
      HelmutS
    • RE: [Vorlage] Variable Zeitsteuerung mit VIS Editor

      @GiuseppeS
      Ich danke dir für die viele Arbeit

      posted in Visualisierung
      H
      HelmutS
    • RE: [Vorlage] Variable Zeitsteuerung mit VIS Editor

      @GiuseppeS
      Stimmt, beim ersten Aufruf kommt ein Fehler.
      Ich habe es jetzt so gelöst:

          // Trigger zum Erstellen der Bedingungen als String für späteres eval() (3x)
          on({id: new RegExp('javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond1Comp' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond1State' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond1Value'), change: "any", ack: false}, function (obj) {
              var ConditionJSON = JSON.parse(getState("javascript.0.Timer." + path + ".ConditionJSON").val);
              var Cond1State = getState("javascript.0.Timer." + path + ".Editor.Cond1State").val
              var Cond1Comp = getState("javascript.0.Timer." + path + ".Editor.Cond1Comp").val
              var Cond1Value = getState("javascript.0.Timer." + path + ".Editor.Cond1Value").val
              var strCond1 = "getState(\"" + ConditionJSON[Cond1State] + "\").val " + Cond1Comp + " " + Cond1Value
              setState("javascript.0.Timer." + path + ".Editor.Condition1", strCond1);
              if (Cond1State != "" && Cond1Comp != "" && Cond1Value != "")
              {
                  setState("javascript.0.Timer." + path + ".Editor.Cond1Result", eval(strCond1));
              }
          });
      
          on({id: new RegExp('javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond2Comp' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond2State' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond2Value'), change: "any", ack: false}, function (obj) {
              var ConditionJSON = JSON.parse(getState("javascript.0.Timer." + path + ".ConditionJSON").val);
              var Cond2State = getState("javascript.0.Timer." + path + ".Editor.Cond2State").val
              var Cond2Comp = getState("javascript.0.Timer." + path + ".Editor.Cond2Comp").val
              var Cond2Value = getState("javascript.0.Timer." + path + ".Editor.Cond2Value").val
              var strCond2 = "getState(\"" + ConditionJSON[Cond2State] + "\").val " + Cond2Comp + " " + Cond2Value
              setState("javascript.0.Timer." + path + ".Editor.Condition2", strCond2);
              if (Cond2State != "" && Cond2Comp != "" && Cond2Value != "")
              {
                  setState("javascript.0.Timer." + path + ".Editor.Cond2Result", eval(strCond2));
              }
          });
      
          on({id: new RegExp('javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond3Comp' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond3State' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond3Value'), change: "any", ack: false}, function (obj) {
              var ConditionJSON = JSON.parse(getState("javascript.0.Timer." + path + ".ConditionJSON").val);
              var Cond3State = getState("javascript.0.Timer." + path + ".Editor.Cond3State").val
              var Cond3Comp = getState("javascript.0.Timer." + path + ".Editor.Cond3Comp").val
              var Cond3Value = getState("javascript.0.Timer." + path + ".Editor.Cond3Value").val
              var strCond3 = "getState(\"" + ConditionJSON[Cond3State] + "\").val " + Cond3Comp + " " + Cond3Value
              setState("javascript.0.Timer." + path + ".Editor.Condition3", strCond3);
              if (Cond3State != "" && Cond3Comp != "" && Cond3Value != "")
              {
                  setState("javascript.0.Timer." + path + ".Editor.Cond3Result", eval(strCond3));
              }
          });
      

      Oder fällt dir eine bessere Lösung ein? Du kennst den Script besser

      posted in Visualisierung
      H
      HelmutS
    • RE: [Vorlage] Variable Zeitsteuerung mit VIS Editor

      Nachtrag
      Im Script ab ca. Zeile 820 noch folgende Änderung:

              setState("javascript.0.Timer." + path + ".Editor.Aktiv", TimerJSON[device][nr].Aktiv, true);
              setState("javascript.0.Timer." + path + ".Editor.Zeit", TimerJSON[device][nr].Zeit, true);
              setState("javascript.0.Timer." + path + ".Editor.Cron", TimerJSON[device][nr].Cron, true);
              setState("javascript.0.Timer." + path + ".Editor.TageVIS", TimerJSON[device][nr].TageVIS, true);
              setState("javascript.0.Timer." + path + ".Editor.CronTage", TimerJSON[device][nr].CronTage, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagMo", TimerJSON[device][nr].Mo, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagDi", TimerJSON[device][nr].Di, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagMi", TimerJSON[device][nr].Mi, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagDo", TimerJSON[device][nr].Do, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagFr", TimerJSON[device][nr].Fr, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagSa", TimerJSON[device][nr].Sa, true);
              setState("javascript.0.Timer." + path + ".Editor.WTagSo", TimerJSON[device][nr].So, true);
              setState("javascript.0.Timer." + path + ".Editor.Std", TimerJSON[device][nr].Std, true);
              setState("javascript.0.Timer." + path + ".Editor.Min", TimerJSON[device][nr].Min, true);
              setState("javascript.0.Timer." + path + ".Editor.Sollwert", TimerJSON[device][nr].Sollwert, true);
              setState("javascript.0.Timer." + path + ".Editor.DropDownAstro", TimerJSON[device][nr].Astro, true);
              setState("javascript.0.Timer." + path + ".Editor.Random", TimerJSON[device][nr].Random, true);
              setState("javascript.0.Timer." + path + ".Editor.RandPM", TimerJSON[device][nr].RandPM, true);
              setState("javascript.0.Timer." + path + ".Editor.Offset", TimerJSON[device][nr].Offset, true);
              setState("javascript.0.Timer." + path + ".Editor.OffsetPM", TimerJSON[device][nr].OffsetPM, true);
              setState("javascript.0.Timer." + path + ".Editor.RememberTimer", TimerJSON[device][nr].RememberTimer, true);
              setState("javascript.0.Timer." + path + ".Editor.ConditionsNr", TimerJSON[device][nr].ConditionsNr, true);
              setState("javascript.0.Timer." + path + ".Editor.Condition1", TimerJSON[device][nr].Conditions[1].ConditionStr, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond1State", TimerJSON[device][nr].Conditions[1].CondState, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond1Comp", TimerJSON[device][nr].Conditions[1].CondComp, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond1Value", TimerJSON[device][nr].Conditions[1].CondValue, true);
              setState("javascript.0.Timer." + path + ".Editor.Condition2", TimerJSON[device][nr].Conditions[2].ConditionStr, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond2State", TimerJSON[device][nr].Conditions[2].CondState, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond2Comp", TimerJSON[device][nr].Conditions[2].CondComp, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond2Value", TimerJSON[device][nr].Conditions[2].CondValue, true);
              setState("javascript.0.Timer." + path + ".Editor.Condition3", TimerJSON[device][nr].Conditions[3].ConditionStr, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond3State", TimerJSON[device][nr].Conditions[3].CondState, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond3Comp", TimerJSON[device][nr].Conditions[3].CondComp, true);
              setState("javascript.0.Timer." + path + ".Editor.Cond3Value", TimerJSON[device][nr].Conditions[3].CondValue, true);
              setState("javascript.0.Timer." + path + ".Editor.Gruppe", TimerJSON[device][nr].Gruppe, true);
      
              if (TimerJSON[device][nr].Conditions[1].ConditionStr != ""){
                  setState("javascript.0.Timer." + path + ".Editor.Cond1Result", eval(TimerJSON[device][nr].Conditions[1].ConditionStr));
              }
              if (TimerJSON[device][nr].Conditions[2].ConditionStr != ""){
                  setState("javascript.0.Timer." + path + ".Editor.Cond2Result", eval(TimerJSON[device][nr].Conditions[2].ConditionStr));
              }
              if (TimerJSON[device][nr].Conditions[3].ConditionStr != ""){
                  setState("javascript.0.Timer." + path + ".Editor.Cond3Result", eval(TimerJSON[device][nr].Conditions[3].ConditionStr));
              }
      
      
      posted in Visualisierung
      H
      HelmutS
    • RE: [Vorlage] Variable Zeitsteuerung mit VIS Editor

      Guten Morgen zusammen.
      Ich lasse mir beim editieren der Timer den Zustand der Bedingungen anzeigen.
      Eventuell findet das der eine oder andere nützlich.
      Hier die Änderungen:
      im Script ab ca. Zeile 700, jeweils die letzte Zeile:

          // Trigger zum Erstellen der Bedingungen als String für späteres eval() (3x)
          on({id: new RegExp('javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond1Comp' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond1State' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond1Value'), change: "any", ack: false}, function (obj) {
              var ConditionJSON = JSON.parse(getState("javascript.0.Timer." + path + ".ConditionJSON").val);
              var Cond1State = getState("javascript.0.Timer." + path + ".Editor.Cond1State").val
              var Cond1Comp = getState("javascript.0.Timer." + path + ".Editor.Cond1Comp").val
              var Cond1Value = getState("javascript.0.Timer." + path + ".Editor.Cond1Value").val
              var strCond1 = "getState(\"" + ConditionJSON[Cond1State] + "\").val " + Cond1Comp + " " + Cond1Value
              setState("javascript.0.Timer." + path + ".Editor.Condition1", strCond1);
              setState("javascript.0.Timer." + path + ".Editor.Cond1Result", eval(strCond1));
          });
      
          on({id: new RegExp('javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond2Comp' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond2State' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond2Value'), change: "any", ack: false}, function (obj) {
              var ConditionJSON = JSON.parse(getState("javascript.0.Timer." + path + ".ConditionJSON").val);
              var Cond2State = getState("javascript.0.Timer." + path + ".Editor.Cond2State").val
              var Cond2Comp = getState("javascript.0.Timer." + path + ".Editor.Cond2Comp").val
              var Cond2Value = getState("javascript.0.Timer." + path + ".Editor.Cond2Value").val
              var strCond2 = "getState(\"" + ConditionJSON[Cond2State] + "\").val " + Cond2Comp + " " + Cond2Value
              setState("javascript.0.Timer." + path + ".Editor.Condition2", strCond2);
              setState("javascript.0.Timer." + path + ".Editor.Cond2Result", eval(strCond2));
          });
      
          on({id: new RegExp('javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond3Comp' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond3State' + "|" + 'javascript\\.0\\.Timer\\.' + path + '\\.Editor\\.Cond3Value'), change: "any", ack: false}, function (obj) {
              var ConditionJSON = JSON.parse(getState("javascript.0.Timer." + path + ".ConditionJSON").val);
              var Cond3State = getState("javascript.0.Timer." + path + ".Editor.Cond3State").val
              var Cond3Comp = getState("javascript.0.Timer." + path + ".Editor.Cond3Comp").val
              var Cond3Value = getState("javascript.0.Timer." + path + ".Editor.Cond3Value").val
              var strCond3 = "getState(\"" + ConditionJSON[Cond3State] + "\").val " + Cond3Comp + " " + Cond3Value
              setState("javascript.0.Timer." + path + ".Editor.Condition3", strCond3);
              setState("javascript.0.Timer." + path + ".Editor.Cond3Result", eval(strCond3));
          });
      

      und ab Zeile ca 1000:

      createState("Timer.ActiveTable");
      createState("Timer." + path + ".NextDevice");
      createState("Timer." + path + ".FilterDevice");
      createState("Timer." + path + ".NextDevices");
      createState("Timer." + path + ".clickTarget");
      createState("Timer." + path + ".dblClickTarget");
      createState("Timer." + path + ".AstroJSON");
      createState("Timer." + path + ".DropDownDevice");
      createState("Timer." + path + ".DropDownGruppe");
      createState("Timer." + path + ".Editor.DropDownMinutes");
      createState("Timer." + path + ".Editor.Gruppe");
      createState("Timer." + path + ".Editor.Del");
      createState("Timer." + path + ".Editor.OK");
      createState("Timer." + path + ".Editor.CopyAll");
      createState("Timer." + path + ".Editor.CopyCond");
      createState("Timer." + path + ".Editor.DropDownAstro");
      createState("Timer." + path + ".Editor.DropDownAstroWerte");
      createState("Timer." + path + ".Editor.DropDownAstroTexte");
      createState("Timer." + path + ".Editor.Device");
      createState("Timer." + path + ".Editor.Nummer");
      createState("Timer." + path + ".TimerJSON");
      createState("Timer." + path + ".Editor.Aktiv");
      createState("Timer." + path + ".Editor.Zeit");
      createState("Timer." + path + ".Editor.Cron");
      createState("Timer." + path + ".Editor.TageVIS");
      createState("Timer." + path + ".Editor.CronTage");
      createState("Timer." + path + ".Editor.WTagMo");
      createState("Timer." + path + ".Editor.WTagDi");
      createState("Timer." + path + ".Editor.WTagMi");
      createState("Timer." + path + ".Editor.WTagDo");
      createState("Timer." + path + ".Editor.WTagFr");
      createState("Timer." + path + ".Editor.WTagSa");
      createState("Timer." + path + ".Editor.WTagSo");
      createState("Timer." + path + ".Editor.Std");
      createState("Timer." + path + ".Editor.Min");
      createState("Timer." + path + ".Editor.Sollwert");
      createState("Timer." + path + ".Editor.SollwertDropDown");
      createState("Timer." + path + ".Editor.Random");
      createState("Timer." + path + ".Editor.RandPM");
      createState("Timer." + path + ".Editor.Offset");
      createState("Timer." + path + ".Editor.OffsetPM");
      createState("Timer." + path + ".Editor.RememberTimer");
      createState("Timer." + path + ".Editor.ConditionKeyDropDown");
      createState("Timer." + path + ".Editor.Condition");
      createState("Timer." + path + ".Editor.ConditionsNr");
      createState("Timer." + path + ".Editor.Condition1");
      createState("Timer." + path + ".Editor.Cond1State");
      createState("Timer." + path + ".Editor.Cond1Comp");
      createState("Timer." + path + ".Editor.Cond1Value");
      createState("Timer." + path + ".Editor.Cond1Result");
      createState("Timer." + path + ".Editor.Condition2");
      createState("Timer." + path + ".Editor.Cond2State");
      createState("Timer." + path + ".Editor.Cond2Comp");
      createState("Timer." + path + ".Editor.Cond2Value");
      createState("Timer." + path + ".Editor.Cond2Result");
      createState("Timer." + path + ".Editor.Condition3");
      createState("Timer." + path + ".Editor.Cond3State");
      createState("Timer." + path + ".Editor.Cond3Comp");
      createState("Timer." + path + ".Editor.Cond3Value");
      createState("Timer." + path + ".Editor.Cond3Result");
      

      Jeweils die Zeile mit "Result"

      Im Edit-View bei den Bedingungen als Hintergrundfarbe dann

      {w:javascript.0.Timer.Devices.Editor.Cond1Result; w == "true" ? "#00AA00" : "#AA0000"} 
      

      eintragen ("Cond1Result" entsprechend ändern)

      posted in Visualisierung
      H
      HelmutS
    • RE: Beta Test js-controller 3.0.x auf GitHub

      @apollon77
      Installiert sind js-controller 3.0.7 und tr-064 4.0.0.
      Läuft, danke

      posted in Tester
      H
      HelmutS
    • RE: Beta Test js-controller 3.0.x auf GitHub

      @foxriver76
      Ok, der Adapter läuft wieder mit aktivierten Anruflisten.

      posted in Tester
      H
      HelmutS
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo