Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Skipt-Änderungen: ccu.io - iobroker

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Skipt-Änderungen: ccu.io - iobroker

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

      Hallo hier mal die Änderungen, die ich machen musste beim Umstieg von ccu.io auf iobroker

      Vielleicht hilft es jemandem ohne viel Sucherei:

      // war: setObject(100000, { Name: "HomeZoneGeo", TypeName: "VARDP" , _persistent:true});

      createState("HomeZoneGeo", 0);

      hz = getState("HomeZoneGeo").val; // war hz = getState(100000);

      setState("HomeZoneGeo",hz); // setState(100000,hz);

      //subscribe({id: '100000' , change:"ne"}, function (data){codebox_4(data); });

      on({id: "HomeZoneGeo", change:"ne"}, function (data){codebox_4(data); });

      // oder für ein HM-Gerät

      on({id: 'hm-rpc.0.IEQ012345.1.STATE' , change:"ne"}, function (data){codebox_4(data); });

      // war (data.newState.value)

      var state = parseFloat(data.newState.val);

      var state = parseInt(obj.newState.val);

      var state = obj.newState.val;

      1 Reply Last reply Reply Quote 0
      • P
        pix last edited by

        Hallo Fugazzy,

        das hat mich auch ganz schön Zeit gekostet (70 Skripte).

        x = getState(y).

        x muss dann mit x.val abgefragt werden.

        Gruß

        Pix

        Gesendet von meinem iPhone mit Tapatalk

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

          Sehr hilfreich. Vielleicht muss man das in wiki aufnehmen.

          1 Reply Last reply Reply Quote 0
          • P
            pix last edited by

            @pix:

            Hallo Fugazzy,

            das hat mich auch ganz schön Zeit gekostet (70 Skripte).

            x = getState(y).

            x muss dann mit x.val abgefragt werden.

            Gruß

            Pix

            Gesendet von meinem iPhone mit Tapatalk `

            Da muss ich selbst noch nachfragen, da ich gerade von Bluefox http://forum.iobroker.net/viewtopic.php?f=21&t=749&sid=7430a7a1a1cf834ce9a3f2d8f60afe46&sid=7430a7a1a1cf834ce9a3f2d8f60afe46#p5483 gesehen habe.

            Methode I

            x = getState(y);  
            ````x muss dann mit x.val abgefragt werden.
            
            oder Methode II
            

            x = getState(y).val;

            
            Hat man im ersten Fall noch andere Informationen oder Datenpunkte/Kanäle/Timestamps/etc. von y in x und gehen die bei Methode zwei verloren?
            
            Gruß
            
            Pix
            1 Reply Last reply Reply Quote 0
            • Bluefox
              Bluefox last edited by

              https://github.com/ioBroker/ioBroker.ja … t#getstate

              ` > getState

              Returns state of id in form {val: value, ack: true/false, ts: timestamp, lc: lastchanged, from: origin} `

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

              Support us

              ioBroker
              Community Adapters
              Donate

              921
              Online

              31.7k
              Users

              79.7k
              Topics

              1.3m
              Posts

              3
              5
              1674
              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