Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. VIS 1.2.10 Problem mit Bindings

    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 VIS 1.2.10 Problem mit Bindings

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

      @harrym

      hat schon jmd bei @Bluefox nachgefragt? steht bei github drin bzw eine issue auf github aufgemacht ?

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

        @liv-in-sky hat nix mit bluefox und seinen css klassen/ js zu tun. da hängt es woanders.

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

          @harrym da kann ich leider nix mehr beitragen
          hast du mal die anführungszeichen bei true von deinem beispiel eintfernt und getestet ?

          bei mir:

          • vis 1.2.10
          • jscript: 4.6.26
          • web 3.0.12
          • socket 3.0.13
          harrym 1 Reply Last reply Reply Quote 0
          • harrym
            harrym @liv-in-sky last edited by

            @liv-in-sky alles schon getestet. hab ja schon erfahrung gesammelt mim broker und co 😉

            Scrounger 1 Reply Last reply Reply Quote 0
            • Scrounger
              Scrounger Developer @harrym last edited by

              @harrym
              Funktioniert bei mir auch:

              {val:0_userdata.0.MDW.Buttons.bool; val == true ? "ja" : "nein"}
              

              tmp.gif

              Steff 1 Reply Last reply Reply Quote 0
              • Steff
                Steff @Scrounger last edited by Steff

                Hmm...,
                heute nochmal probiert und siehe da es geht 😕, die V1.2.11 läuft nun bei mir.
                Offensichtlich verhält sich VIS > V1.2.9 etwas anders als sonst. Ich hatte meine Bindings immer nach diesem Schema angelegt

                {wert:javascript.0.Gartenteich.Teichpumpe_Hand;wert == "true" ? "#008000" : "#44739e"}
                

                und das hat so funktioniert - bis zur V1.2.10. Ich musste nun an allen Bindings die beiden "" um das true entfernen, d.h. so funktioniert es nun bei mir:

                {wert:javascript.0.Gartenteich.Teichpumpe_Hand;wert == true ? "#008000" : "#44739e"}
                
                SBorg 1 Reply Last reply Reply Quote 0
                • SBorg
                  SBorg Forum Testing Most Active @Steff last edited by

                  @Steff Das war dann einfach dem Umstand geschuldet, dass die DPs als String gelesen wurden. Dann wäre/ist wert == "true" korrekt, da "" die Variable als String definieren.
                  Ohne jetzt im Quellcode der 11er nachgeschaut zu haben, vermute ich mal, dass mit der Unterstützung von JSON in den Bindings diese Vorgehensweise geändert werden musste. Nun ist ein boolean tatsächlich boolean und nicht mehr String. Dann muss es aber wert == true heißen, damit 'true' auch wirklich als boolean behandelt/verglichen wird...

                  harrym 1 Reply Last reply Reply Quote 2
                  • arteck
                    arteck Developer Most Active last edited by arteck

                    @Steff sagte in VIS 1.2.10 Problem mit Bindings:

                    {wert:javascript.0.Gartenteich.Teichpumpe_Hand;wert == true ? "#008000" : "#44739e"}

                    und zusätzlich uffpassn

                    wert == true
                    

                    ist nicht gleich

                    wert === true
                    

                    das erste wandelt die beiden Werte in gleiche Typen
                    das 2 te ist streng Typisiert

                    560db0f8-4f5b-4dbf-8750-bf90f5b3d364-grafik.png

                    Steff 1 Reply Last reply Reply Quote 2
                    • harrym
                      harrym @SBorg last edited by

                      @SBorg sagte in VIS 1.2.10 Problem mit Bindings:

                      dass mit der Unterstützung von JSON in den Bindings diese Vorgehensweise geändert werden musste.

                      JA. Genau das war es!

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        Knoddel @harrym last edited by

                        Hab es gerade auch nochmal probiert, ohne " funktioniert wieder alles.
                        Danke an alle die geholfen haben das Problem zu finden/lösen.

                        1 Reply Last reply Reply Quote 0
                        • Steff
                          Steff @arteck last edited by

                          Danke @arteck und @SBorg für eure Erklärungen.

                          Klar ich habe mir das mit dem Binding und den beiden "" irgendwann mal hier aus dem Forum zusammenkopiert und es hat halt funktioniert. Aber so im Nachgang betrachtet war es falsch - es ist ein boolescher Vergleich, da sind die "" fehl am Platz.

                          Danke nochmals und Gruß
                          Steffen

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

                            ...jawollo.... das mit den " war's!!

                            {val:chromecast.0.ccAudioWohnzimmer.status.playing; val === true ? "#00DE00" : "#FFFFFF"}
                            

                            ...funktioniert nun - ich bin ebenfalls gleich auf die 1.2.11 hoch.

                            Spitze, danke für eure Inputs und Tests!

                            Liebe Grüße
                            Tom

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

                              ...aber wenn jetzt schon alle mitten drinnen sind.....

                              ....warum geht DAS nicht?

                              {val:chromecast.0.ccAudioWohnzimmer.player.url2play; val == "http://mp3stream7.apasf.apa.at/;stream.nsv" ? "#00DE00": "#000000"}
                              

                              der Rahmen ist immer weiß = mein Standard = er erkennt das Binding nicht.

                              kann es an dem Strichpunkt in der URL liegen oder übersehe ich da was anderes?

                              Liebe Grüße
                              Tom

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

                                @etv sagte in VIS 1.2.10 Problem mit Bindings:

                                {val:chromecast.0.ccAudioWohnzimmer.player.url2play; val == "http://mp3stream7.apasf.apa.at/;stream.nsv" ? "#00DE00": "#000000"}

                                liegt an dem strichpunkt - ohne gehts

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

                                  @liv-in-sky , danke...jo blöd - der Link ist amal so.....

                                  Liebe Grüße
                                  Tom

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

                                    @etv

                                    wollte es mit replace probieren - funktioniert irgendwie nicht mehr - ich glaube, da ist ein bug drin

                                    was aber funktioniert:

                                    smart78.gif

                                    {val:controll-own.0.AAATEST.TestString1;  val=val.substring(0,31)+val.substring(32,val.length) == "http://mp3stream7.apasf.apa.at/stream.nsv" ? "green": "red"}
                                    

                                    mit bug im replace meine ich: es ist mir nicht gelungen das";" zu escapen - auch nicht mit regex

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

                                      @liv-in-sky perfekt, danke dir!!! werd' ich gleich einbauen...

                                      Liebe Grüße
                                      Tom

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

                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      445
                                      Online

                                      31.9k
                                      Users

                                      80.1k
                                      Topics

                                      1.3m
                                      Posts

                                      vis binding
                                      10
                                      32
                                      1600
                                      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