Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] Schalten in Zeitspanne und bei An/Abwesenheit

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] Schalten in Zeitspanne und bei An/Abwesenheit

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

      Hallo zusammen,

      ich würde gerne, meinen Drucker in der Zeit von 9:00-21:00 einschalten, aber nur, wenn auch wirklich jemand zu hause ist.
      Leider stehe ich hier auf den Schlauch und komme nicht weiter.

      2020-05-26_105534.jpg

      BBTown 1 Reply Last reply Reply Quote 0
      • BBTown
        BBTown @falke69 last edited by BBTown

        @falke69
        ich denke, ich würde es so lösen

        e771ca9b-7e23-4d81-b383-6d5780da21e0-grafik.png

        <xml xmlns="https://developers.google.com/blockly/xml">
         <block type="schedule" id=")%ID0Cs76Ob6IBRM,._b" x="-62" y="-37">
           <field name="SCHEDULE">0 9 * * *</field>
           <statement name="STATEMENT">
             <block type="controls_if" id="N8H!bwS/G7b-/U:nxBcy">
               <value name="IF0">
                 <block type="get_value" id=")QW`-?`40y(`riWkT~,t">
                   <field name="ATTR">val</field>
                   <field name="OID">Test.0.Anwesenheit</field>
                 </block>
               </value>
               <statement name="DO0">
                 <block type="controls_if" id="z}}emCi,oS=CLr5EFvHm">
                   <value name="IF0">
                     <block type="logic_negate" id="5Qe$Z]8U=@,cN;W2K;}$">
                       <value name="BOOL">
                         <block type="get_value" id="TAJ=;5p`?KWWL^G~v%=u">
                           <field name="ATTR">val</field>
                           <field name="OID">Test.0.Steckdose</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="control" id="[Da5[^Lg;iqLx$n]Z?]|">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">Test.0.Steckdose</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="logic_boolean" id="5[I3%{YTw:avf1U.W2,G">
                           <field name="BOOL">TRUE</field>
                         </block>
                       </value>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
           </statement>
           <next>
             <block type="on_ext" id="+:pCJ(-U]Q(j5[qL1#oP">
               <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="+Lp=OwV!#s{@iyQ%|fTn">
                   <field name="oid">Test.0.Anwesenheit</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_if" id="6GOEDnAS65i-^U4!|[pN">
                   <mutation elseif="1"></mutation>
                   <value name="IF0">
                     <block type="logic_operation" id="XF^^YDb*6j9BnjepPM#C" inline="false">
                       <field name="OP">AND</field>
                       <value name="A">
                         <block type="get_value" id="^Yi=l@o_f1[Q5zg-s+cU">
                           <field name="ATTR">val</field>
                           <field name="OID">Test.0.Anwesenheit</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="time_compare_ex" id="wzUGN|]VB~K{fqjL{_c^">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
                           <field name="USE_ACTUAL_TIME">TRUE</field>
                           <field name="OPTION">between</field>
                           <value name="START_TIME">
                             <shadow type="text" id="%fIXTZ(}rs;Wu:DaR[-b">
                               <field name="TEXT">09:00</field>
                             </shadow>
                           </value>
                           <value name="END_TIME">
                             <shadow type="text" id="^!5u64#I%=Uz_m@3Ewj~">
                               <field name="TEXT">20:00</field>
                             </shadow>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="control" id="0cbB#?PdEvIp1u9_:fQU">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">Test.0.Steckdose</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="logic_boolean" id="mokB!HP1~KAc8S|k$/f?">
                           <field name="BOOL">TRUE</field>
                         </block>
                       </value>
                     </block>
                   </statement>
                   <value name="IF1">
                     <block type="logic_negate" id="Qi4pnctnWFZuMg{qRnvo">
                       <value name="BOOL">
                         <block type="get_value" id="DpCO{(N8]c`l=iCSv1^L">
                           <field name="ATTR">val</field>
                           <field name="OID">Test.0.Anwesenheit</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO1">
                     <block type="controls_if" id="3e6J7w^AMI-[Wl[27YbS">
                       <value name="IF0">
                         <block type="get_value" id="R-6L/%L#22|kUVlq;k;4">
                           <field name="ATTR">val</field>
                           <field name="OID">Test.0.Steckdose</field>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="control" id="[dJ#{:.EOd(*,X;pilUn">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">Test.0.Steckdose</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="DJ5kZraFJ@e|Grh5C.@k">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </statement>
               <next>
                 <block type="schedule" id="rZ|$ZW6S?z9Wou%UDFm7">
                   <field name="SCHEDULE">0 20 * * *</field>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="Y/8_1:4+(QCb7XTfXh7F">
                       <value name="IF0">
                         <block type="get_value" id="GbYRucn7AA}jY~1=w)ln">
                           <field name="ATTR">val</field>
                           <field name="OID">Test.0.Steckdose</field>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="control" id="+n.TNXY|6~ByyZz1uYjA">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">Test.0.Steckdose</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="?N7fVBg%b-j$:}a0F?.8">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </next>
         </block>
        </xml>
        

        falke69 1 Reply Last reply Reply Quote 1
        • falke69
          falke69 @BBTown last edited by

          @BBTown

          Vielen Dank,

          habe ich gerade so umgesetzt und mit den Zeiten und der Anwesenheit experimentiert.
          Bis jetzt scheint es sauber zu laufen.

          Vielen Dank

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

          Support us

          ioBroker
          Community Adapters
          Donate

          540
          Online

          32.0k
          Users

          80.4k
          Topics

          1.3m
          Posts

          2
          3
          192
          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