Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [Gelöst] Stufenschalter mit Dash Button

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [Gelöst] Stufenschalter mit Dash Button

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

      Hallo zusammen,

      ich versuche gerade für meinen Ventilator eine vier Stufen Schaltung mit Blocky zu realisieren.

      Leider habe ich kein Modul gefunden was quasi die Tastendrücke zählt und vergleicht um dann in die nächste Stufe und am ende in Aus zu schalten.

      vllt hat von euch jemand eine Idee

      bin für jeden Tipp dankbar

      Gruß anselra

      ! ````
      <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="e}UNl5hWF`=J#Cg?R58v" x="163" y="63"><mutation items="1"></mutation>
      <field name="CONDITION">ne</field>

      <value name="OID0"><shadow type="field_oid" id="ure}rvmP6*qR`@CjX1Yr"><field name="oid">amazon-dash.0.xx-xx-xx-xx-xx-xx.pressed</field></shadow></value> 
      <statement name="STATEMENT"><block type="debug" id="67r!VpTlQsgV)%{5rpa3"><field name="Severity">log</field>
          <value name="TEXT"><shadow type="text" id="z5DYadh4uCisX9K`48C;"><field name="TEXT">Ventilator Stufe 1</field></shadow></value> 
          <next><block type="controls_if" id="oCi,GWU|wqta3Z|p5xb="><value name="IF0"><block type="logic_operation" id="j{8GaIVxf31-p0VA3PIy"><field name="OP">AND</field>
                  <value name="A"><block type="logic_compare" id="AeEiH~DFud5cn^/}tKq-"><field name="OP">EQ</field>
                      <value name="A"><block type="get_value" id="6JNZd8913.F~IEEe;yb8"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.OEQxxx.3.STATE</field></block></value> 
                      <value name="B"><block type="logic_boolean" id="v2hvr/v.,Lc:IayeHv!0"><field name="BOOL">FALSE</field></block></value></block></value> 
                  <value name="B"><block type="logic_operation" id="@Y#!!!Wh1Zlt9N]2/i_l"><field name="OP">AND</field>
                      <value name="A"><block type="logic_compare" id="XBfV(}mgq#V?H(DjYG)~"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id=":%A1vfdMT?2F3i0=A)Jm"><field name="ATTR">val</field>
                              <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field></block></value> 
                          <value name="B"><block type="logic_boolean" id="-NpaP+O4:2SWZUjxCSiG"><field name="BOOL">FALSE</field></block></value></block></value> 
                      <value name="B"><block type="logic_compare" id="(H{j(mL=2`[+co.6??0W"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id="0vbNBT(-{;O#UIRUo:!!"><field name="ATTR">val</field>
                              <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field></block></value> 
                          <value name="B"><block type="logic_boolean" id="=om1r%eYJYUC6%d^,*3?"><field name="BOOL">FALSE</field></block></value></block></value></block></value></block></value> 
              <statement name="DO0"><block type="control" id=":0BSosD,2DW*7,9/!1._"><mutation delay_input="false"></mutation>
                  <field name="OID">hm-rpc.0.OEQxxxx.3.STATE</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE"><block type="logic_boolean" id="Mmw]#wuQ~R_Zq^2@^[_N"><field name="BOOL">TRUE</field></block></value></block></statement> 
              <next><block type="debug" id="k]AXs;uL1J^,S/YZQ:N5"><field name="Severity">log</field>
                  <value name="TEXT"><shadow type="text" id="6b^UshZlhjxd~j(Y1Q1u"><field name="TEXT">Ventilator Stufe 2</field></shadow></value> 
                  <next><block type="controls_if" id="C%3(!PRx32V0w_Dt4zLl"><value name="IF0"><block type="logic_operation" id="P0!|zw.!M/arul@_@.6,"><field name="OP">AND</field>
                          <value name="A"><block type="logic_compare" id=".)ojAE5R`,0nXdS|f;XL"><field name="OP">EQ</field>
                              <value name="A"><block type="get_value" id="X,i`vnui,uL#cchkRMXT"><field name="ATTR">val</field>
                                  <field name="OID">hm-rpc.0.OEQxxxx.3.STATE</field></block></value> 
                              <value name="B"><block type="logic_boolean" id="TQgCf=sldF!lKMo{jLm^"><field name="BOOL">TRUE</field></block></value></block></value> 
                          <value name="B"><block type="logic_operation" id="gL1*_(V0672z;Sg@Bl@u"><field name="OP">AND</field>
                              <value name="A"><block type="logic_compare" id="ORv@nd.,UB0So#@Gd63["><field name="OP">EQ</field>
                                  <value name="A"><block type="get_value" id=",vSvFICEZl`;SEu:0Ram"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field></block></value> 
                                  <value name="B"><block type="logic_boolean" id="UMmuG[/Z[rm;6SO=IvSq"><field name="BOOL">FALSE</field></block></value></block></value> 
                              <value name="B"><block type="logic_compare" id="b)5|}pWz5yxbd4fjY;^L"><field name="OP">EQ</field>
                                  <value name="A"><block type="get_value" id="?Tt?Jhhgac1B7u`%c!ub"><field name="ATTR">val</field>
                                      <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field></block></value> 
                                  <value name="B"><block type="logic_boolean" id="Ecb/?k[UV@_fTlo/YJBf"><field name="BOOL">FALSE</field></block></value></block></value></block></value></block></value> 
                      <statement name="DO0"><block type="control" id="ujqDkB9W#x.m:,D7]`3W"><mutation delay_input="false"></mutation>
                          <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE"><block type="logic_boolean" id="d.],kkv-8wg7R*@^LmK1"><field name="BOOL">TRUE</field></block></value></block></statement> 
                      <next><block type="debug" id="pUa6RCuKyGx3be2*AM0N"><field name="Severity">log</field>
                          <value name="TEXT"><shadow type="text" id="(_PXZ[}l+Y-1/n5=kH_]"><field name="TEXT">Ventilator Stufe 3</field></shadow></value> 
                          <next><block type="controls_if" id="uO}g8M%=1OM?q`e@]Cs9"><value name="IF0"><block type="logic_operation" id="ZQqDe+hDWp59SH/,a{^t"><field name="OP">AND</field>
                                  <value name="A"><block type="logic_compare" id="FWti#`mLh_%7BG7-FcXk"><field name="OP">EQ</field>
                                      <value name="A"><block type="get_value" id="X0CwqYucZFxW=6ddBV_*"><field name="ATTR">val</field>
                                          <field name="OID">hm-rpc.0.OEQxxxx.3.STATE</field></block></value> 
                                      <value name="B"><block type="logic_boolean" id="Y.p?raJ~g4byPX=FvqTX"><field name="BOOL">FALSE</field></block></value></block></value> 
                                  <value name="B"><block type="logic_operation" id="XLt(3DCUv9dO/r8PX8wg"><field name="OP">AND</field>
                                      <value name="A"><block type="logic_compare" id="j|4_Ab@-jo?nG9It/bpk"><field name="OP">EQ</field>
                                          <value name="A"><block type="get_value" id="PxCu8[EO0wU])`vDDfhQ"><field name="ATTR">val</field>
                                              <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field></block></value> 
                                          <value name="B"><block type="logic_boolean" id="79(U0*tVX@6|D)8LY*`M"><field name="BOOL">TRUE</field></block></value></block></value> 
                                      <value name="B"><block type="logic_compare" id="Z0G=Q[ViY76%rGTFWl_Q"><field name="OP">EQ</field>
                                          <value name="A"><block type="get_value" id="x{YI6n;zMas57Z-::5Es"><field name="ATTR">val</field>
                                              <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field></block></value> 
                                          <value name="B"><block type="logic_boolean" id="~g[^dFgvhcMviwdrd[0d"><field name="BOOL">FALSE</field></block></value></block></value></block></value></block></value> 
                              <statement name="DO0"><block type="control" id="YYZE)+#IPPFS9y?S`ojc"><mutation delay_input="false"></mutation>
                                  <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE"><block type="logic_boolean" id="^=vogsi~DfgfFwy:%~3T"><field name="BOOL">TRUE</field></block></value></block></statement> 
                              <next><block type="debug" id="l,4uNtYnscn!T/Bq-Ewo"><field name="Severity">log</field>
                                  <value name="TEXT"><shadow type="text" id="c.EF%3b%6{qA1=_a2.Vc"><field name="TEXT">Ventilator aus</field></shadow></value> 
                                  <next><block type="controls_if" id="Y54/QhRUXB`M#yID:F!="><value name="IF0"><block type="logic_operation" id="O`ox%KVtrtHVH,-S-!Wo"><field name="OP">AND</field>
                                          <value name="A"><block type="logic_compare" id="Y9k?U|*qiDpcmcYUl]l4"><field name="OP">EQ</field>
                                              <value name="A"><block type="get_value" id="i8u@UwJfK@:SWH0)X-!w"><field name="ATTR">val</field>
                                                  <field name="OID">hm-rpc.0.OEQxxxx.3.STATE</field></block></value> 
                                              <value name="B"><block type="logic_boolean" id="NNt!ULoRd/,L=iOWQ1j8"><field name="BOOL">FALSE</field></block></value></block></value> 
                                          <value name="B"><block type="logic_operation" id="qf5[iugz3)YnB_V/{Lv6"><field name="OP">AND</field>
                                              <value name="A"><block type="logic_compare" id=":4l2a}{+fPYI-;hio-co"><field name="OP">EQ</field>
                                                  <value name="A"><block type="get_value" id="=NFZ1W]aVFaS~Kbc3)nb"><field name="ATTR">val</field>
                                                      <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field></block></value> 
                                                  <value name="B"><block type="logic_boolean" id="%tJII)Hj5DK`y(e4RT@l"><field name="BOOL">FALSE</field></block></value></block></value> 
                                              <value name="B"><block type="logic_compare" id="L)M`Ovu#%RJsSCv#o.6_"><field name="OP">EQ</field>
                                                  <value name="A"><block type="get_value" id="{FF/SG@OwL.8W8gP4%Yu"><field name="ATTR">val</field>
                                                      <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field></block></value> 
                                                  <value name="B"><block type="logic_boolean" id="c.ha#!WlxSJbCj!;eMA;"><field name="BOOL">TRUE</field></block></value></block></value></block></value></block></value> 
                                      <statement name="DO0"><block type="control" id="?s0K-Lm8rzmoLvJ(Kk8Y"><mutation delay_input="false"></mutation>
                                          <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE"><block type="logic_boolean" id="?tXSqbtRs9ldY?wkpx`W"><field name="BOOL">FALSE</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml> 
      
      1 Reply Last reply Reply Quote 0
      • Dutchman
        Dutchman Developer Most Active Administrators last edited by

        @anselra:

        Leider habe ich kein Modul gefunden was quasi die Tastendrücke zählt und vergleicht um dann in die nächste Stufe und am ende in Aus zu schalten. `

        hi, ich kenne auch kein modul dafuer kan mir nur vorstellen dus du mit einer variable arbeiten kannst die man dan immer + 1 mach und dan wen groesser al wieder 0 ?

        ~Dutch

        1 Reply Last reply Reply Quote 0
        • A
          anselra last edited by

          Danke für den Hinweis, werde es mal versuchen nur ist mir noch nicht so ganz klar wie das vergleichen und Ändern funktioniert.

          Bin wohl etwas von der Siemen Logo verwöhnt

          1 Reply Last reply Reply Quote 0
          • Dutchman
            Dutchman Developer Most Active Administrators last edited by

            @anselra:

            Danke für den Hinweis, werde es mal versuchen nur ist mir noch nicht so ganz klar wie das vergleichen und Ändern funktioniert.

            Bin wohl etwas von der Siemen Logo verwöhnt `

            mir ist halt nicht ganz klar was du erreichen moechtest 🙂

            Du hast einen ventilator den du mit variable 1-4 ansteuern kannst und moechtest jetzt per tastendruk immer eine stufe hoeher und wen die letzte erreicht wurden aus ?

            PS: hab deinen erstem post mal editiert damit der code in code bloecken steht liest sich leichter, naeste mal bitte selber drauf achten 😉

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

              Hallo anselra

              Habe ich das richtig verstanden?

              AUS -> Stufe 1 -> Stufe 2 -> Stufe 3 -> AUS

              Wenn Ja, dann probiere folgendes mal. (NICHT GETESTET)
              147_beispiel.png

              Export:

              ! ````
              <xml xmlns="http://www.w3.org/1999/xhtml"><block type="comment" id="Z!QKQ.j3KO3.!Xm=p=!h" x="-262" y="113"><field name="COMMENT">bei Programmstart aktuellen Satus holen</field>
              <next><block type="procedures_callnoreturn" id="}GSXfCDly^61Cd/vYK]J"><mutation name="ChkAktuelleStufe"></mutation>
              <next><block type="comment" id="0Z0e6B4C3K*5f}{DgQjg"><field name="COMMENT">Dash triggern</field>
              <next><block type="on_ext" id="e}UNl5hWF`=J#Cg?R58v"><mutation items="1"></mutation>
              <field name="CONDITION">ne</field>

                          <value name="OID0"><shadow type="field_oid" id="ure}rvmP6*qR`@CjX1Yr"><field name="oid">amazon-dash.0.xx-xx-xx-xx-xx-xx.pressed</field></shadow></value> 
                          <statement name="STATEMENT"><block type="math_change" id="i7hk@1g06ZS#}qLYD5)R"><field name="VAR">aktuelleStufe</field>
                              <value name="DELTA"><shadow type="math_number" id="h]GJzowOU.e%ss`*~Db]"><field name="NUM">1</field></shadow></value> 
                              <next><block type="debug" id="67r!VpTlQsgV)%{5rpa3"><field name="Severity">log</field>
                                  <value name="TEXT"><shadow type="text" id="z5DYadh4uCisX9K`48C;"><field name="TEXT">Ventilator Stufe 1</field></shadow></value> 
                                  <next><block type="controls_if" id="KOA?j/RGoQI6W;x]OLp_"><mutation elseif="3"></mutation>
                                      <value name="IF0"><block type="logic_compare" id="bcI}^Ll#f3c%4..hDct}"><field name="OP">EQ</field>
                                          <value name="A"><block type="variables_get" id="`F-RQgb`i?gb(kNX6Ta;"><field name="VAR">aktuelleStufe</field></block></value> 
                                          <value name="B"><block type="math_number" id="#zmW`h9f@_HElE!qk:8K"><field name="NUM">4</field></block></value></block></value> 
                                      <statement name="DO0"><block type="comment" id="X8%cb@:8zQnHsRJQIn97"><field name="COMMENT">Stufe 3 aktiv -> AUS</field>
                                          <next><block type="variables_set" id="y2T=dgs:f5DLN?,S}]ZB"><field name="VAR">aktuelleStufe</field>
                                              <value name="VALUE"><block type="math_number" id="mOrw^F#bt:jHQVuJpo8o"><field name="NUM">0</field></block></value> 
                                              <next><block type="control" id="=l=6Wnx^qQMFKvTpV:Vo"><mutation delay_input="false"></mutation>
                                                  <field name="OID">hm-rpc.0.OEQxxxx.3.STATE</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE"><block type="logic_boolean" id="hHA?nH,]00vsi-Z/Ju_A"><field name="BOOL">FALSE</field></block></value> 
                                                  <next><block type="debug" id="l,4uNtYnscn!T/Bq-Ewo"><field name="Severity">log</field>
                                                      <value name="TEXT"><shadow type="text" id="c.EF%3b%6{qA1=_a2.Vc"><field name="TEXT">Ventilator aus</field></shadow></value></block></next></block></next></block></next></block></statement> 
                                      <value name="IF1"><block type="logic_compare" id="?k9|*;C#o6Z]6}2{@b+r"><field name="OP">EQ</field>
                                          <value name="A"><block type="variables_get" id="h-+zhNuDHcHgSB{xw6hZ"><field name="VAR">aktuelleStufe</field></block></value> 
                                          <value name="B"><block type="math_number" id="}E|#Dy}}TwP)e})j2l8Z"><field name="NUM">1</field></block></value></block></value> 
                                      <statement name="DO1"><block type="debug" id="6ur_dXm26a=wbCcNy{mn"><field name="Severity">log</field>
                                          <value name="TEXT"><shadow type="text" id=",i]HP.Sze9)z#85/;+.q"><field name="TEXT">Ventilator Stufe 1</field></shadow></value> 
                                          <next><block type="control" id="E()^E:bYMrP-Dk#}[v{U"><mutation delay_input="false"></mutation>
                                              <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE"><block type="logic_boolean" id="%JWBB}P*5-zxEu320(V="><field name="BOOL">TRUE</field></block></value></block></next></block></statement> 
                                      <value name="IF2"><block type="logic_compare" id="F31YSuhyy=UZIMEf|E)Q"><field name="OP">EQ</field>
                                          <value name="A"><block type="variables_get" id="^fQ(s1.;WgCLCmejdnl)"><field name="VAR">aktuelleStufe</field></block></value> 
                                          <value name="B"><block type="math_number" id="h^xkEa[AI;d(yS]zX/xc"><field name="NUM">2</field></block></value></block></value> 
                                      <statement name="DO2"><block type="debug" id="k]AXs;uL1J^,S/YZQ:N5"><field name="Severity">log</field>
                                          <value name="TEXT"><shadow type="text" id="6b^UshZlhjxd~j(Y1Q1u"><field name="TEXT">Ventilator Stufe 2</field></shadow></value> 
                                          <next><block type="control" id="sexO;nTiBS#Si7PG(uPo"><mutation delay_input="false"></mutation>
                                              <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE"><block type="logic_boolean" id="#!:?u)XhEeZufmtXIqDn"><field name="BOOL">TRUE</field></block></value></block></next></block></statement> 
                                      <value name="IF3"><block type="logic_compare" id="!_ly9Ed!#YM`,(Mg8)f-"><field name="OP">EQ</field>
                                          <value name="A"><block type="variables_get" id="`2d{*@?vubf)K+45IKq{"><field name="VAR">aktuelleStufe</field></block></value> 
                                          <value name="B"><block type="math_number" id="H%`:nW!M}ci=IiN@]Y[!"><field name="NUM">3</field></block></value></block></value> 
                                      <statement name="DO3"><block type="debug" id="pUa6RCuKyGx3be2*AM0N"><field name="Severity">log</field>
                                          <value name="TEXT"><shadow type="text" id="(_PXZ[}l+Y-1/n5=kH_]"><field name="TEXT">Ventilator Stufe 3</field></shadow></value> 
                                          <next><block type="control" id=":0BSosD,2DW*7,9/!1._"><mutation delay_input="false"></mutation>
                                              <field name="OID">hm-rpc.0.OEQxxxx.3.STATE</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE"><block type="logic_boolean" id="Mmw]#wuQ~R_Zq^2@^[_N"><field name="BOOL">TRUE</field></block></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></next></block> 
              

              <block type="procedures_defnoreturn" id="F:WMMe_jqAE@Wt2s?/a" x="388" y="212"><field name="NAME">ChkAktuelleStufe</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="variables_set" id="I=ninml.6uk@EAErEA~W"><field name="VAR">aktuelleStufe</field> <value name="VALUE"><block type="math_number" id="Jy)SAj.Do2k#j}bQ1ay@"><field name="NUM">0</field></block></value> <next><block type="controls_if" id="Abt5f0Pn+C4AK%sB2aU#"><mutation elseif="2"></mutation> <value name="IF0"><block type="logic_compare" id="jRyx@D+w1*w!iP7mpHD]"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="ctK=k[urZm70O6mO:?f"><field name="ATTR">val</field>
              <field name="OID">hm-rpc.0.OEQxxxx.1.STATE</field></block></value>
              <value name="B"><block type="logic_boolean" id="3zM@3Ii*q,ToigH/2^^S"><field name="BOOL">TRUE</field></block></value></block></value>
              <statement name="DO0"><block type="variables_set" id="-xg=d8Aon{?Y|c@X4Ft"><field name="VAR">aktuelleStufe</field> <value name="VALUE"><block type="math_number" id="zCYBXO[xYo.h/,a~]nH8"><field name="NUM">1</field></block></value></block></statement> <value name="IF1"><block type="logic_compare" id="(JR34S9e}5Ya(jK#GO6["><field name="OP">EQ</field> <value name="A"><block type="get_value" id="fl;+*^7}ykHq#l;j!;ed"><field name="ATTR">val</field> <field name="OID">hm-rpc.0.OEQxxxx.2.STATE</field></block></value> <value name="B"><block type="logic_boolean" id="6p/-%[EqVdCB4o3l{|0x"><field name="BOOL">TRUE</field></block></value></block></value> <statement name="DO1"><block type="variables_set" id="bWWI/DOve=fycpw+l|AP"><field name="VAR">aktuelleStufe</field> <value name="VALUE"><block type="math_number" id="1+vRh{rH/}!V*)e1Y*)w"><field name="NUM">2</field></block></value></block></statement> <value name="IF2"><block type="logic_compare" id="Pfh43@k.SwAH~^ieI/F9"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="jV[}/xDQ[JFl+=J+MJvd"><field name="ATTR">val</field> <field name="OID">hm-rpc.0.OEQxxx.3.STATE</field></block></value> <value name="B"><block type="logic_boolean" id="a2sa!iB7*mkBW3LQ+9z"><field name="BOOL">TRUE</field></block></value></block></value>
              <statement name="DO2"><block type="variables_set" id="MPt:;#[AHLF~(+fy8ziz"><field name="VAR">aktuelleStufe</field>
              <value name="VALUE"><block type="math_number" id="32b:ot?8DR+?BwO_,hI="><field name="NUM">3</field></block></value></block></statement></block></next></block></statement></block></xml>

              ! ````

              Grüße

              1 Reply Last reply Reply Quote 0
              • A
                anselra last edited by

                wow, vielen dank für deine Zeit,

                ja genau Aus - Stufe 1 - Stufe 2 - Stufe 3 - Aus

                jetzt habe ich einen Ansatz wie ich weiter machen kann, das Script funktioniert leider noch nicht ganz, habe das log mal angefügt.

                Gruß anselra

                ! javascript.0 2017-09-30 22:40:23.003 info script.js.common.Skript8: Ventilator aus javascript.0 2017-09-30 22:40:23.000 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:40:18.006 info script.js.common.Skript8: Ventilator Stufe 3 javascript.0 2017-09-30 22:40:18.004 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:39:21.004 info script.js.common.Skript8: Ventilator Stufe 2 javascript.0 2017-09-30 22:39:21.003 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:39:16.006 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:39:16.005 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:37:19.002 info script.js.common.Skript8: Ventilator aus javascript.0 2017-09-30 22:37:18.999 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:37:14.018 info script.js.common.Skript8: Ventilator Stufe 3 javascript.0 2017-09-30 22:37:14.005 info script.js.common.Skript8: Ventilator Stufe 1 javascript.0 2017-09-30 22:36:35.086 info script.js.common.Skript8: registered 1 subscription and 0 schedules javascript.0 2017-09-30 22:36:35.065 info Start javascript script.js.common.Skript8 !

                1 Reply Last reply Reply Quote 0
                • A
                  anselra last edited by

                  @Dutchman:

                  @anselra:

                  Danke für den Hinweis, werde es mal versuchen nur ist mir noch nicht so ganz klar wie das vergleichen und Ändern funktioniert.

                  Bin wohl etwas von der Siemen Logo verwöhnt `

                  mir ist halt nicht ganz klar was du erreichen moechtest 🙂

                  Du hast einen ventilator den du mit variable 1-4 ansteuern kannst und moechtest jetzt per tastendruk immer eine stufe hoeher und wen die letzte erreicht wurden aus ?

                  PS: hab deinen erstem post mal editiert damit der code in code bloecken steht liest sich leichter, naeste mal bitte selber drauf achten 😉 `

                  Danke fürs editieren,

                  vllt hilft es kurz den Aufbau zu beschreiben, Dekenventilator hat drei Stufen und Aus.

                  angesteuert wird er nach dem umbau über Homematic 4-Kanal-Funk-Schaltaktor daran angeschlossen 3 Relais gegeneinander verriegelt für die einzelnen Stufen.

                  funktioniert über ccu mit einem Script allerdings mit 4 Schaltern in Abhängigkeit mit den Schalterzuständen.

                  Gruß anselra

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

                    @anselra:

                    ja genau Aus - Stufe 1 - Stufe 2 - Stufe 3 - Aus

                    jetzt habe ich einen Ansatz wie ich weiter machen kann, das Script funktioniert leider noch nicht ganz, habe das log mal angefügt. `
                    Hmmm.

                    OK. Die aller erste Debugausgabe war noch vom "Umbau" über.

                    Aber auch auf den zweiten Blick sehe ich keinen Fehler :roll:

                    Ausser der Aktor triggert anders als erwartet (habe kein Dash)

                    Oder es können mehrere Stufen gleichzeitig "wahr" sein.

                    Kannst mir ja mal einen Tip geben wo ich den Bug eingebaut habe.

                    Grüße

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

                      @anselra:

                      vllt hilft es kurz den Aufbau zu beschreiben, Dekenventilator hat drei Stufen und Aus.

                      angesteuert wird er nach dem umbau über Homematic 4-Kanal-Funk-Schaltaktor daran angeschlossen 3 Relais gegeneinander verriegelt für die einzelnen Stufen.

                      funktioniert über ccu mit einem Script allerdings mit 4 Schaltern in Abhängigkeit mit den Schalterzuständen. `
                      Der Hinweis währe vorher nicht schlecht gewesen. 😢

                      Grüße

                      1 Reply Last reply Reply Quote 0
                      • A
                        anselra last edited by

                        @rantanplan:

                        @anselra:

                        ja genau Aus - Stufe 1 - Stufe 2 - Stufe 3 - Aus

                        jetzt habe ich einen Ansatz wie ich weiter machen kann, das Script funktioniert leider noch nicht ganz, habe das log mal angefügt. `
                        Hmmm.

                        OK. Die aller erste Debugausgabe war noch vom "Umbau" über.

                        Aber auch auf den zweiten Blick sehe ich keinen Fehler :roll:

                        Ausser der Aktor triggert anders als erwartet (habe kein Dash)

                        Oder es können mehrere Stufen gleichzeitig "wahr" sein.

                        Kannst mir ja mal einen Tip geben wo ich den Bug eingebaut habe.

                        Grüße `

                        Ich denke auch nicht das ein Bug drin ist sondern, das der Butten vllt prellt.

                        werde versuchen im script einen timer einzubauen damit befehle nur alle 5 sec zB angenommen werden

                        1 Reply Last reply Reply Quote 0
                        • A
                          anselra last edited by

                          Danke euch beiden, vor allem dir rantanplan

                          das nächste mal beschreibe ich die Ausgangsituation von Anfang an besser :oops:

                          was nicht korekt war, war die Abfrage des zustandes und eventuell die Statusabfrage der einzelnen Stufen.

                          Ich teste und passe ggf nochmal was an aber es läuft jetzt so wie ich es mir vorgstellt habe.

                          anbei das script zur Ventilator Steuerung bzw Stufenschalter falls es jemand braucht.

                          ! ````
                          <xml xmlns="http://www.w3.org/1999/xhtml"><block type="comment" id="Z!QKQ.j3KO3.!Xm=p=!h" x="-262" y="113"><field name="COMMENT">bei Programmstart aktuellen Satus holen</field>
                          <next><block type="procedures_callnoreturn" id="}GSXfCDly^61Cd/vYK]J"><mutation name="ChkAktuelleStufe"></mutation>
                          <next><block type="comment" id="0Z0e6B4C3K*5f}{DgQjg"><field name="COMMENT">Dash triggern</field>
                          <next><block type="on_ext" id="e}UNl5hWF`=J#Cg?R58v"><mutation items="1"></mutation>
                          <field name="CONDITION">true</field>

                                      <value name="OID0"><shadow type="field_oid" id="ure}rvmP6*qR`@CjX1Yr"><field name="oid">amazon-dash.0.xx-xx-xx-xx-xx-xx.pressed</field></shadow></value> 
                                      <statement name="STATEMENT"><block type="math_change" id="i7hk@1g06ZS#}qLYD5)R"><field name="VAR">aktuelleStufe</field>
                                          <value name="DELTA"><shadow type="math_number" id="h]GJzowOU.e%ss`*~Db]"><field name="NUM">1</field></shadow></value> 
                                          <next><block type="controls_if" id="KOA?j/RGoQI6W;x]OLp_"><mutation elseif="3"></mutation>
                                              <value name="IF0"><block type="logic_compare" id="bcI}^Ll#f3c%4..hDct}"><field name="OP">EQ</field>
                                                  <value name="A"><block type="variables_get" id="`F-RQgb`i?gb(kNX6Ta;"><field name="VAR">aktuelleStufe</field></block></value> 
                                                  <value name="B"><block type="math_number" id="#zmW`h9f@_HElE!qk:8K"><field name="NUM">4</field></block></value></block></value> 
                                              <statement name="DO0"><block type="comment" id="X8%cb@:8zQnHsRJQIn97"><field name="COMMENT">Stufe 3 aktiv -> AUS</field>
                                                  <next><block type="variables_set" id="y2T=dgs:f5DLN?,S}]ZB"><field name="VAR">aktuelleStufe</field>
                                                      <value name="VALUE"><block type="math_number" id="mOrw^F#bt:jHQVuJpo8o"><field name="NUM">0</field></block></value> 
                                                      <next><block type="control" id="=l=6Wnx^qQMFKvTpV:Vo"><mutation delay_input="false"></mutation>
                                                          <field name="OID">hm-rpc.0.OEQ00xxxxx.1.STATE</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="hHA?nH,]00vsi-Z/Ju_A"><field name="BOOL">FALSE</field></block></value> 
                                                          <next><block type="control" id="PkHbm/Q)a:g1KS%MGuY7"><mutation delay_input="false"></mutation>
                                                              <field name="OID">hm-rpc.0.OEQ00xxxxx.2.STATE</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="g.dZne|T)M9OVY2oSDV!"><field name="BOOL">FALSE</field></block></value> 
                                                              <next><block type="control" id="j1{Bb@c%jUdz5J{InGF~"><mutation delay_input="false"></mutation>
                                                                  <field name="OID">hm-rpc.0.OEQ00xxxxx.3.STATE</field>
                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                  <value name="VALUE"><block type="logic_boolean" id="E5)-WOiq0V@V6Ko5cRX+"><field name="BOOL">FALSE</field></block></value> 
                                                                  <next><block type="debug" id="l,4uNtYnscn!T/Bq-Ewo"><field name="Severity">log</field>
                                                                      <value name="TEXT"><shadow type="text" id="c.EF%3b%6{qA1=_a2.Vc"><field name="TEXT">Ventilator aus</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></statement> 
                                              <value name="IF1"><block type="logic_compare" id="?k9|*;C#o6Z]6}2{@b+r"><field name="OP">EQ</field>
                                                  <value name="A"><block type="variables_get" id="h-+zhNuDHcHgSB{xw6hZ"><field name="VAR">aktuelleStufe</field></block></value> 
                                                  <value name="B"><block type="math_number" id="}E|#Dy}}TwP)e})j2l8Z"><field name="NUM">1</field></block></value></block></value> 
                                              <statement name="DO1"><block type="debug" id="6ur_dXm26a=wbCcNy{mn"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id=",i]HP.Sze9)z#85/;+.q"><field name="TEXT">Ventilator Stufe 1</field></shadow></value> 
                                                  <next><block type="control" id="E()^E:bYMrP-Dk#}[v{U"><mutation delay_input="false"></mutation>
                                                      <field name="OID">hm-rpc.0.OEQ00xxxxx.3.STATE</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE"><block type="logic_boolean" id="%JWBB}P*5-zxEu320(V="><field name="BOOL">TRUE</field></block></value></block></next></block></statement> 
                                              <value name="IF2"><block type="logic_compare" id="F31YSuhyy=UZIMEf|E)Q"><field name="OP">EQ</field>
                                                  <value name="A"><block type="variables_get" id="^fQ(s1.;WgCLCmejdnl)"><field name="VAR">aktuelleStufe</field></block></value> 
                                                  <value name="B"><block type="math_number" id="h^xkEa[AI;d(yS]zX/xc"><field name="NUM">2</field></block></value></block></value> 
                                              <statement name="DO2"><block type="debug" id="k]AXs;uL1J^,S/YZQ:N5"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id="6b^UshZlhjxd~j(Y1Q1u"><field name="TEXT">Ventilator Stufe 2</field></shadow></value> 
                                                  <next><block type="control" id="sexO;nTiBS#Si7PG(uPo"><mutation delay_input="false"></mutation>
                                                      <field name="OID">hm-rpc.0.OEQ00xxxxx.2.STATE</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE"><block type="logic_boolean" id="#!:?u)XhEeZufmtXIqDn"><field name="BOOL">TRUE</field></block></value> 
                                                      <next><block type="control" id="TaLLqbIp:eVfQ^mV6I2t"><mutation delay_input="false"></mutation>
                                                          <field name="OID">hm-rpc.0.OEQ00xxxxx.3.STATE</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="KNe4g%pKexUH.gIUbdRl"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement> 
                                              <value name="IF3"><block type="logic_compare" id="!_ly9Ed!#YM`,(Mg8)f-"><field name="OP">EQ</field>
                                                  <value name="A"><block type="variables_get" id="`2d{*@?vubf)K+45IKq{"><field name="VAR">aktuelleStufe</field></block></value> 
                                                  <value name="B"><block type="math_number" id="H%`:nW!M}ci=IiN@]Y[!"><field name="NUM">3</field></block></value></block></value> 
                                              <statement name="DO3"><block type="debug" id="pUa6RCuKyGx3be2*AM0N"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id="(_PXZ[}l+Y-1/n5=kH_]"><field name="TEXT">Ventilator Stufe 3</field></shadow></value> 
                                                  <next><block type="control" id=":0BSosD,2DW*7,9/!1._"><mutation delay_input="false"></mutation>
                                                      <field name="OID">hm-rpc.0.OEQ00xxxxx.1.STATE</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE"><block type="logic_boolean" id="Mmw]#wuQ~R_Zq^2@^[_N"><field name="BOOL">TRUE</field></block></value> 
                                                      <next><block type="control" id="Z_#P!H-ZtcNd6LPX|=~F"><mutation delay_input="false"></mutation>
                                                          <field name="OID">hm-rpc.0.OEQ00xxxxx.2.STATE</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="*.b/K,6M@R;WuXS6XM~m"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></statement></block></next></block></next></block></next></block> 
                          

                          <block type="procedures_defnoreturn" id="F:WMMe_jqAE@Wt2s?/a" x="388" y="212"><field name="NAME">ChkAktuelleStufe</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="variables_set" id="I=ninml.6uk@EAErEA~W"><field name="VAR">aktuelleStufe</field> <value name="VALUE"><block type="math_number" id="Jy)SAj.Do2k#j}bQ1ay@"><field name="NUM">0</field></block></value> <next><block type="controls_if" id="Abt5f0Pn+C4AK%sB2aU#"><mutation elseif="2"></mutation> <value name="IF0"><block type="logic_operation" id="%U7/ssLB@K{w?GXac6uE"><field name="OP">AND</field> <value name="A"><block type="logic_operation" id="rxD%5v6FkUw2Dd8UK^,|"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="pu}}GxJVypYOvhDz[kO?"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="@Hh#%sDM^-!K,}7.Gc"><field name="ATTR">val</field> <field name="OID">hm-rpc.0.OEQ00xxxxx.3.STATE</field></block></value> <value name="B"><block type="logic_boolean" id="81QKe),@wLJT,HAUM~6"><field name="BOOL">TRUE</field></block></value></block></value>
                          <value name="B"><block type="logic_compare" id=".eUot{-T1D9k?.ni=iU"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id="k28j!u)gAIcAIQ6a9n+i"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.OEQ00xxxxx.2.STATE</field></block></value>
                          <value name="B"><block type="logic_boolean" id="Fvf6~M484;pxH;2Z5I=M"><field name="BOOL">FALSE</field></block></value></block></value></block></value>
                          <value name="B"><block type="logic_compare" id="n%%Wx]js)VJ-dCQoj_jL"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id="^k?HXz!Kv]E[CfYd|6s6"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.OEQ00xxxxx.1.STATE</field></block></value>
                          <value name="B"><block type="logic_boolean" id="Ew+r1C#5n0O,^a(NvG"><field name="BOOL">FALSE</field></block></value></block></value></block></value>
                          <statement name="DO0"><block type="variables_set" id="-xg=d8Aon{?Y|c@X4Ft"><field name="VAR">aktuelleStufe</field> <value name="VALUE"><block type="math_number" id="zCYBXO[xYo.h/,a~]nH8"><field name="NUM">1</field></block></value></block></statement> <value name="IF1"><block type="logic_operation" id="Oh|dQZ4R-#z:RRDxPR"><field name="OP">AND</field> <value name="A"><block type="logic_operation" id="X:G0tTm@/*6Y:lXp#)#i"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="Xe!LI?{q!ad^MoUQgcnp"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="jKW_z+(6trsx?%LAV!14"><field name="ATTR">val</field> <field name="OID">hm-rpc.0.OEQ00xxxxx.3.STATE</field></block></value> <value name="B"><block type="logic_boolean" id="?Gk4ZSeJt{FRP?uSAlMN"><field name="BOOL">FALSE</field></block></value></block></value> <value name="B"><block type="logic_compare" id="Id}d:|(tKYMOGSQr](-T"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="onx1;_t~N?_X!j*0Ke|"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.OEQ00xxxxx.2.STATE</field></block></value>
                          <value name="B"><block type="logic_boolean" id="Id,?3v|1rk4.ePig#I=
                          "><field name="BOOL">TRUE</field></block></value></block></value></block></value>
                          <value name="B"><block type="logic_compare" id="aLJZnfRx0%tsVgs2s.^y"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id=":+kgT3/,uZnH199@#0}="><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.OEQ00xxxxx.1.STATE</field></block></value>
                          <value name="B"><block type="logic_boolean" id="utaI6yNIj*}fUEK)zBf!"><field name="BOOL">FALSE</field></block></value></block></value></block></value>
                          <statement name="DO1"><block type="variables_set" id="bWWI/DOve=fycpw+l|AP"><field name="VAR">aktuelleStufe</field>
                          <value name="VALUE"><block type="math_number" id="1+vRh{rH/}!V*)e1Y*)w"><field name="NUM">2</field></block></value></block></statement>
                          <value name="IF2"><block type="logic_operation" id="3{5q~GYMRYSJNeyNa/_)"><field name="OP">AND</field>
                          <value name="A"><block type="logic_operation" id="5d!%D4eLKyd*Wl,9%5sP"><field name="OP">AND</field>
                          <value name="A"><block type="logic_compare" id="J7c8;TB4(N~h|D~,G3-"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id="JRwK(-JXUc!k-;VWPDd"><field name="ATTR">val</field> <field name="OID">hm-rpc.0.OEQ00xxxxx.3.STATE</field></block></value> <value name="B"><block type="logic_boolean" id="UB[@m)2v,kCpWb5,g9mC"><field name="BOOL">FALSE</field></block></value></block></value> <value name="B"><block type="logic_compare" id="RaQbrHIg|(~WO}A4zTUJ"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="ulN}U[ESTSdA%2J{qopV"><field name="ATTR">val</field> <field name="OID">hm-rpc.0.OEQ00xxxxx.2.STATE</field></block></value> <value name="B"><block type="logic_boolean" id="vlA!9|viuY_ULMb8ESK4"><field name="BOOL">FALSE</field></block></value></block></value></block></value> <value name="B"><block type="logic_compare" id=")O?jo?IgpDs75;v2g:Z"><field name="OP">EQ</field>
                          <value name="A"><block type="get_value" id="j~E9sxzG:cqBf0RYcm%b"><field name="ATTR">val</field>
                          <field name="OID">hm-rpc.0.OEQ00xxxxx.1.STATE</field></block></value>
                          <value name="B"><block type="logic_boolean" id="NBO]3MYKZl+(4|%-Dp-K"><field name="BOOL">TRUE</field></block></value></block></value></block></value>
                          <statement name="DO2"><block type="variables_set" id="MPt:;#[AHLF~(+fy8ziz"><field name="VAR">aktuelleStufe</field>
                          <value name="VALUE"><block type="math_number" id="32b:ot?8DR+?BwO
                          ,hI="><field name="NUM">3</field></block></value></block></statement></block></next></block></statement></block></xml>

                          
                          Gruß anselra
                          1 Reply Last reply Reply Quote 0
                          • rantanplan
                            rantanplan last edited by

                            Vielleicht noch ein Tip für die Optik.

                            Ich finde die ellenlangen UND Verbindungen immer recht unübersichtlich.

                            Wenn man einen UND/ODER Baustein mit der rechten Maustaste anklickt, kann man "externe Eingänge" anwählen.

                            Dann werden die Bedingungen untereinander angezeigt.
                            147_beispiel.png

                            Grüße

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            564
                            Online

                            31.7k
                            Users

                            79.8k
                            Topics

                            1.3m
                            Posts

                            3
                            12
                            1064
                            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