Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. Pylontech Akku mit Node-Red auslesen

    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

    UNSOLVED Pylontech Akku mit Node-Red auslesen

    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Garf @mickym last edited by

      @mickym sagte in Pylontech Akku mit Node-Red auslesen:

      Warum klappt das mit dem iobroker- Adapter nicht?

      Der klappt sicher ganz prima. Nur bei mir läuft kein iobroker mehr. Hatte ich mal auf der NAS in docker am Laufen. Aber ich mache einfach zu wenig mit iobroker. Und nur um die Werte auszulesen, weiß nicht.

      Der Flow sieht echt gut aus. Mit dem csv-Node umwandeln. Gute Idee. Ich schaue es mir mal an. Die Units brauche ich sicher nicht. Mir geht es um die Werte, diese richtig formatiert und visualisiert reicht mir schon. So wichtig sind die Werte am Ende auch nicht. Ist halt alles eine nette Spielerei.

      Danke schon mal, ich denke damit komme ich schon einmal zurecht.

      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @Garf last edited by mickym

        @garf Falls Du den SoC anstelle als String - als Zahl brauchst etc. kannst das ja dann easy mit einer Change Node umwandeln.

        G 1 Reply Last reply Reply Quote 0
        • G
          Garf @mickym last edited by

          @mickym

          Live sieht das Ergebnis so aus:

          162df072-95e6-49de-90ea-27974156e8dd-grafik.png

          48bad305-4075-4e86-bdf8-afd118d33a55-grafik.png

          7d919d18-41c4-4935-84ca-979750347d36-grafik.png

          mickym 1 Reply Last reply Reply Quote 0
          • mickym
            mickym Most Active @Garf last edited by

            @garf Keine Ahnung was Du machst - aber Du musst halt schon immer eine Zeile analysieren. Ich habs doch in dem Flow gemacht.

            G 1 Reply Last reply Reply Quote 0
            • G
              Garf @mickym last edited by

              @mickym
              Wenn ich deinen Flow richtig verstehe, dann verwendest Du das template Node um die komplette Textnachricht an das csv-Node zu übergeben. Darauf kann ich doch verzichten? Meine Textnachricht kommt ja direkt aus dem Serial-Interface.

              Starte ich deinen Beispielflow, dann sieht es so aus:

              d96a6354-5bab-4be6-b184-a99808d28d24-grafik.png

              0eed508a-d8bb-41c9-b9ac-dd02c5530359-grafik.png

              So wäre es perfekt. Irgend etwas ist an meiner zu deiner Textnachricht anders. Deshalb kommt es vermutlich zu diesen Fehlern in der Ausgabe

              mickym 1 Reply Last reply Reply Quote 0
              • mickym
                mickym Most Active @Garf last edited by

                @garf Genau - also Du musst halt schauen, was der Unterschied ist und was man ggf. ändern muss, dass es eben so wie in der template Node aussieht.

                G 1 Reply Last reply Reply Quote 0
                • G
                  Garf @mickym last edited by Garf

                  @mickym
                  Ich habe in deinem Template Node einmal die Originalnachricht hineinkopiert. Und schon ist der Fehler da.

                  Hier mal als Code

                  bat 1
                  
                  @
                  
                  
                  Battery  Volt     Curr     Tempr    Base State   Volt. State  Curr. State  Temp. State  SOC          Coulomb      BAL         
                  
                  
                  0        3472     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  1        3489     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  2        3472     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  3        3471     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  4        3487     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  5        3483     0        20300    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  6        3490     0        20300    Idle         Normal       Normal       Normal       100%         73999 mAH      N
                  
                  
                  

                  Ich vermute einmal die Vielzahl der Leerzeichen könnten dass Problem sein.

                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @Garf last edited by

                    @garf dann die leerzeichen entfernen

                    d97641b2-04c0-4085-a7a1-25708d360d93-image.png

                    [{"id":"b91974ec9eee2b32","type":"inject","z":"289f539dcc33814e","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":5200,"wires":[["8f840614a03ae184"]]},{"id":"8f840614a03ae184","type":"template","z":"289f539dcc33814e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"bat 1\n\n@\n\n\nBattery  Volt     Curr     Tempr    Base State   Volt. State  Curr. State  Temp. State  SOC          Coulomb      BAL         \n\n\n0        3472     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n\n1        3489     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n\n2        3472     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n\n3        3471     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n\n4        3487     0        20600    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n\n5        3483     0        20300    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n\n6        3490     0        20300    Idle         Normal       Normal       Normal       100%         73999 mAH      N\n\n","output":"str","x":260,"y":5200,"wires":[["525cc59f65e1adba","a18c91b3f1cbce85"]]},{"id":"525cc59f65e1adba","type":"debug","z":"289f539dcc33814e","name":"Simulate Input","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":460,"y":5140,"wires":[]},{"id":"644986050296f87f","type":"csv","z":"289f539dcc33814e","name":"","sep":" ","hdrin":false,"hdrout":"none","multi":"one","ret":"\\n","temp":"Battery,,Volt,Curr,Tempr,Base State,Volt. State,Curr. State,Temp. State,SOC,Coulomb, Unit,BAL","skip":"8","strings":true,"include_empty_strings":"","include_null_values":"","x":910,"y":5200,"wires":[["447205fa81b36ae8"]]},{"id":"447205fa81b36ae8","type":"debug","z":"289f539dcc33814e","name":"Objekte","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1080,"y":5200,"wires":[]},{"id":"a18c91b3f1cbce85","type":"split","z":"289f539dcc33814e","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":410,"y":5200,"wires":[["838eda0f01a264ce"]]},{"id":"838eda0f01a264ce","type":"change","z":"289f539dcc33814e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$trim(payload)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":5200,"wires":[["5588a5d1f23162bf"]]},{"id":"5588a5d1f23162bf","type":"join","z":"289f539dcc33814e","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":770,"y":5200,"wires":[["644986050296f87f"]]}]
                    

                    G 1 Reply Last reply Reply Quote 0
                    • G
                      Garf @mickym last edited by

                      @mickym
                      0Volt kann die Zelle aber nicht haben, dann wäre die Zelle defekt. Dann sind es wohl nicht nur die Leerzeichen. Wäre auch zu einfach gewesen.

                      mickym 1 Reply Last reply Reply Quote 0
                      • mickym
                        mickym Most Active @Garf last edited by mickym

                        @garf sagte in Pylontech Akku mit Node-Red auslesen:

                        @mickym
                        0Volt kann die Zelle aber nicht haben, dann wäre die Zelle defekt. Dann sind es wohl nicht nur die Leerzeichen. Wäre auch zu einfach gewesen.

                        Sorry war mein Fehler - da ist ein doppeltes Komma in der Spaltendefinition drin gewesen, dann mach das raus - dann sollte es gehen :
                        f76139cb-76a0-4c96-a949-6790e73a3c36-image.png
                        69e678ff-0edb-40e3-b92a-4e50c92f2ca0-image.png

                        fb95566d-b713-4ac0-affe-f34a4c7af99b-image.png

                        Durch das Komma, hatten sich die Spalten um eins verschoben.

                        G 2 Replies Last reply Reply Quote 1
                        • G
                          Garf @mickym last edited by

                          @mickym
                          Super. Ich schaue es mir nachher noch an. Wäre ja dann ne echt einfache Lösung. Man muss halt einfach nur einen Profi fragen.
                          Danke für deine Hilfe.

                          1 Reply Last reply Reply Quote 0
                          • G
                            Garf @mickym last edited by

                            @mickym sagte in Pylontech Akku mit Node-Red auslesen:

                            Durch das Komma, hatten sich die Spalten um eins verschoben.

                            Habe ich heraugenommen und nun sieht es fehlerfrei aus. Damit kann ich arbeiten. Mega und wie einfach gelöst.

                            Vielen Dank nochmals für deine Hilfe.

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            755
                            Online

                            31.8k
                            Users

                            79.9k
                            Topics

                            1.3m
                            Posts

                            node-red
                            2
                            14
                            788
                            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