Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [gelöst] Wert in CCU SV 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

    [gelöst] Wert in CCU SV schreiben

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

      Hallo zusammen

      Habe ein kleines Skript welches einen Wert von ioBroker in eine Servicevariable der CCU schreibt, welches auch funktioniert.

      const idQuelle = "rpi2.0.temperature.soc_temp",
      idZiel = "hm-rega.0.3706"; // anpassen oder mit ID Einfügen ausfüllen
      
      on(idQuelle, idZiel);
      

      Leider erhalte ich immer eine Warnung…
      > javascript.0 2018-12-01 14:56:13.511 warn Wrong type of hm-rega.0.3706: "string". Please fix, while deprecated and will not work in next versions.

      Was mache ich falsch?

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

        Der Datentyp des SV States ist ein anderer als was was du reinschreibst.

        Du schreibst einen String da rein und er ist keiner tippe ich.

        Gesendet vom Handy …

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

          Danke für den Tipp, dDas kann sein, bin da nicht so der Beste in Skriptsprache.

          Der Datenpunkt ist 3895_1.jpg
          und die SV vom Typ Zahl.

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

            Vorschlag:

            const idQuelle = "rpi2.0.temperature.soc_temp",
            idZiel = "hm-rega.0.3706"; // anpassen oder mit ID Einfügen ausfüllen
            
            on(idQuelle, function(dp) {
               setState(idZiel, parseFloat(dp.state.val));
            });
            
            1 Reply Last reply Reply Quote 0
            • hanan
              hanan last edited by

              Hallo paul53

              Danke, hat geklappt.

              Schönen Advent-Sonntag

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

              Support us

              ioBroker
              Community Adapters
              Donate

              723
              Online

              31.7k
              Users

              79.9k
              Topics

              1.3m
              Posts

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