Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. IDs vom Selektor

    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

    IDs vom Selektor

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

      @psyganja
      functions=frei

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

        @paul53
        Ups übersehen, geändert. Funktioniert trotzdem noch nicht.
        So funktioniert es, aber das ist ja keine schöne Art.
        Bildschirmfoto vom 2022-11-01 15-13-58.png

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

          @psyganja sagte: Funktioniert trotzdem noch nicht.

          Versuche es mal so:

          Bild_2022-11-01_154111231.png

          1 Reply Last reply Reply Quote 1
          • DJMarc75
            DJMarc75 @PsyGanja last edited by DJMarc75

            @psyganja

            state[id=*(functions=frei)]
            

            Die eckige Klammer ist in Deinem Blockly falsch gesetzt.

            So ists richtiger:

            state[id=*](functions=frei)
            
            1 Reply Last reply Reply Quote 1
            • P
              PsyGanja last edited by

              @djmarc75
              Oh man so oft nicht gesehen den Fehler 😵
              vielen Dank. Jetzt funktioniert es.
              Jetzt muss ich es nur noch erweitern.

              P DJMarc75 2 Replies Last reply Reply Quote 0
              • P
                PsyGanja @PsyGanja last edited by PsyGanja

                Vielleicht habt ihr ja einen Tipp. Jetzt bekomme ich mit dem blocky diese Ausgabe,

                
                1.11.2022, 15:53:12.229	[warn ]: javascript.0 (367) script.js.common.Steuerung.robot_Reinigungstimer: frei
                1.11.2022, 15:53:12.229	[warn ]: javascript.0 (367) script.js.common.Steuerung.robot_Reinigungstimer: nicht frei
                1.11.2022, 15:53:12.229	[warn ]: javascript.0 (367) script.js.common.Steuerung.robot_Reinigungstimer: nicht frei
                

                wie ihr seht sind es 3 Datenpunkte. Ich würde aber nur gern 1 mal die Ausgabe haben frei oder nicht frei

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

                  @psyganja sagte in IDs vom Selektor:

                  Jetzt muss ich es nur noch erweitern.

                  und dazu ist das Skript von @paul53 super geeignet... die Schleife wird abgebrochen sobald das erste "false" erkannt wird. >Damit sparst Du Dir unnötige LOGS.

                  paul53 P 2 Replies Last reply Reply Quote 1
                  • paul53
                    paul53 @DJMarc75 last edited by

                    @djmarc75 sagte: die Schleife wird abgebrochen sobald das erste "false" erkannt wird.

                    ... sobald das erste "true" erkannt wird.

                    DJMarc75 P 2 Replies Last reply Reply Quote 0
                    • P
                      PsyGanja @DJMarc75 last edited by

                      @djmarc75
                      noch gar nicht endeckt

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

                        @psyganja sagte: Vielleicht habt ihr ja einen Tipp.

                        Siehe hier

                        1 Reply Last reply Reply Quote 2
                        • DJMarc75
                          DJMarc75 @paul53 last edited by

                          @paul53 sagte in IDs vom Selektor:

                          sobald das erste "true" erkannt wird.

                          ups... ja ... eben gesehen !

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

                            @paul53 said in IDs vom Selektor:

                            @djmarc75 sagte: die Schleife wird abgebrochen sobald das erste "false" erkannt wird.

                            ... sobald das erste "true" erkannt wird.

                            Funktionieren tut es.
                            zum Verständnis:
                            Woher weiß die Schleife ob true oder false gesetzt ist? Das kann ich nicht erkennen.
                            Muß die variable id heißen? Weil sich der Befehl mit id*(functions=) zusammen setzt?

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

                              @psyganja sagte: Woher weiß die Schleife ob true oder false gesetzt ist?

                              Die 3 Datenpunkte enthalten die Werte false oder true, was auch ein Vergleich als Ergebnis liefert.

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

                                @psyganja sagte: Muß die variable id heißen?

                                Nein. Bei mir heißt sie id, damit jeder weiß, dass sie eine Datenpunkt-ID enthält.

                                P 1 Reply Last reply Reply Quote 1
                                • P
                                  PsyGanja @paul53 last edited by

                                  @paul53 said in IDs vom Selektor:

                                  @psyganja sagte: Muß die variable id heißen?

                                  Nein. Bei mir heißt sie id, damit jeder weiß, dass sie eine Datenpunkt-ID enthält.

                                  Ok. Bin bei falls hängen geblieben. Also falls der Wert id = true ist dann mache setze frei und breche die Schleife ab.
                                  Mir fehlte halt die Abfrage ob true oder false. Aber das ergibt sich aus der Ausgabe von falls.

                                  Habe ich mir das so richtig erklärt?😊

                                  DJMarc75 1 Reply Last reply Reply Quote 0
                                  • DJMarc75
                                    DJMarc75 @PsyGanja last edited by

                                    @psyganja sagte in IDs vom Selektor:

                                    Habe ich mir das so richtig erklärt?

                                    Screenshot 2022-11-01 161531.png
                                    hat beides den selben Effekt.

                                    P 1 Reply Last reply Reply Quote 1
                                    • P
                                      PsyGanja last edited by PsyGanja

                                      Super ihr beiden, habt mir sehr geholfen.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        PsyGanja @DJMarc75 last edited by PsyGanja

                                        @djmarc75

                                        Kann man eigentlich in blockly einen schalter zu einer bestimmten Uhrzeit schalten? Ich meine nicht den Zeit Trigger , es sei den man kann diesen manipulieren.
                                        Also im script, schalte Lampe um 7Uhr?

                                        DJMarc75 1 Reply Last reply Reply Quote 0
                                        • DJMarc75
                                          DJMarc75 @PsyGanja last edited by

                                          @psyganja

                                          entweder statisch per Zeitplan oder per externem CRON-DP. Da kannst Du quasi die Zeit von "extern" setzen, z.B. über VIS oder Ähnlichem.

                                          Screenshot 2022-11-01 165035.png

                                          P paul53 2 Replies Last reply Reply Quote 1
                                          • P
                                            PsyGanja @DJMarc75 last edited by

                                            @djmarc75

                                            Ah ok damit kann ich arbeiten. Ich dachte es geht vielleicht noch anders.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            545
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            25
                                            1580
                                            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