Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Blockly Anwesenheit Ble.0 Adapter Mi Band Problem ( Gelöst )

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Blockly Anwesenheit Ble.0 Adapter Mi Band Problem ( Gelöst )

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

      Hab mal dieses Blocky :
      anwesend1.jpg


      <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
      <variable id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="variables_set" id="Ufc^7Tg^$.Yj/r*[lVuk" x="13" y="13"> <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
      <value name="VALUE">
      <block type="logic_boolean" id="roJ~Uigo|5*+ahNK,_">
      <field name="BOOL">TRUE</field>
      </block>
      </value>
      <next>
      <block type="on" id="ogPjCIwOw.8o=@RUnwT">
      <field name="OID">ble.0.f2:55:92:c3:13:0d.rssi</field>
      <field name="CONDITION">any</field>
      <field name="ACK_CONDITION"></field>
      <statement name="STATEMENT">
      <block type="timeouts_cleartimeout" id="S/QlljbFlTqk6PBofij?">
      <field name="NAME">timeout</field>
      <next>
      <block type="controls_if" id="y[yC:Mo#:lD~(wpQcQ7H">
      <value name="IF0">
      <block type="logic_negate" id="6$
      !vu^C9Go:bUd#Y3S)">
      <value name="BOOL">
      <block type="variables_get" id="g.8[?4eQ3{4YuqN=Lk">
      <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="}o4z!3h9I$i+{7RMB5q">
      <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field> <value name="VALUE"> <block type="logic_boolean" id="Lj/{P=rbVmWU.wHFMkEg"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="}W*WRq1:Pr-w2F^Btcr}"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Diverse.Test.Anwesenheit-MiBand</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="Y?PT1pL8~gzwAJHhQ!Z">
      <field name="BOOL">TRUE</field>
      </block>
      </value>
      <next>
      <block type="debug" id="%rfT]WDUYS7Vmwi}SMp"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="ra;wNRDryR%^{05VA^,E"> <field name="TEXT">Bin zu Hause. Mi Band</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="timeouts_settimeout" id="ZaZMXpJ6h^]D{}~YZl;">
      <field name="NAME">timeout</field>
      <field name="DELAY">30</field>
      <field name="UNIT">sec</field>
      <statement name="STATEMENT">
      <block type="controls_if" id="2tr1HC@()p9?Ux]9}4,9">
      <value name="IF0">
      <block type="variables_get" id="0N:y0M5h8K]HZE6Wp81.">
      <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field> </block> </value> <statement name="DO0"> <block type="variables_set" id=",Qcig],)rM(g@[CbA4xG"> <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
      <value name="VALUE">
      <block type="logic_boolean" id="W!_OqMp3t,q$/xO%?[R"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="QLOH$5Pzb}?zyph2juv4"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Diverse.Test.Anwesenheit-MiBand</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="ZpCO,,vd8++-OYh@Zh1y"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id=".C(S$pWa+l-3n+r7WE.;"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id=",%f6+ikK)G-ztOiQ-YP">
      <field name="TEXT">Bin dann mal weg. Mi Band</field>
      </shadow>
      </value>
      </block>
      </next>
      </block>
      </next>
      </block>
      </statement>
      </block>
      </statement>
      </block>
      </next>
      </block>
      </next>
      </block>
      </statement>
      </block>
      </next>
      </block>
      <block type="create" id="Go.K(A.5u){y(mr/[pUM" x="113" y="662">
      <field name="NAME">0_userdata.0.Diverse.Test.Anwesenheit-MiBand</field>
      </block>
      </xml>

      Die Ausgabe in den Logs:
      anwesend2.jpg
      Soweit funktioniert das ja wohl, wenn ich das Richtig verstehe.
      Aber warum Ändert sich der Datenpunkt nicht?
      anwesend3.jpg

      Kann mir mal jemand lweiterhelfen?
      Ich Danke schon mal im vorab

      DJMarc75 paul53 2 Replies Last reply Reply Quote 0
      • DJMarc75
        DJMarc75 @Walter.O. last edited by DJMarc75

        @walter-o sagte in Blockly Anwesenheit Ble.0 Adapter Mi Band Problem:

        Aber warum Ändert sich der Datenpunkt nicht?

        Was steht im LOG ?
        Welcher TYP hat Dein Datenpunkt ? Eher nicht Boolean vermute ich 🙂

        1 Reply Last reply Reply Quote 0
        • paul53
          paul53 @Walter.O. last edited by

          @walter-o sagte: Aber warum Ändert sich der Datenpunkt nicht?

          Der Wert des Trigger-DP (RSSI) wird nicht ausgewertet.

          Walter.O. 1 Reply Last reply Reply Quote 1
          • Walter.O.
            Walter.O. @paul53 last edited by

            @paul53
            Ich gehe davon aus das der Trigger-DP (RSSI) ausgewertet wurde , denn das würde erklären das sich
            die werte im Log :
            script.js.common.Tracking.test-mi-band: Bin zu Hause. Mi Band
            script.js.common.Tracking.test-mi-band: Bin dann mal weg. Mi Band
            dahingehend verändern wenn ich die Reichwerte des Ble scanners verlasse

            W paul53 2 Replies Last reply Reply Quote 0
            • W
              wolfi913 @Walter.O. last edited by

              @walter-o

              Schau mal (Stift hinter dem Datenpunkt) ob dieser wirklich auf "boolean" steht (Logikwert für wahr/falsch)
              Screenshot 2024-01-30 232820.png
              und ändere das ggf. ab.

              Walter.O. 1 Reply Last reply Reply Quote 0
              • Walter.O.
                Walter.O. @wolfi913 last edited by Walter.O.

                @wolfi913
                So, der Zustands Typ stand auf Gemischt, habe ich auf Bolean Logigwert geändert.
                Ergebniss, keine Änderung bei True False

                1 Reply Last reply Reply Quote 0
                • paul53
                  paul53 @Walter.O. last edited by paul53

                  @walter-o sagte: Ich gehe davon aus das der Trigger-DP (RSSI) ausgewertet wurde

                  Wo?

                  EDIT: Es sollte etwa so aussehen:

                  Blockly_temp.JPG

                  <xml xmlns="https://developers.google.com/blockly/xml">
                   <variables>
                     <variable id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</variable>
                     <variable type="timeout" id="timeout">timeout</variable>
                   </variables>
                   <block type="variables_set" id="Ufc^7Tg^$.Yj/r*[lVuk" x="13" y="13">
                     <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="roJ~Uigo|5*+ahNK,_">
                         <field name="BOOL">TRUE</field>
                       </block>
                     </value>
                     <next>
                       <block type="on" id="ogPjCIwOw.8o=@RUnwT">
                         <field name="OID">ble.0.f2:55:92:c3:13:0d.rssi</field>
                         <field name="CONDITION">ne</field>
                         <field name="ACK_CONDITION"></field>
                         <statement name="STATEMENT">
                           <block type="controls_if" id="snNGA}vmf{sH}zRjpUJ3">
                             <mutation elseif="1"></mutation>
                             <value name="IF0">
                               <block type="logic_compare" id="6?|Hp=l-94A_]OSZ^I.Z">
                                 <field name="OP">GT</field>
                                 <value name="A">
                                   <block type="on_source" id="aycQRX!J/=_[(d]8}ZYN">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="I1V/qF/%}B2C[/sH)/J{">
                                     <field name="NUM">-60</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="timeouts_cleartimeout" id="S/QlljbFlTqk6PBofij?">
                                 <field name="NAME">timeout</field>
                                 <next>
                                   <block type="controls_if" id="y[yC:Mo#:lD~(wpQcQ7H">
                                     <value name="IF0">
                                       <block type="logic_negate" id="6$!vu^C9Go:bUd#Y3S)">
                                         <value name="BOOL">
                                           <block type="variables_get" id="g.8[?4eQ3{4YuqN=Lk">
                                             <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="variables_set" id="}o4z!3h9I$i+{7RMB5q">
                                         <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
                                         <value name="VALUE">
                                           <block type="logic_boolean" id="Lj/{P=rbVmWU.wHFMkEg">
                                             <field name="BOOL">TRUE</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="control" id="}W*WRq1:Pr-w2F^Btcr}">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">0_userdata.0.Diverse.Test.Anwesenheit-MiBand</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="logic_boolean" id="Y?PT1pL8~gzwAJHhQ!Z">
                                                 <field name="BOOL">TRUE</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="debug" id="%rfT]WDUYS7Vmwi}SMp">
                                                 <field name="Severity">log</field>
                                                 <value name="TEXT">
                                                   <shadow type="text" id="ra;wNRDryR%^{05VA^,E">
                                                     <field name="TEXT">Bin zu Hause. Mi Band</field>
                                                   </shadow>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                             <value name="IF1">
                               <block type="logic_compare" id="tVHsGQ;~Pi=;/da0-h/)">
                                 <field name="OP">GT</field>
                                 <value name="A">
                                   <block type="on_source" id="$zYu3;@4iZPL#yI+ia$%">
                                     <field name="ATTR">oldState.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="kLBF!%+a7Umfs*,iHrRJ">
                                     <field name="NUM">-60</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO1">
                               <block type="timeouts_settimeout" id="ZaZMXpJ6h^]D{}~YZl;">
                                 <field name="NAME">timeout</field>
                                 <field name="DELAY">30</field>
                                 <field name="UNIT">sec</field>
                                 <statement name="STATEMENT">
                                   <block type="controls_if" id="2tr1HC@()p9?Ux]9}4,9">
                                     <value name="IF0">
                                       <block type="variables_get" id="0N:y0M5h8K]HZE6Wp81.">
                                         <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="variables_set" id=",Qcig],)rM(g@[CbA4xG">
                                         <field name="VAR" id="]%[Pv~2OU1w5nijZ:/I">Anwesenheit</field>
                                         <value name="VALUE">
                                           <block type="logic_boolean" id="W!_OqMp3t,q$/xO%?[R">
                                             <field name="BOOL">FALSE</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="control" id="QLOH$5Pzb}?zyph2juv4">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">0_userdata.0.Diverse.Test.Anwesenheit-MiBand</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="logic_boolean" id="ZpCO,,vd8++-OYh@Zh1y">
                                                 <field name="BOOL">FALSE</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="debug" id=".C(S$pWa+l-3n+r7WE.;">
                                                 <field name="Severity">log</field>
                                                 <value name="TEXT">
                                                   <shadow type="text" id=",%f6+ikK)G-ztOiQ-YP">
                                                     <field name="TEXT">Bin dann mal weg. Mi Band</field>
                                                   </shadow>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </statement>
                               </block>
                             </statement>
                           </block>
                         </statement>
                       </block>
                     </next>
                   </block>
                  </xml>
                  

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

                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  629
                  Online

                  32.0k
                  Users

                  80.4k
                  Topics

                  1.3m
                  Posts

                  4
                  7
                  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