Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [gelöst] - Anzeige Kommastelle

    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] - Anzeige Kommastelle

    This topic has been deleted. Only users with topic management privileges can see it.
    • liv-in-sky
      liv-in-sky @Uli977 last edited by

      @uli977 haben WIR gerne gemacht

      Uli977 2 Replies Last reply Reply Quote 2
      • Uli977
        Uli977 @liv-in-sky last edited by

        @liv-in-sky Du 🙂

        R 1 Reply Last reply Reply Quote 0
        • R
          RMortan @Uli977 last edited by

          @uli977 Hallo

          Darf ich mal fragen wo du die Bilder her hast bzw. Wie du es umgesetzt hast das deine PV Anlage so angezeigt wird.

          Danke schon mal...

          Lg

          Uli977 1 Reply Last reply Reply Quote 0
          • Uli977
            Uli977 @RMortan last edited by Uli977

            @rmortan

            Ich habe mir dieses Beitrag angesehen und mir das ZIP File vom Beitrag von ak1 vom 06.10.2020 heruntergeladen und die Files (Widget und Bilder) importiert und damit weitergearbeitet.

            https://forum.iobroker.net/topic/16169/iobroker-anbindung-an-einen-kostal-plenticore/636

            7a184ab8-04a1-4b45-9930-90b3cd08e836-2021-09-30 13.28.54.jpeg

            Nutze dafür den Easee Wallbox Adapter und den Kostal Plenticore Adapter, sowie ein Skript zur Steuerung für das Überschussladen.

            Viele Grüße!

            1 Reply Last reply Reply Quote 0
            • Uli977
              Uli977 @liv-in-sky last edited by Uli977

              @liv-in-sky Kannst du mir nochmal helfen?

              Ich muss hier noch den Wert eines zweiten Wechselrichters addieren, bekomme es aber nicht hin.

              {val:plenticore.0.devices.local.Pv_P;val<1000?Math.round(val):parseFloat(val*0.001).toFixed(1)}

              cc9e6c05-a03e-4f01-85b7-899049f7b771-2021-10-09 11.08.43.jpeg

              Danke dir!

              liv-in-sky 1 Reply Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @Uli977 last edited by liv-in-sky

                @uli977 sagte in [gelöst] - Anzeige Kommastelle:

                {val:plenticore.0.devices.local.Pv_P;val<1000?Math.round(val):parseFloat(val*0.001).toFixed(1)}

                bei mir funktioniert es so, wenn der datenpunkt eine zahl ist - ist das wieder ein string oder etwas mit komma ?

                {val:plenticore.0.devices.local.Pv_P; val<1000 ? Math.round(val) : (val*0.001).toFixed(1) }
                {val:plenticore.0.devices.local.Pv_P; val<1000 ? "W" : "kW"}
                
                

                wenn das wieder so ein komma string ist, dann.

                {val:plenticore.0.devices.local.Pv_P; val2=parseFloat(val.replace(',','.')); val2<1000 ? Math.round(val2 * 100) / 100 : Math.round(val2 * 0.001* 10) / 10 }
                {val:plenticore.0.devices.local.Pv_P; parseFloat(val.replace(',','.'))<1000 ? "W" : "kW"}
                
                
                
                Uli977 1 Reply Last reply Reply Quote 0
                • Uli977
                  Uli977 @liv-in-sky last edited by

                  @liv-in-sky

                  plenticore.0.devices.local.Pv_P
                  plenticore.1.devices.local.Pv_P

                  Diese beiden Werte müsste ich addieren und es sind Zahlen.

                  Wie sähe es aus wenn es Komma string sind?

                  Ich bekomme es nicht hin... Sorry!

                  Kannst du mir nochmal helfen?

                  1000 Dank!

                  Viele Grüße aus Mettmann!

                  liv-in-sky 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @Uli977 last edited by

                    @uli977

                    wenn es eine zahl ist und addiert werden soll

                    probiermal mal

                    {wert2:plenticore.0.devices.local.Pv_P; wert1:plenticore.1.devices.local.Pv_P;  wertAll= Number(wert1) + Number(wert2); wertAll<1000 ? Math.round(wertAll) : (wertAll*0.001).toFixed(1) }
                    {wert2:plenticore.0.devices.local.Pv_P; wert1:plenticore.1.devices.local.Pv_P;  wertAll= Number(wert1) + Number(wert2); wertAll<1000 ? "W" : "kW"}
                    
                    Uli977 1 Reply Last reply Reply Quote 0
                    • Uli977
                      Uli977 @liv-in-sky last edited by

                      @liv-in-sky Das mit der Zahl hat schoinmal geklappt! Super, danke!

                      Und wenn es jetzt ein KommaString ist welcher addiert werden soll?
                      Ist es dann so korrekt?

                      {val: plenticore.0.devices.local.Home_P; val2=plenticore.1.devices.local.Home_P (val.replace(',','.')); val2<1000 ? Math.round(val2 * 100) / 100 : Math.round(val2 * 0.001* 10) / 10 }
                      {val: plenticore.0.devices.local.Home_P; plenticore.1.devices.local.Home_P (val.replace(',','.'))<1000 ? "W" : "kW"}
                      

                      Der zweite Wert kann aber auch Null sein, funktioniert es dann auch?

                      liv-in-sky 2 Replies Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @Uli977 last edited by

                        @uli977

                        leider nei - da muss:

                        parseFloat(vali.replace(',','.'));
                        

                        raeplace ändert den string von komma zu punkt - das ganze wird dann mit parseFloat() in eine zahl verwandelt- erst dann kannst du nach größer kleier abfragen

                        das mit null wird bei mir nicht angezeigt - da ist ein fehler - muss mal überlegen, ob ich das abfangen kann - das null bedeutet, das der wert null ist oder das der wert nicht abrufbar ist ? evtl muss das über eine eigenes blockly abgefangen werden un in einen extra dp geschrieben werden

                        1 Reply Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky @Uli977 last edited by

                          @uli977

                          um das null mit benutzen zu können hilft die zwischenabfrage

                          {wert2:0_userdata.0.CONTROL-OWN.AAATEST.aObject; wert1:0_userdata.0.CONTROL-OWN.TestZahlNull; wert1==null ? 0 : wert1;  wertAll= Number(wert1) + Number(wert2); wertAll<1000 ? Math.round(wertAll) : (wertAll*0.001).toFixed(1) }
                          

                          speziell der teil:

                           wert1==null ? 0 : wert1;  
                          

                          wenn da wieder ein komma -string drinsteht mußt du

                           wert1==null ? "0" : wert1;  
                          

                          das muss direkt hinter die variable-definition
                          z.B.

                          {val: plenticore.0.devices.local.Home_P;  val2=plenticore.1.devices.local.Home_P; val2==null ? "0" : val2; valadd=parseFloat(val2.replace(',','.'))+val; valadd<1000 ? Math.round(valadd* 100) / 100 : Math.round(valadd* 0.001* 10) / 10 }
                          
                          {val: plenticore.0.devices.local.Home_P; val2: plenticore.1.devices.local.Home_P; val2==null ? "0" : val2; valadd=parseFloat(val2.replace(',','.'))+val; valadd<1000 ? "W" : "kW"}
                          
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate
                          FAQ Cloud / IOT
                          HowTo: Node.js-Update
                          HowTo: Backup/Restore
                          Downloads
                          BLOG

                          406
                          Online

                          31.9k
                          Users

                          80.3k
                          Topics

                          1.3m
                          Posts

                          3
                          16
                          712
                          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