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.
    • 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
                                  • H
                                    hardl @Codierknecht last edited by

                                    @codierknecht Nein, das Script ist neu und nichts dahinter.
                                    Alle DP habe ich nochmals geprüft.

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

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

                                      @codierknecht Nein, das Script ist neu und nichts dahinter.
                                      Alle DP habe ich nochmals geprüft.

                                      nein!
                                      bei aktualisiere fehlt die zu aktualisierende DP ID

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

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

                                        @codierknecht Nein, das Script ist neu und nichts dahinter.
                                        Alle DP habe ich nochmals geprüft.

                                        Schau doch mal in den JS-Code, wo da ein "Object ID" versteckt ist.
                                        Das muss ja irgendwoher kommen.

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

                                          @homoran Inzwischen habe ich gesehen, dass bei glatt 21 keine Punkte oder Kommas dargestellt werden.
                                          Du hast natürlich Recht......
                                          Ich habe das Object mit Ist-Diff ersetzt und der Fehler ist weg.

                                          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:

                                            Ich habe das Object mit Ist-Diff ersetzt und der Fehler ist weg.

                                            heisst?

                                            zeigen!

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            745
                                            Online

                                            32.0k
                                            Users

                                            80.5k
                                            Topics

                                            1.3m
                                            Posts

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