Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Selbst Objekte erstellen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Selbst Objekte erstellen

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

      Hallo ich bin jetzt nun seit knapp 8 Stunden ab tüffteln im Io

      Nach einer Suche von knapp 3 Stunden wie ich selbst Objekte erstelle weiß ich nicht mehr weiter und wende mich an euch.
      Erstellen kann ich ein Objekt unter Javascript.0 gebe hier auch ihn als Logikwert an. So und nun?? ich kann ihn weder mit true noch false steuern (Versuche ich sowohl Manuell als auch per Blockly)

      Anmerkung (Ich bin ein echter Anfänger bitte wenn ihr Ideen oder Ansätze habe erklärt die für mich doofie)

      arteck 1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active @Crusher94 last edited by arteck

        @Crusher94

        createState('schalte_mich', false, {
          read: true, 
          write: true, 
          name: "mein text", 
          type: "boolean", 
          def: false
        });
        
        1 Reply Last reply Reply Quote 0
        • C
          Crusher94 last edited by Crusher94

          Hey @arteck erstmal vielen Dank für deine Antwort, diesen Programmschnipsel habe ich auch schon gefunden gehabt
          aber damit kann ich kein Blockly Block importieren, oder was mache ich jetzt genau damit?

          Edit:
          Damit ich es deutlicher wird was ich machen möchte. Ich möchte mehre Objekte prüfen auf False (recht große und kette) und damit ein Objekt dann auf false setzen damit textToCommand das verarbeiten kann.

          So dachte ich funktioniert das vielleicht

          <xml xmlns="http://www.w3.org/1999/xhtml">
           <block type="on_ext" id="S_2*%IGVZf/B5-nXC%*R" x="-313" y="-138">
             <mutation items="1"></mutation>
             <field name="CONDITION">any</field>
             <field name="ACK_CONDITION"></field>
             <value name="OID0">
               <shadow type="field_oid" id="JK$A/,.8i~C;bC)L)3M3">
                 <field name="oid">telegram.0.communicate.request</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="~^8JLnZU8tK$JenDwFu7">
                 <mutation elseif="1"></mutation>
                 <value name="IF0">
                   <block type="logic_operation" id="/%+0;YK_.OvY/Otd.dbu">
                     <field name="OP">AND</field>
                     <value name="A">
                       <block type="logic_compare" id="_@HI:v|9gu_6B!pt/=k-">
                         <field name="OP">EQ</field>
                         <value name="A">
                           <block type="get_value" id="z{y[BB^jI}0R+]qr)L}|">
                             <field name="ATTR">val</field>
                             <field name="OID">yeelight-2.0.ceiling1-0x0000000003ba750b.control.power</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_boolean" id="o;{ho;f+rP15|Hp#KLke">
                             <field name="BOOL">FALSE</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_operation" id="xvxt4OZ?FLTaPrVl{@;i">
                         <field name="OP">AND</field>
                         <value name="A">
                           <block type="logic_compare" id="t9i9HXrgoa5}b#9,6n]/">
                             <field name="OP">EQ</field>
                             <value name="A">
                               <block type="get_value" id="Yj8NrD?XsBRmG/yfoD%E">
                                 <field name="ATTR">val</field>
                                 <field name="OID">sonoff.1.Badspiegel.POWER</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_boolean" id="}QuonxDI18cI$zgH}Ye0">
                                 <field name="BOOL">FALSE</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id="~^i+`?3r1aWSM=lSdI8q">
                             <field name="OP">EQ</field>
                             <value name="A">
                               <block type="get_value" id="a:O[2i(F!G)tCtn|#!ph">
                                 <field name="ATTR">val</field>
                                 <field name="OID">hue.0.Philips_hue.All.anyOn</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_boolean" id="rSLKuJ4wk$9%jla$kd(w">
                                 <field name="BOOL">FALSE</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="control_ex" id=":Wq^VgZ0qj=QjNF2Ik8w">
                     <field name="TYPE">false</field>
                     <field name="CLEAR_RUNNING">FALSE</field>
                     <value name="OID">
                       <shadow type="field_oid" id="oGk-CzB7M9v*Dy1?MHB;">
                         <field name="oid">javascript.0.EigeneDatenPunkte.Beleuchtung.AlleLampen</field>
                       </shadow>
                     </value>
                     <value name="VALUE">
                       <shadow type="logic_boolean" id="nI=^tzJZUq[1Ut/rC4sY">
                         <field name="BOOL">FALSE</field>
                       </shadow>
                     </value>
                     <value name="DELAY_MS">
                       <shadow type="math_number" id="1W:/g|zY`)]pdu2%h^z(">
                         <field name="NUM">0</field>
                       </shadow>
                     </value>
                   </block>
                 </statement>
                 <value name="IF1">
                   <block type="logic_operation" id="AUS9^CT3A2ye#!GwEnH+">
                     <field name="OP">OR</field>
                     <value name="A">
                       <block type="logic_compare" id="OHY7p^8uE@.2@07)Mrhp">
                         <field name="OP">EQ</field>
                         <value name="A">
                           <block type="get_value" id="hKUMR$LCC)rYt;LlkD80">
                             <field name="ATTR">val</field>
                             <field name="OID">yeelight-2.0.ceiling1-0x0000000003ba750b.control.power</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_boolean" id="jE*rEkPyiraWF]@_Y0=#">
                             <field name="BOOL">TRUE</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_operation" id="G/|v(s#GQmF|e^eI@C$+">
                         <field name="OP">OR</field>
                         <value name="A">
                           <block type="logic_compare" id="gkHPpB+8:%)b8ln#cOaP">
                             <field name="OP">EQ</field>
                             <value name="A">
                               <block type="get_value" id="~{JMW,QETJ)2V.VLWOp`">
                                 <field name="ATTR">val</field>
                                 <field name="OID">sonoff.1.Badspiegel.POWER</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_boolean" id="L}s;|bSMT%66?US5TGb`">
                                 <field name="BOOL">TRUE</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id="+EhWBD@h?0]QCC[]6D4d">
                             <field name="OP">EQ</field>
                             <value name="A">
                               <block type="get_value" id="~~QQ=;VxvR9A!m`iodRa">
                                 <field name="ATTR">val</field>
                                 <field name="OID">hue.0.Philips_hue.All.anyOn</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_boolean" id="lql(wECv0Usaa)i+Jph~">
                                 <field name="BOOL">TRUE</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO1">
                   <block type="control_ex" id="HU}hz|Vh?MsrG[o`#R!9">
                     <field name="TYPE">false</field>
                     <field name="CLEAR_RUNNING">FALSE</field>
                     <value name="OID">
                       <shadow type="field_oid" id="}+GaPKt}bDTrpUP4NiVk">
                         <field name="oid">javascript.0.EigeneDatenPunkte.Beleuchtung.AlleLampen</field>
                       </shadow>
                     </value>
                     <value name="VALUE">
                       <shadow type="logic_boolean" id=":qi`KGfd~40VG(J-0#($">
                         <field name="BOOL">TRUE</field>
                       </shadow>
                     </value>
                     <value name="DELAY_MS">
                       <shadow type="math_number" id="V8,Z1#_})bwbaMlzRqUr">
                         <field name="NUM">0</field>
                       </shadow>
                     </value>
                   </block>
                 </statement>
               </block>
             </statement>
           </block>
          </xml>
          

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

            blockly bin ich raus..sry

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

            Support us

            ioBroker
            Community Adapters
            Donate

            853
            Online

            32.0k
            Users

            80.4k
            Topics

            1.3m
            Posts

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