Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Felix Merk

    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

    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 10
    • Best 0
    • Groups 1

    Felix Merk

    @Felix Merk

    Starter

    0
    Reputation
    8
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Felix Merk Follow
    Starter

    Latest posts made by Felix Merk

    • RE: JSON Parsen in Blockly (ESP-RFID)

      @fastfoot
      der Erste Teil mit dem Schalten des Shellys läuft schon mal super! Oder fast 🙂
      Ich hab einen "Fehler" den ich nicht nachvollziehen kann:

      blockly14564564.jpg

      oder

      blockly2.JPG

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="" id="smfipXSz7c$2VGi]fdHq">user</variable>
        </variables>
        <block type="on_ext" id="`r[e|Zre^i1M[,4#LQb8" x="13" y="12">
          <mutation items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="p{9:o5Vc#A]O|ijP.6kH">
              <field name="oid">mqtt.0.rfid.leser.send</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="variables_set" id="9zW]qjf1.oJ:*r(`Snhp">
              <field name="VAR" id="smfipXSz7c$2VGi]fdHq" variabletype="">user</field>
              <value name="VALUE">
                <block type="get_attr" id="#OJnwsvskALVr7ICmA7E">
                  <value name="PATH">
                    <shadow type="text" id="?D?b78:-+x}`/|k;DtM;">
                      <field name="TEXT">username</field>
                    </shadow>
                  </value>
                  <value name="OBJECT">
                    <block type="on_source" id="]:H5pqerc{6Gyrkz1+P:">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="5Z}lU*NMnk]zNAgzO*W7">
                  <value name="IF0">
                    <block type="logic_compare" id="CgTx-f8!A72aCn4qgw!4">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="82(vIy)iBDo#^9g7zX`h">
                          <field name="VAR" id="smfipXSz7c$2VGi]fdHq" variabletype="">user</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="text" id="+4Hvp,mBGMnKJVnTj_DY">
                          <field name="TEXT">Felix_Merk</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="controls_if" id="5atN0y`}7v.,-CWFc{7+">
                      <mutation else="1"></mutation>
                      <value name="IF0">
                        <block type="logic_compare" id="t}Prj}J%L_3NhJWc3RFc">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="|2.+HO)ztM2;q[q!I.H6">
                              <field name="ATTR">val</field>
                              <field name="OID">shelly.0.SHSW-1#F4282B#2.Relay0.Switch</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="x-jP*Fd?NV+Sp|hhl_1N">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="control" id="[0Pd9wpD:kB|qifUBtvQ">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">shelly.0.SHSW-1#F4282B#2.Relay0.Switch</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="VR-P7mpXpzO{e0)})fm)">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                        </block>
                      </statement>
                      <statement name="ELSE">
                        <block type="control" id="i9zorrxcYyWgt:Owx]S/">
                          <mutation delay_input="false"></mutation>
                          <field name="OID">shelly.0.SHSW-1#F4282B#2.Relay0.Switch</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="}]GVlr$BK-~JwT1~|tv0">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      
      

      
      BlocklyJavascriptTypeScript
      Protokoll
      Ausgewählte Blöcke exportieren
      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="" id="smfipXSz7c$2VGi]fdHq">user</variable>
        </variables>
        <block type="on_ext" id="`r[e|Zre^i1M[,4#LQb8" x="13" y="12">
          <mutation items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="p{9:o5Vc#A]O|ijP.6kH">
              <field name="oid">mqtt.0.rfid.leser.send</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="variables_set" id="9zW]qjf1.oJ:*r(`Snhp">
              <field name="VAR" id="smfipXSz7c$2VGi]fdHq" variabletype="">user</field>
              <value name="VALUE">
                <block type="get_attr" id="#OJnwsvskALVr7ICmA7E">
                  <value name="PATH">
                    <shadow type="text" id="?D?b78:-+x}`/|k;DtM;">
                      <field name="TEXT">username</field>
                    </shadow>
                  </value>
                  <value name="OBJECT">
                    <block type="on_source" id="]:H5pqerc{6Gyrkz1+P:">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="5Z}lU*NMnk]zNAgzO*W7">
                  <value name="IF0">
                    <block type="logic_compare" id="CgTx-f8!A72aCn4qgw!4">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="82(vIy)iBDo#^9g7zX`h">
                          <field name="VAR" id="smfipXSz7c$2VGi]fdHq" variabletype="">user</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="text" id="+4Hvp,mBGMnKJVnTj_DY">
                          <field name="TEXT">Felix_Merk</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="toggle" id="O^Dz6KQS3aV=x*=SUJHd">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-1#F4282B#2.Relay0.Switch</field>
                      <field name="WITH_DELAY">FALSE</field>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="" id="smfipXSz7c$2VGi]fdHq">user</variable>
        </variables>
        <block type="on_ext" id="`r[e|Zre^i1M[,4#LQb8" x="13" y="12">
          <mutation items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="p{9:o5Vc#A]O|ijP.6kH">
              <field name="oid">mqtt.0.rfid.leser.send</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="variables_set" id="9zW]qjf1.oJ:*r(`Snhp">
              <field name="VAR" id="smfipXSz7c$2VGi]fdHq" variabletype="">user</field>
              <value name="VALUE">
                <block type="get_attr" id="#OJnwsvskALVr7ICmA7E">
                  <value name="PATH">
                    <shadow type="text" id="?D?b78:-+x}`/|k;DtM;">
                      <field name="TEXT">username</field>
                    </shadow>
                  </value>
                  <value name="OBJECT">
                    <block type="on_source" id="]:H5pqerc{6Gyrkz1+P:">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="5Z}lU*NMnk]zNAgzO*W7">
                  <value name="IF0">
                    <block type="logic_compare" id="CgTx-f8!A72aCn4qgw!4">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="82(vIy)iBDo#^9g7zX`h">
                          <field name="VAR" id="smfipXSz7c$2VGi]fdHq" variabletype="">user</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="text" id="+4Hvp,mBGMnKJVnTj_DY">
                          <field name="TEXT">Felix_Merk</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="toggle" id="O^Dz6KQS3aV=x*=SUJHd">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-1#F4282B#2.Relay0.Switch</field>
                      <field name="WITH_DELAY">FALSE</field>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      
      

      Wenn der shelly aus ist (false) und ich hebe den RFID tag ran, geht das Licht an, wie es soll. Wenn ich ich den Tag aber nochmal hinhalte passiert nichts. Erst beim zweiten mal hinhalten (Zeit spielt keine Rolle) geht das Licht wieder aus.
      Lässt sich beliebig oft wiederholen.... beim ausschalten muss ich immer zweimal hinhalten.
      An was liegt das?

      Liebe Grüße

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: JSON Parsen in Blockly (ESP-RFID)

      @fastfoot Danke, werde ich testen und berichten!

      posted in Blockly
      Felix Merk
      Felix Merk
    • JSON Parsen in Blockly (ESP-RFID)

      Hallo,

      ich habe ein Blueboard mit ESP-RFID (https://drive.google.com/file/d/17K6NVxq9r38fufxysGRDTxVwHWs_1wxA/view)
      mittels MQTT in den IOBroker "gezogen".
      Der JSON-String welcher beim auflegen eines RFID-Tags erscheint sieht wie folgt aus:

      {"type":"access","time":1612568936,"isKnown":"true","access":"Always","username":"User_2","uid":"47afa950","door":"esp-rfid"}
      

      Ich würde jetzt gern zwei getrennte Sachen in Blockly (2 Scripte) machen:

      1. Wenn ein bestimmter User (z.B. User_2) sich authentifiziert soll ein Shelly1 geschaltet werden
      2. Es soll gezählt werden wie oft ein User sich in einem Jahr authentifiziert. (z.B. User_2 35x in 2020 und 40x in 2021)

      wie muss ich in Blockly vorgehen - ich weis nicht mal wie ich anfangen soll...?

      Liebe Grüße
      Felix

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: Hilfe bei Blockly Berechnung (Formel)

      @paul53
      kannst du mir das bitte noch als Blockly exportieren?
      Ich finde das Objekt "Falls Objekt" mit zwei "Objekt IDs" nicht.... 😞

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: Hilfe bei Blockly Berechnung (Formel)

      @paul53

      VIELEN HERZLICHEN DANK! Ich werde das heute Abend gleich testen

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: Hilfe bei Blockly Berechnung (Formel)

      @paul53
      vielen Dank für deine Hilfe!

      Ich bin absoluter Einsteiger auf dem Gebiet - mit JS kenn ich mich gar nicht aus!
      Ziel wäre es die ermittelten Werte in ein erstellten Datenpunkt zu schreiben - kannst du mir da helfen?

      Gruß
      Felix

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: Hilfe bei Blockly Berechnung (Formel)

      @amg_666

      ...habe ich befürchtet 🙂
      Könntest du mal überprüfen ob die einzelnen Terme so noch korrekt sind?
      Wegen Operatorrangfolge usw.?

      Ich seh den Wald vor Bäumen nicht mehr 🙂

      Liebe Grüße

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: Hilfe bei Blockly Berechnung (Formel)

      @paul53
      Hallo Paul, es geht ums Bogenmaß

      Liebe Grüße

      posted in Blockly
      Felix Merk
      Felix Merk
    • RE: Hilfe bei Blockly Berechnung (Formel)

      @amg_666
      guter Ansatz!

      Kann das mal jemand für mich überprüfen? Wie mache ich in Blockly einen Wert hoch 2/3 ? bzw. Wert hoch 1,5?
      Ich habe mir nicht anders zu helfen gewusst als: Wurzel Wert * Wurzel Wert * Wurzel Wert....

      Passen die einzelnen Blöcke so?

      Liebe Grüße
      Felix

      Blocly_Feuchtkugel.JPG

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <block type="math_arithmetic" id="3#^r^xtPlR)Ze(MZhI5`" x="-237" y="63">
          <field name="OP">MULTIPLY</field>
          <value name="A">
            <shadow type="math_number" id="JQT5tU%]ZecGlU4@*awi">
              <field name="NUM">1</field>
            </shadow>
            <block type="get_value" id="M6U!t21[|XqPe/uk9_1^">
              <field name="ATTR">val</field>
              <field name="OID">mqtt.0.lift.Sensoren.Temp</field>
            </block>
          </value>
          <value name="B">
            <shadow type="math_number" id="ctjeLIuj!n]T.^UBIQWW">
              <field name="NUM">1</field>
            </shadow>
            <block type="math_trig" id="VGBWu]i-7SAFO9=Uw)z;">
              <field name="OP">ATAN</field>
              <value name="NUM">
                <shadow type="math_number" id="%n@iOcl%Fj,;fghz%OJX">
                  <field name="NUM">45</field>
                </shadow>
                <block type="math_arithmetic" id="rGJezh[AMi$A_)kj!NH~">
                  <field name="OP">MULTIPLY</field>
                  <value name="A">
                    <shadow type="math_number" id="!a3k2S)i6glaeNT**OTo">
                      <field name="NUM">0.151977</field>
                    </shadow>
                  </value>
                  <value name="B">
                    <shadow type="math_number" id="Kij3;EDR[Jp!cPk6@Jmn">
                      <field name="NUM">1</field>
                    </shadow>
                    <block type="math_single" id="x)c4WRRD,p?on.q2m~$C">
                      <field name="OP">ROOT</field>
                      <value name="NUM">
                        <shadow type="math_number" id="$iTr9=`)5Q(=Y0Cqi@Ws">
                          <field name="NUM">9</field>
                        </shadow>
                        <block type="math_arithmetic" id="SF4zMNZRd/H,E0MbSpL)">
                          <field name="OP">ADD</field>
                          <value name="A">
                            <shadow type="math_number" id="k34:6xlfaOTs#H4Egow)">
                              <field name="NUM">1</field>
                            </shadow>
                            <block type="get_value" id="0*I.[p@!RU-;D!Rh/aLr">
                              <field name="ATTR">val</field>
                              <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                            </block>
                          </value>
                          <value name="B">
                            <shadow type="math_number" id="][=AINKNg[LRBk1_?MKa">
                              <field name="NUM">8.313659</field>
                            </shadow>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
            </block>
          </value>
        </block>
        <block type="math_trig" id="+V-kj?2x6$`RZ)f%vW?b" x="-237" y="138">
          <field name="OP">ATAN</field>
          <value name="NUM">
            <shadow type="math_number" id="%n@iOcl%Fj,;fghz%OJX">
              <field name="NUM">45</field>
            </shadow>
            <block type="math_arithmetic" id="5`SS%x)p_[/{f$77@egm">
              <field name="OP">ADD</field>
              <value name="A">
                <shadow type="math_number" id="_/b$!?#yiwjHynAtuT^W">
                  <field name="NUM">0.151977</field>
                </shadow>
                <block type="get_value" id="R_M}a#2AWv/T-p}8]VB4">
                  <field name="ATTR">val</field>
                  <field name="OID">mqtt.0.lift.Sensoren.Temp</field>
                </block>
              </value>
              <value name="B">
                <shadow type="math_number" id="Kij3;EDR[Jp!cPk6@Jmn">
                  <field name="NUM">1</field>
                </shadow>
                <block type="get_value" id="u7PANch2jjl=cS/l9Sdp">
                  <field name="ATTR">val</field>
                  <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                </block>
              </value>
            </block>
          </value>
        </block>
        <block type="math_trig" id="he{#.mO.ew_Jj|@NrNUQ" x="-237" y="188">
          <field name="OP">ATAN</field>
          <value name="NUM">
            <shadow type="math_number" id="%n@iOcl%Fj,;fghz%OJX">
              <field name="NUM">45</field>
            </shadow>
            <block type="math_arithmetic" id="|rt6:r=iER5-yn==dYAN">
              <field name="OP">MINUS</field>
              <value name="A">
                <shadow type="math_number" id="_/b$!?#yiwjHynAtuT^W">
                  <field name="NUM">0.151977</field>
                </shadow>
                <block type="get_value" id="I_YM~GtkSk.ZcItv:lcK">
                  <field name="ATTR">val</field>
                  <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                </block>
              </value>
              <value name="B">
                <shadow type="math_number" id="Kij3;EDR[Jp!cPk6@Jmn">
                  <field name="NUM">1.676331</field>
                </shadow>
              </value>
            </block>
          </value>
        </block>
        <block type="math_arithmetic" id="JX4]@]aB9c(EwR{oon$3" x="-237" y="238">
          <field name="OP">MULTIPLY</field>
          <value name="A">
            <shadow type="math_number" id="#vkPUG*123UyF$x)O8?y">
              <field name="NUM">0.00391838</field>
            </shadow>
          </value>
          <value name="B">
            <shadow type="math_number" id="naGvWi=:s9Msgi2RKbp-">
              <field name="NUM">1</field>
            </shadow>
            <block type="math_arithmetic" id="yb0f##.w@mubL`v}d8*V">
              <field name="OP">MULTIPLY</field>
              <value name="A">
                <shadow type="math_number" id="?IE,Lb;Edgdb)uP;G]jW">
                  <field name="NUM">0.00391838</field>
                </shadow>
                <block type="math_single" id="BzDMFQe,?5qcF7G0JMWi">
                  <field name="OP">ROOT</field>
                  <value name="NUM">
                    <shadow type="math_number" id="5;Ccguw-S`/%7?(d]gO+">
                      <field name="NUM">9</field>
                    </shadow>
                    <block type="get_value" id="-Ok]}n`!4ZLTdA7OkvmN">
                      <field name="ATTR">val</field>
                      <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                    </block>
                  </value>
                </block>
              </value>
              <value name="B">
                <shadow type="math_number" id="p4=SM5($[5bmYk|{Q@`j">
                  <field name="NUM">1</field>
                </shadow>
                <block type="math_arithmetic" id="tg`{E}hi.E*69HEZQV=s">
                  <field name="OP">MULTIPLY</field>
                  <value name="A">
                    <shadow type="math_number" id="14fYOvfMrfVO:38j^HWB">
                      <field name="NUM">1</field>
                    </shadow>
                    <block type="math_single" id="4|UFEN`*Y!7~0Hn^PnV8">
                      <field name="OP">ROOT</field>
                      <value name="NUM">
                        <shadow type="math_number" id="5;Ccguw-S`/%7?(d]gO+">
                          <field name="NUM">9</field>
                        </shadow>
                        <block type="get_value" id=",]75lXE2fU2Z^$ajp%2O">
                          <field name="ATTR">val</field>
                          <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <shadow type="math_number" id="*TL0AUxc%{f4`@ma9Xd{">
                      <field name="NUM">1</field>
                    </shadow>
                    <block type="math_single" id="}QdhKQ++%5x:zmZr`/Og">
                      <field name="OP">ROOT</field>
                      <value name="NUM">
                        <shadow type="math_number" id="5;Ccguw-S`/%7?(d]gO+">
                          <field name="NUM">9</field>
                        </shadow>
                        <block type="get_value" id="l0ER*|O4)jsuX#12kC?~">
                          <field name="ATTR">val</field>
                          <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
            </block>
          </value>
        </block>
        <block type="math_arithmetic" id="|!0iKQdnBo|9J-3PG{-~" x="-238" y="313">
          <field name="OP">MINUS</field>
          <value name="A">
            <shadow type="math_number" id="d$[:Jl#qUw05@:Rg@0*^">
              <field name="NUM">1</field>
            </shadow>
            <block type="math_trig" id="pRz(RdH#(~gNpZ%QNWxB">
              <field name="OP">ATAN</field>
              <value name="NUM">
                <shadow type="math_number" id="%n@iOcl%Fj,;fghz%OJX">
                  <field name="NUM">45</field>
                </shadow>
                <block type="math_arithmetic" id="30Gu!y_WBDf#5k}tjL7l">
                  <field name="OP">MULTIPLY</field>
                  <value name="A">
                    <shadow type="math_number" id="_/b$!?#yiwjHynAtuT^W">
                      <field name="NUM">0.23101</field>
                    </shadow>
                  </value>
                  <value name="B">
                    <shadow type="math_number" id="F`tT#{Vi7*)+f4Vj7L?/">
                      <field name="NUM">1.676331</field>
                    </shadow>
                    <block type="get_value" id="GLH{ph7zme7Ak4!.BT`_">
                      <field name="ATTR">val</field>
                      <field name="OID">mqtt.0.lift.Sensoren.Feuchte</field>
                    </block>
                  </value>
                </block>
              </value>
            </block>
          </value>
          <value name="B">
            <shadow type="math_number" id="|+LJh(sF,bPu-=J]XiBi">
              <field name="NUM">4</field>
            </shadow>
          </value>
        </block>
      </xml>
      
      posted in Blockly
      Felix Merk
      Felix Merk
    • Hilfe bei Blockly Berechnung (Formel)

      Hallo zusammen,
      ich habe ein Problem mit der Mathefunktion von Blockly.
      Ich Messe die Temperatur und Rel. Luffeuchte mit einem BME280 und möchte aus diesen Werten den Feuchtkugeltemperaturwert berechnen.
      dazu gibt es eine Näherungsformel (siehe Bild)
      Ich hab jetzt schon einiges versucht die Formel in Blockly umzusetzen leider ohne Erfolg bzw. mit falschen Ergebnissen...
      Ich denke das irgendwas mit den klammern bzw. dem Exponenten nicht stimmt...?

      Wäre super wenn sich da. Mal jemand mit reindenken könnte!

      Liebe Grüße
      Felix

      Screenshot_20201227_145700.jpg

      posted in Blockly
      Felix Merk
      Felix Merk
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo