Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Hilfe für Nachkommastellen

    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

    Hilfe für Nachkommastellen

    This topic has been deleted. Only users with topic management privileges can see it.
    • sigi234
      sigi234 Forum Testing Most Active last edited by

      Wie kann ich das auf 0 Nachkommastellen ändern?

      2858_screenshot__1296__li.jpg

      2858_screenshot__1295_.png

      [
          {
              "id": "dafa224e.cd323",
              "type": "Memory",
              "z": "e3a6205a.2fabe",
              "name": "",
              "x": 340,
              "y": 240,
              "wires": [
                  [
                      "98787022.374fb"
                  ]
              ]
          },
          {
              "id": "98787022.374fb",
              "type": "change",
              "z": "e3a6205a.2fabe",
              "name": "totalmem",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "payload.totalmem",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 720,
              "y": 240,
              "wires": [
                  [
                      "1e85db4e.dbe685"
                  ]
              ]
          },
          {
              "id": "1e85db4e.dbe685",
              "type": "function",
              "z": "e3a6205a.2fabe",
              "name": "Totalmem in GB",
              "func": "var totalmem = (parseInt(msg.payload))/1000000000;\n//var totalmen = totalmemgb/1000000000;\nmsg.payload = totalmem;\nreturn msg;\n",
              "outputs": 1,
              "noerr": 0,
              "x": 900,
              "y": 240,
              "wires": [
                  [
                      "d99e7c70.67ceb"
                  ]
              ]
          },
          {
              "id": "d99e7c70.67ceb",
              "type": "ui_text",
              "z": "e3a6205a.2fabe",
              "group": "d337825b.0c0f6",
              "order": 0,
              "width": 0,
              "height": 0,
              "name": "Totalmem",
              "label": "Totalmem :",
              "format": "{{msg.payload}} GB",
              "layout": "row-spread",
              "x": 1100,
              "y": 240,
              "wires": []
          },
          {
              "id": "d337825b.0c0f6",
              "type": "ui_group",
              "z": "",
              "name": "System",
              "tab": "71264ddd.7a9174",
              "order": 1,
              "disp": true,
              "width": "6",
              "collapse": false
          },
          {
              "id": "71264ddd.7a9174",
              "type": "ui_tab",
              "z": "",
              "name": "Windows",
              "icon": "dashboard",
              "order": 8
          }
      ]
      
      1 Reply Last reply Reply Quote 0
      • R
        rewenode last edited by

        var x = "1234567";
        console.log(parseInt(x));  //1234567
        console.log(parseInt(x)/1000000); //1.234567
        console.log(parseInt(x/1000000)); //1
        

        Setz deine Klammer entsprechend

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

          @sigi234:

          Wie kann ich das auf 0 Nachkommastellen ändern? `
          Mit

          x = Math.round(x);
          
          1 Reply Last reply Reply Quote 0
          • sigi234
            sigi234 Forum Testing Most Active last edited by

            Danke, wohin muss ich das setzen?

            Oh Mann, Red Node ist nicht so einfach….......

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

              @sigi234:

              wohin muss ich das setzen? `
              Von Node-Red habe ich keine Ahnung. Vermutlich so ?

              var totalmem = Math.round(parseInt(msg.payload) / 1000000000);
              
              1 Reply Last reply Reply Quote 0
              • R
                rewenode last edited by

                Besser so, wenn es klappen soll:

                var totalmem = Math.round(msg.payload/1000000);
                
                
                1 Reply Last reply Reply Quote 0
                • sigi234
                  sigi234 Forum Testing Most Active last edited by

                  @paul53:

                  Von Node-Red habe ich keine Ahnung. Vermutlich so ? `

                  Ja, aber ich lese und teste viel und schau Videos, aber ein bisschen was kommt da schon heraus.

                  Manchmal stehe ich einfach auf der Leitung.

                  2858_screenshot__1305_.png

                  2858_screenshot__1304_.png

                  2858_screenshot__1306_.png

                  1 Reply Last reply Reply Quote 0
                  • R
                    rewenode last edited by

                    Sieht doch klasse aus!!!

                    1 Reply Last reply Reply Quote 0
                    • A
                      alexalex last edited by

                      Mal was anderes, was nutzt du denn als Wetterstation? 🙂

                      Gesendet von meinem Redmi 5 Plus mit Tapatalk

                      1 Reply Last reply Reply Quote 0
                      • sigi234
                        sigi234 Forum Testing Most Active last edited by

                        openweathermap

                        1 Reply Last reply Reply Quote 0
                        • E
                          erastephan last edited by

                          sieht sehr gut aus.

                          habe so etwas ähnliches als poolsteuerung am laufen.

                          was mich brennend interessiert ist: wie hast du das mit den temperaturen in verschieden zimmer gelöst.

                          ich meine bei meiner steuerung ist ein ds18b20 angeschlossen

                          der in der leitung vom schwimmbad sitzt.

                          nun ich gehe nicht davon aus das du in jedes zimmer

                          ein kabel verlegt hast um die temperatur zu messen.

                          mfg

                          steph

                          1 Reply Last reply Reply Quote 0
                          • sigi234
                            sigi234 Forum Testing Most Active last edited by

                            Was meinst du?

                            Die Temp sind einmal vom Wetter Adapter, dann von Hue, und von Homematic.

                            1 Reply Last reply Reply Quote 0
                            • E
                              erastephan last edited by

                              ich meinte welche sensoren das sind die die temperatur von den räumen liefern.

                              habe schon viel gegooglet aber nun bin ich mehr verwirrt als zuvor.

                              ist das ein hue gerät das mit batterie in den raum gestellt wird

                              und dann per wlan die daten ans node sendet?

                              oder eventuell ein raumthermostat das mit wifi funktioniert?

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              648
                              Online

                              31.9k
                              Users

                              80.1k
                              Topics

                              1.3m
                              Posts

                              5
                              13
                              2768
                              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