Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Gelößt] Hilfe brauche ein Script

    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

    [Gelößt] Hilfe brauche ein Script

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

      @winny1900 sagte:

      zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

      Schau mal in den Post davor: Die Variable Liste heißt dort svalue.

      1 Reply Last reply Reply Quote 0
      • W
        winny1900 @paul53 last edited by

        @paul53

        bei aktualisiere Objekt ID kommt domoticz rein oder ?

        Weil das Script bei mir nicht läuft.

        17:30:05.712 error javascript.0 script.js.common.Test_2: Cannot get svalue of undefined
        17:30:05.713 error javascript.0 at Object.<anonymous> (script.js.common.Test_2:7:35)

        paul53 1 Reply Last reply Reply Quote 0
        • paul53
          paul53 @winny1900 last edited by paul53

          @winny1900 sagte in Hilfe brauche ein Script:

          bei aktualisiere Objekt ID kommt domoticz rein oder ?

          Nein, beim ersten kommt die ID des Datenpunktes für die Temperaturanzeige und beim zweiten für die Feuchteanzeige rein (steht im Kommentar darüber). domoticz/in kommt beim Trigger rein.

          W 1 Reply Last reply Reply Quote 0
          • W
            winny1900 @paul53 last edited by

            @paul53 1234.PNG

            hatte ich auch aber klappt nicht !

            paul53 1 Reply Last reply Reply Quote 0
            • paul53
              paul53 @winny1900 last edited by

              @winny1900 sagte:

              klappt nicht !

              Poste mal den Javascript-Code zu dem Blockly.

              1 Reply Last reply Reply Quote 0
              • W
                winny1900 last edited by

                <xml xmlns="http://www.w3.org/1999/xhtml">
                  <variables>
                    <variable type="" id="M3M(d4mStWF20,0YTs8-">svalue</variable>
                    <variable type="" id="rXRrCB6TjAFBN}u0m?94">Wert</variable>
                  </variables>
                  <block type="on_ext" id="?0aUoyJ54YONx4lpTknk" x="-62" y="38">
                    <mutation items="1"></mutation>
                    <field name="CONDITION">ne</field>
                    <field name="ACK_CONDITION"></field>
                    <value name="OID0">
                      <shadow type="field_oid" id="X@|.GI#NMkm!tpElg:0N">
                        <field name="oid">mqtt.0.domoticz.in</field>
                      </shadow>
                      <block type="field_oid" id="=|F.L85D:FZ~uR(VAqL9">
                        <field name="oid">mqtt.0.domoticz.in</field>
                      </block>
                    </value>
                    <statement name="STATEMENT">
                      <block type="variables_set" id=",$-$oLn`tLQuKnm=HAP?">
                        <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                        <value name="VALUE">
                          <block type="lists_split" id="7:n2~,g/#UErIRm78!bd">
                            <mutation mode="SPLIT"></mutation>
                            <field name="MODE">SPLIT</field>
                            <value name="INPUT">
                              <block type="get_attr" id="P6Gq~]6C.+XQ}:j%rL!Q">
                                <value name="PATH">
                                  <shadow type="text" id="UA6bAniM.d`]{i.G)AUU">
                                    <field name="TEXT">svalue</field>
                                  </shadow>
                                  <block type="text" id="/]q34ws4q$)`qxanFm83">
                                    <field name="TEXT">svalue</field>
                                  </block>
                                </value>
                                <value name="OBJECT">
                                  <block type="variables_get" id="#8(Jdx2lV75rL:?gh}!A">
                                    <field name="VAR" id="rXRrCB6TjAFBN}u0m?94" variabletype="">Wert</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="DELIM">
                              <shadow type="text" id="YI.KKD*:?hqMram{#d:R">
                                <field name="TEXT">;</field>
                              </shadow>
                              <block type="text" id=",XR}u%x}l|~rfkM?eg/.">
                                <field name="TEXT">;</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="update" id="+Qw~Z-c]b(7XXG;SQ=,-">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">javascript.0.Außentemp</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="convert_tonumber" id=",KQE85]PB{DEo.#kx,1B">
                                <value name="VALUE">
                                  <block type="lists_getIndex" id="R+k,Tks}7GP2k!0U7x)8">
                                    <mutation statement="false" at="true"></mutation>
                                    <field name="MODE">GET</field>
                                    <field name="WHERE">FROM_START</field>
                                    <value name="VALUE">
                                      <block type="variables_get" id="wZ6)t!iOCh%It;@{4GZ$">
                                        <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                      </block>
                                    </value>
                                    <value name="AT">
                                      <block type="math_number" id="5_zkgF{7ky)jKLqU|;lA">
                                        <field name="NUM">1</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="update" id="idUi)E`+(nGu=!Zgf}L`">
                                <mutation delay_input="false"></mutation>
                                <field name="OID">javascript.0.Außenluftfeuchte</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="convert_tonumber" id="(hT.wec}=+(x8(|n@ckG">
                                    <value name="VALUE">
                                      <block type="lists_getIndex" id="|y-mRDdVe%`abvj`+39I">
                                        <mutation statement="false" at="true"></mutation>
                                        <field name="MODE">GET</field>
                                        <field name="WHERE">FROM_START</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="|1kG5WAlJ35yF,10|i-h">
                                            <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                          </block>
                                        </value>
                                        <value name="AT">
                                          <block type="math_number" id="7)gDqXV+Lv~A9(v,]*;}">
                                            <field name="NUM">2</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </xml>
                
                paul53 1 Reply Last reply Reply Quote 0
                • paul53
                  paul53 @winny1900 last edited by paul53

                  @winny1900 Wert ist keine Variable, sondern eine Eigenschaft des Triggerdatenpunktes (unter Blöcke Trigger) !
                  Du kannst auch die Variable Wert umbenennen nach value, damit es funktioniert.

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    winny1900 @paul53 last edited by

                    @paul53

                    DANKE !! Danke für dein Geduld es Klappt !!!!

                    1 Reply Last reply Reply Quote 0
                    • W
                      winny1900 last edited by

                      So eins noch . Versprochen !!!

                      Unter JAvascript null zeigt der mir bei der Temp 17 % an statt Grad ?

                      Wie lösen wir das ?

                      1 Reply Last reply Reply Quote 0
                      • W
                        winny1900 last edited by

                        Schon erledigt habe was überlesen. War unter einstellungen.

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        433
                        Online

                        31.8k
                        Users

                        80.0k
                        Topics

                        1.3m
                        Posts

                        6
                        31
                        1251
                        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