Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Variable :100 teilen

    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

    Variable :100 teilen

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

      Hallo
      Ich habe folgendes Skript, bei dem ich die Variable ("modbus.2.holdingRegisters.48196_power_total") :100 teilen müsste, bevor sie in die Homematic Variable geschrieben wird.
      Kann mir jemand hier helfen, ob das einfach in das Skript integrierbar ist?

      //Schreibe WErte von Smart-me Zähler Pool-UV in CCU Variablen
      
      // Leistung aller 3 Phasen in Variable auf CCU schreiben
      var idvar2 = "modbus.2.holdingRegisters.48196_power_total";/*power total von modbus.2*/
      var idSmartme_Pool_UV_Leistung_aktuell= "hm-rega.0.14026";/*Schreibe in HM Variable Smartme_Pool_UV_Leistung_aktuell*/
      on(idvar2, idSmartme_Pool_UV_Leistung_aktuell); // Synchronisierung
      

      Danke & Gruss
      Ritschi

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

        @Ritschi sagte:

        :100 teilen müsste, bevor sie in die Homematic Variable geschrieben wird.

        on(idvar2, function(dp) {
           setState(idSmartme_Pool_UV_Leistung_aktuell, dp.state.val / 100);
        });
        
        R 1 Reply Last reply Reply Quote 0
        • R
          Ritschi @paul53 last edited by

          @paul53 Super, danke hat funktioniert.
          Gruss
          Ritschi

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

          Support us

          ioBroker
          Community Adapters
          Donate

          926
          Online

          31.8k
          Users

          80.0k
          Topics

          1.3m
          Posts

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