Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Warten auf successful bei Linux Control

    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

    Warten auf successful bei Linux Control

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

      @felsdrache sagte in Warten auf successful bei Linux Control:

      ich habe ein Script

      zeigen bitte

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

        @djmarc75

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable type="interval" id="Warten auf wahr">Warten auf wahr</variable>
         </variables>
         <block type="on_ext" id="Uq`tK$rMggfE-2hTSX;@" x="108" y="80">
           <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
           <field name="CONDITION">ne</field>
           <field name="ACK_CONDITION"></field>
           <value name="OID0">
             <shadow type="field_oid" id="99)Shngn!J_J!G@iGi}i">
               <field name="oid">linux-control.0.command.command</field>
             </shadow>
           </value>
           <statement name="STATEMENT">
             <block type="timeouts_wait" id="Z|iNO]n;!|v33c4dfZ^N">
               <field name="DELAY">1000</field>
               <field name="UNIT">ms</field>
               <next>
                 <block type="timeouts_setinterval" id="E6~JvQKzoB/Rt(y44RGL">
                   <field name="NAME">Warten auf wahr</field>
                   <field name="INTERVAL">1000</field>
                   <field name="UNIT">ms</field>
                   <statement name="STATEMENT">
                     <block type="controls_if" id=":;!-|wJn3g;A.e.k![YZ">
                       <value name="IF0">
                         <block type="logic_compare" id="O=1=z`!QR?i+VtvD(a{]">
                           <field name="OP">EQ</field>
                           <value name="A">
                             <block type="get_value" id="H{xxuoD6NH!)Rtlm%_L+">
                               <field name="ATTR">val</field>
                               <field name="OID">linux-control.0.command.response</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="text" id="hg(I{2:TA[_(%r8v@T+P">
                               <field name="TEXT">successful</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="timeouts_clearinterval" id="H5?;-UjfnTA?tDL!Pi(K">
                           <field name="NAME">Warten auf wahr</field>
                           <next>
                             <block type="debug" id="XoN:*:k|VVbSiok$d78:">
                               <field name="Severity">info</field>
                               <value name="TEXT">
                                 <shadow type="text" id="koiCOPOyTqq6V`T)m#Ok">
                                   <field name="TEXT">es läuft</field>
                                 </shadow>
                               </value>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </statement>
         </block>
        </xml>
        
        F 1 Reply Last reply Reply Quote 0
        • F
          Felsdrache @Felsdrache last edited by

          @felsdrache sagte in Warten auf successful bei Linux Control:

          @djmarc75

          > <xml xmlns="https://developers.google.com/blockly/xml">
          >   <variables>
          >     <variable type="interval" id="Warten auf wahr">Warten auf wahr</variable>
          >   </variables>
          >   <block type="on_ext" id="Uq`tK$rMggfE-2hTSX;@" x="108" y="80">
          >     <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          >     <field name="CONDITION">ne</field>
          >     <field name="ACK_CONDITION"></field>
          >     <value name="OID0">
          >       <shadow type="field_oid" id="99)Shngn!J_J!G@iGi}i">
          >         <field name="oid">linux-control.0.command.command</field>
          >       </shadow>
          >     </value>
          >     <statement name="STATEMENT">
          >       <block type="timeouts_wait" id="Z|iNO]n;!|v33c4dfZ^N">
          >         <field name="DELAY">1000</field>
          >         <field name="UNIT">ms</field>
          >         <next>
          >           <block type="timeouts_setinterval" id="E6~JvQKzoB/Rt(y44RGL">
          >             <field name="NAME">Warten auf wahr</field>
          >             <field name="INTERVAL">1000</field>
          >             <field name="UNIT">ms</field>
          >             <statement name="STATEMENT">
          >               <block type="controls_if" id=":;!-|wJn3g;A.e.k![YZ">
          >                 <value name="IF0">
          >                   <block type="logic_compare" id="O=1=z`!QR?i+VtvD(a{]">
          >                     <field name="OP">EQ</field>
          >                     <value name="A">
          >                       <block type="get_value" id="H{xxuoD6NH!)Rtlm%_L+">
          >                         <field name="ATTR">val</field>
          >                         <field name="OID">linux-control.0.command.response</field>
          >                       </block>
          >                     </value>
          >                     <value name="B">
          >                       <block type="text" id="hg(I{2:TA[_(%r8v@T+P">
          >                         <field name="TEXT">successful</field>
          >                       </block>
          >                     </value>
          >                   </block>
          >                 </value>
          >                 <statement name="DO0">
          >                   <block type="timeouts_clearinterval" id="H5?;-UjfnTA?tDL!Pi(K">
          >                     <field name="NAME">Warten auf wahr</field>
          >                     <next>
          >                       <block type="debug" id="XoN:*:k|VVbSiok$d78:">
          >                         <field name="Severity">info</field>
          >                         <value name="TEXT">
          >                           <shadow type="text" id="koiCOPOyTqq6V`T)m#Ok">
          >                             <field name="TEXT">es läuft</field>
          >                           </shadow>
          >                         </value>
          >                       </block>
          >                     </next>
          >                   </block>
          >                 </statement>
          >               </block>
          >             </statement>
          >           </block>
          >         </next>
          >       </block>
          >     </statement>
          >   </block>
          > </xml>
          >
          
          DJMarc75 1 Reply Last reply Reply Quote 0
          • DJMarc75
            DJMarc75 @Felsdrache last edited by

            @felsdrache

            trigger doch auf den ResponseDP:

            Screenshot 2024-07-08 193828.png

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

              @djmarc75
              Screenshot_20240708_193804.png

              F 1 Reply Last reply Reply Quote 0
              • F
                Felsdrache @Felsdrache last edited by

                @felsdrache Das wäre am Thema vorbei ich möchte ja nicht immer reponcse triggern sondern warten bis mein Befehl mit reponce bestätigt wird

                F DJMarc75 2 Replies Last reply Reply Quote 0
                • F
                  Felsdrache @Felsdrache last edited by Felsdrache

                  @felsdrache sagte in Warten auf successful bei Linux Control:

                  @felsdrache Das wäre am Thema vorbei ich möchte ja nicht immer reponcse triggern sondern warten bis mein Befehl mit reponce bestätigt wird.
                  Der Grosche fällt ja so kannn es gehen. Danke

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

                    @felsdrache sagte in Warten auf successful bei Linux Control:

                    Das wäre am Thema vorbei

                    Was genau ? Du setzt ja den Befehl irgendwie manuell ab - und wenn dann als Ergebnis "succesfull" kommt ist doch alles gut 🙂

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

                      @djmarc75
                      Nein ich setzte mit einem script einen Befehl über ssh ab. und warte zurzeit eine Zeit x ab und dann den nächsten Befehl.
                      Das geht aber ist natürlich handwerklich falsch. und ich würde es jetzt gerne richtig machen.

                      iobroker.png

                      Das ist wohl so besser

                      OliverIO 1 Reply Last reply Reply Quote 0
                      • OliverIO
                        OliverIO @Felsdrache last edited by

                        @felsdrache

                        programme unter linux geben als ergebnis einen sogenannten errorlevel/exit codes zurück
                        0 ist alles ok
                        1 ist fehlerhaft
                        dann gibt es noch ein paar reservierte codes und sonst könnte der programmierer auch noch benutzer spezifische codes zurückgeben. der code wird normalerweise nicht mit ausgegeben.

                        welche es sonst noch gibt, müsste in der jeweiligen man dokumentation liegen

                        wenn befehle mit ssh ausgeführt werden, dann gibt ssh den code des letzen befehls zurück
                        mit ssh hab ich das selbst noch nicht ausprobiert, aber damit kannst du in die richtige richtung recherchieren.

                        hier ein kleines tutorial
                        https://shapeshed.com/unix-exit-codes/

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          Felsdrache @OliverIO last edited by

                          @oliverio
                          Ja Oliver aber ich gebe dem execute Command ein wahr uund möchte dann warten bis responce command mir ein successful zurück gibt. ich weiß nur nicht wie ich das über blockly anstellen soll.

                          F 1 Reply Last reply Reply Quote 0
                          • F
                            Felsdrache @Felsdrache last edited by Felsdrache

                            @felsdrache
                            iobroker.png

                            So klappt es dann

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            873
                            Online

                            31.9k
                            Users

                            80.1k
                            Topics

                            1.3m
                            Posts

                            3
                            13
                            482
                            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