Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Skript reagiert nicht mehr auf Aktualisierung von Objekt

    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

    Skript reagiert nicht mehr auf Aktualisierung von Objekt

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @daniello last edited by paul53

      @daniello sagte: hab ich inzwsichen alles verbastelt?

      Wenn es nun doch "boolean" sein soll, ändere:

          "role": "switch",
          "type": "boolean",
          "read": true,
          "write": true,
          "states": {
              "false": "no",
              "true": "yes"
          },
          "desc": "Manuell erzeugt",
          "def": false,
      
      D 1 Reply Last reply Reply Quote 0
      • D
        daniello @paul53 last edited by

        @paul53

        Danke Paul .. hab ich gemacht .. wirft allerdings sofort wieder diese Warnung:

        Object 0_userdata.0.lg_firetv is invalid: obj.common.states has an invalid type! Expected "object", received "string" This will throw an error up from js-controller version 7.0.0!

        Macht mich Irre diese Meldung .. hatte vormals auf String gestellt war aber auch wieder falsch 😞

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

          @daniello sagte: Expected "object"

          Das kann nicht sein, wenn common.type = "boolean" ist.
          Woher kommt der String?

          @daniello sagte in Skript reagiert nicht mehr auf Aktualisierung von Objekt:

          hatte vormals auf String gestellt war aber auch wieder falsch

          Offenbar wird doch ein String geschrieben?

          EDIT: Die Meldung betrifft common.states

          D 1 Reply Last reply Reply Quote 0
          • D
            daniello @paul53 last edited by daniello

            @paul53

            Hab mal history angemacht für das Objekt:
            25ed6a14-d581-40d1-85cd-33b29094da08-grafik.png

            Wobei die Warnung von Admin kommt .. also wenn ich am Objekt ändere. Beschicken tut das Feld nur der iot Adapter.

            Kann es sein, das IOT ordentlich True/False sendet und der Admin das was wiederum beim Ändern des Objekts True und False als String interpretiert?

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

              @daniello schreibt der true/false oder 1/0 oder "true"/"false"?

              edit:
              oder gar
              @daniello sagte in Skript reagiert nicht mehr auf Aktualisierung von Objekt:

              "states": "false:no;true:yes",
              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @daniello last edited by paul53

                @daniello sagte: Wobei die Warnung von Admin kommt

                Die Warnung erzeugt der js-controller.

                @daniello sagte in Skript reagiert nicht mehr auf Aktualisierung von Objekt:

                Kann es sein, das IOT ordentlich True/False sendet und der Admin das was wiederum beim Ändern des Objekts True und False als String interpretiert?

                Nein, es kann sein dass IOT "false" und "true" (als String) sendet? Ich kenne IOT nicht.
                Es lässt sich leicht prüfen:

                Blockly_temp.JPG

                D 1 Reply Last reply Reply Quote 0
                • D
                  daniello @paul53 last edited by

                  @paul53

                  Danke, gibt "boolean" aus.

                  @Homoran

                  Ist die Idee von
                  "states": "false:no;true:yes",
                  zu ändern in
                  "states": "false:false;true:true",
                  ?

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

                    @daniello sagte in Skript reagiert nicht mehr auf Aktualisierung von Objekt:

                    Ist die Idee

                    nein, ich will nur wissen was da ankommt.

                    @daniello sagte in Skript reagiert nicht mehr auf Aktualisierung von Objekt:

                    gibt "boolean" aus.

                    das dürfte dann nicht als String interpretiert werden.

                    @daniello sagte in Skript reagiert nicht mehr auf Aktualisierung von Objekt:

                    Hab mal history angemacht für das Objekt:

                    auch loggen von Quelle aktiviert?
                    kommt da von verschiedenen Quellen ein Wert?

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

                      @daniello sagte: obj.common.states has an invalid type! Expected "object"

                      Lösche "states" oder mache es richtig wie hier gezeigt (Zeilen 5 bis 8).

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        daniello @paul53 last edited by daniello

                        @paul53

                        danke .. Objekt scheint jetzt ok zu sein

                        @Homoran

                        "Quelle aktivieren" finde ich nicht .. aber es kommt nur was von iot.0

                        Input schalten funktioniert weiterhin auch per Skript. Launch app funktioniert weiterhin nur in den Objekten.
                        Für mein Seelenfrieden genügt die Umschaltung über Input .. aber technisch sollte auch das andere funktionieren.

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        594
                        Online

                        31.8k
                        Users

                        79.9k
                        Topics

                        1.3m
                        Posts

                        3
                        26
                        216
                        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