Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Selbst erstellter Datenpunkt, Problem <0 [gelöst]

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Selbst erstellter Datenpunkt, Problem <0 [gelöst]

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

      Ich habe einen Datenpunkt erstellt: Ist-Diff
      Im Blockly soll die Differenztemperatur errechnet werden und in Ist-Diff übernommen werden.
      Das funktioniert im Bereich > 0 einwandfrei, wenn allerdings -0,1 errechnet wird, hängt die Berechnung, auch wenn es wieder positive Ergebnisse gibt.
      Wo liegt der Fehler?Bildschirm­foto 2023-01-19 um 17.25.49.png Bildschirm­foto 2023-01-19 um 17.22.15.png

      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @hardl last edited by

        @hardl sagte in Selbst erstellter Datenpunkt, Problem <0:

        Wo liegt der Fehler?

        was sagt denn das debug log dazu?
        oder der Output eines debug Bausteins?

        Sind beide Datenpunkte vom Typ number?

        paul53 1 Reply Last reply Reply Quote 1
        • paul53
          paul53 @Homoran last edited by

          @homoran sagte: Sind beide Datenpunkte vom Typ number?

          ... und enthalten im Wert eine Zahl?

          Homoran 1 Reply Last reply Reply Quote 1
          • Homoran
            Homoran Global Moderator Administrators @paul53 last edited by

            @paul53 Danke für die Ergänzung!
            Das war/ist tatsächlich der Hintergrund und der wichtigere Punkt

            H 1 Reply Last reply Reply Quote 0
            • H
              hardl @Homoran last edited by

              @homoran debug log habe ich noch nicht gemacht.
              Alle 3 Datenpunkte sind numerisch und die Eingangswerte sind Zahlen mit 1 Nachkommastelle.

              Kann mich allerdings erst morgen mal einlesen wie das mit dem debug geht.

              paul53 Homoran 2 Replies Last reply Reply Quote 0
              • paul53
                paul53 @hardl last edited by

                @hardl sagte: wie das mit dem debug geht.

                Bild_2023-01-19_182512275.png

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

                  @paul53 Danke für die Hilfe, ich bin gerade unterwegs und werde das morgen machen.
                  Ich hatte schon eingebaut, dass <= 0 keine Aktualisierung des Datenpunkts erfolgen soll, dann war das Problem weg, aber das ist nicht die Lösung.

                  1 Reply Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @hardl last edited by

                    @hardl sagte in Selbst erstellter Datenpunkt, Problem <0:

                    die Eingangswerte sind Zahlen mit 1 Nachkommastelle.

                    das könnte aber auch ein String mit Ziffern sein

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      hardl @Homoran last edited by

                      @homoran Im ioBroker-> Objekte wird es als numerisch angezeigt und im +Bereich wird auch richtig damit gerechnet.

                      Homoran 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @hardl last edited by Homoran

                        @hardl sagte in Selbst erstellter Datenpunkt, Problem <0:

                        Im ioBroker-> Objekte wird es als numerisch angezeigt

                        In den Objektdaten? type=Number?

                        das heisst aber nicht, dass die "Zahl", die dort hereingeschrieben wird, wirklich eine Zahl ist.

                        Deswegen sind wir alle auf die Ausgabe der debugs aus dem Blockly gespannt.

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          hardl @Homoran last edited by

                          @homoran So, jetzt habe ich das getestet.
                          Es sieht so aus, als ob alle "numerisch sind, allerdings was ist der Fehler in 6:3 ?
                          Wie sehe ich eine Nummerierung der Zeile?
                          Bildschirm­foto 2023-01-20 um 10.04.31.png

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

                            sehe ich da ein komma beim val wert ? - das ist keine zahl in javascript

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

                              @liv-in-sky Ja, alle Werte in den Datenpunkten der Objekte sind mit Komma.

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

                                @hardl zahlen nur mit punkt in javascript

                                daher muss zuerst das komma in einen punkt verwandelt werden und dann das ganze wieder in eine zahl

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

                                  @liv-in-sky Komischerweise kommt in den Protokollen das Komma nur bei glatten Werten mit ",0", bei ,1-9 wird ein Punkt dargestellt.
                                  Welcher "state" wird nicht gefunden?
                                  Bildschirm­foto 2023-01-20 um 10.59.08.png

                                  Homoran Codierknecht 3 Replies Last reply Reply Quote 0
                                  • Homoran
                                    Homoran Global Moderator Administrators @hardl last edited by

                                    @hardl bitte keine Screenshots! als Text in code-tags posten!

                                    1 Reply Last reply Reply Quote 0
                                    • Codierknecht
                                      Codierknecht Developer Most Active @hardl last edited by Codierknecht

                                      @hardl sagte in Selbst erstellter Datenpunkt, Problem <0:

                                      Welcher "state" wird nicht gefunden?

                                      Hast Du irgendwo (hinter den anderen) vielleicht noch einen verwaisten Block rumdümpeln?
                                      Oder hast Du vergessen, in einem Block das "Object ID" durch einen echten DP zu ersetzen?

                                      H 1 Reply Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @hardl last edited by

                                        @hardl sagte in Selbst erstellter Datenpunkt, Problem <0:

                                        Komischerweise kommt in den Protokollen das Komma nur bei glatten Werten mit ",0", bei ,1-9 wird ein Punkt dargestellt.

                                        wenn ich es richtig entziffern kann ist das Komma kein Dezimaltrenner, sondern als Abschluss aller Werte vorhanden

                                        H 1 Reply Last reply Reply Quote 0
                                        • H
                                          hardl @Homoran last edited by

                                          @homoran sorry,

                                          
                                          javascript.0
                                          2023-01-20 11:31:36.766	warn	at processImmediate (node:internal/timers:466:21)
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.765	warn	at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.js:5916:56)
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.765	warn	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:593:29)
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.765	warn	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1244:38)
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.765	warn	at Object.<anonymous> (script.js.Poolsteuerung.Debug_Diff:6:3)
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.765	warn	at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1719:20)
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.764	warn	State "Object ID" not found
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.764	info	script.js.Poolsteuerung.Debug_Diff: getState(id=mqtt.0.ESP_Easy.Solarsensor.temperature, timerId=undefined) => {"val":20.6,"ack":true,"ts":1674210696758,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1674210696758}
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.763	info	script.js.Poolsteuerung.Debug_Diff: number
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.763	info	script.js.Poolsteuerung.Debug_Diff: getState(id=mqtt.0.ESP_Easy.Poolsensor.temperature, timerId=undefined) => {"val":21.1,"ack":true,"ts":1674210695846,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1674210472569}
                                          
                                          javascript.0
                                          2023-01-20 11:31:36.763	info	script.js.Poolsteuerung.Debug_Diff: number
                                          
                                          Homoran 1 Reply Last reply Reply Quote 0
                                          • Homoran
                                            Homoran Global Moderator Administrators @hardl last edited by

                                            @hardl

                                            geht es um diese Kommas?
                                            Screenshot_20230120-114449_Firefox.jpg

                                            Die gehören nicht zur Zahl.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            615
                                            Online

                                            32.0k
                                            Users

                                            80.5k
                                            Topics

                                            1.3m
                                            Posts

                                            blockly
                                            5
                                            53
                                            2322
                                            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