Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Script problem bei abfrage von HM Systemvariablen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Script problem bei abfrage von HM Systemvariablen

    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      blueled last edited by

      Hallo zusammen,

      ich habe das Problem, das der script mir den status der HM-Systemvariablen immer mit "true" zurück gibt… obwohl ich im Reiter Objekte sehe das sie false sind. Was mache ich falsch ?

      on ({id: "hm-rega.0.7728" }, function (obj) {  /*TERASSE = motion2 */
      
      var today = new Date() ;
      var msgdate = formatDate(today, "TT.MM.JJJJ - SS:mm:ss") ; 
      
      // console.log(msgdate);
      
      var value = obj.state.val ;         // Status von motion2 ermitteln
      
      console.log("Terasse Value: "+value+" Timestamp:"+msgdate);
      
      if (value=== true) {
      
          setState("hm-rega.0.12369",msgdate);      // hm-rega systemvariable lc_motion2 Zeitstempel
      
          var zust = getObject("hm-rega.0.5778").val ;      // Systemvariable Fensteralarme abfragen
          var zustand = obj.state.val ;      
          console.log("Push-Meldungen: "+zustand);
      
          var zust1 = getObject("hm-rega.0.12271").val ;      // Systemvariable Sprachausgabe abfragen
          var zustand1 = obj.state.val ;      
          console.log("Sprachausgabe: "+zustand1);
      
        }
      });
      
      

      Vielen Dank schon mal im vorraus.

      1 Reply Last reply Reply Quote 0
      • paul53
        paul53 last edited by

        @blueled:

            var zust = getObject("hm-rega.0.5778").val ;      // Systemvariable Fensteralarme abfragen
            var zustand = obj.state.val ;     
        ```` `  
        

        –>

            var zustand = getState("hm-rega.0.5778").val ;      // Systemvariable Fensteralarme abfragen
        

        @blueled:

            var zust1 = getObject("hm-rega.0.12271").val ;      // Systemvariable Sprachausgabe abfragen
            var zustand1 = obj.state.val ;     
        ```` `  
        

        –>

            var zustand1 = getState("hm-rega.0.12271").val ;      // Systemvariable Sprachausgabe abfragen
        
        1 Reply Last reply Reply Quote 0
        • B
          blueled last edited by

          Hallo und Danke.

          So hatte ich es auch schon probiert…

          Die Konsolenausgabe schreibt dann: Sprachausgabe: undefined

          1 Reply Last reply Reply Quote 0
          • B
            blueled last edited by

            Hallo Paul53,

            es funktioniert.

            1000 Dank.

            ich war wohl schon zu müde um zu lesen. 🙂

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Support us

            ioBroker
            Community Adapters
            Donate

            1.0k
            Online

            31.7k
            Users

            79.8k
            Topics

            1.3m
            Posts

            2
            4
            587
            Loading More Posts
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes
            Reply
            • Reply as topic
            Log in to reply
            Community
            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
            The ioBroker Community 2014-2023
            logo