Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Tr-064 Gerätezustand bei Änderung in CCU Variable schreiben

    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

    Tr-064 Gerätezustand bei Änderung in CCU Variable schreiben

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

      Hallo,

      ich möchte gerne, das wenn sich ein Gerät im Wlan anmeldet, sich der Homematik Variable auf anwesend oder abwesend ändert.

      Variable sind angelegt.
      Das Skript stammt von Geofency mit dem das wunderbar funktioniert.

      on('tr-064.0.devices.iPhonevonOma.active', function(obj) {
          log('Neuer Wlanzustand Oma ' + obj.state.val);
          if (obj.state.val == "true") {
             setState('hm-rega.0.18497', true);
             event("Oma ist da");
          } else {
             setState('hm-rega.0.18497', false);{
              event("Oma ist los");
                 
             }
          }
      })
      

      klappt leider irgendwie nicht.
      Kann mir jemand sagen wo der Fehler ist?

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

        @jensus11 sagte: Kann mir jemand sagen wo der Fehler ist?

        Ändere Zeile 3 in

            if (obj.state.val) {
        
        J 1 Reply Last reply Reply Quote 0
        • J
          jensus11 @paul53 last edited by

          @paul53

          Danke, funzt jetzt. 👍🏻

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

          Support us

          ioBroker
          Community Adapters
          Donate

          868
          Online

          31.8k
          Users

          80.0k
          Topics

          1.3m
          Posts

          2
          3
          109
          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