Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [Gelößt] Hilfe brauche ein Script

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.9k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.2k

[Gelößt] Hilfe brauche ein Script

Geplant Angeheftet Gesperrt Verschoben Blockly
31 Beiträge 6 Kommentatoren 1.7k Aufrufe 5 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • W Offline
    W Offline
    winny1900
    schrieb am zuletzt editiert von
    #21

    12345.PNG

    Der ansatz ist doch richtig. Der soll den wert in den neu angelegten Datenpunkt schreiben. Wenn ich da Liste eintrage schreibt der mir 3 Werte da rein.
    Wie bekomme ich das gelößt ?

    Ich mus auf jedenfall einen zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

    Grüße

    paul53P 1 Antwort Letzte Antwort
    0
    • W winny1900

      12345.PNG

      Der ansatz ist doch richtig. Der soll den wert in den neu angelegten Datenpunkt schreiben. Wenn ich da Liste eintrage schreibt der mir 3 Werte da rein.
      Wie bekomme ich das gelößt ?

      Ich mus auf jedenfall einen zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

      Grüße

      paul53P Offline
      paul53P Offline
      paul53
      schrieb am zuletzt editiert von
      #22

      @winny1900 sagte:

      zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

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

      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

      1 Antwort Letzte Antwort
      0
      • paul53P paul53

        @winny1900 sagte:

        Wie bekomme ich diese Zahl jetzt in VIS ?

        Erstelle unter javascript.0 zwei Datenpunkte vom Typ Zahl. Die kannst Du in Vis anzeigen.
        Hier noch eine einfachere Variante in Blockly:

        Blockly_json_temp_hum.JPG

        <xml xmlns="http://www.w3.org/1999/xhtml">
          <variables>
            <variable type="" id="^qm4e^`2czKZoH]v$#fl">svalue</variable>
          </variables>
          <block type="comment" id="9n9v:t+^YMFN!FcVt%`," x="-412" y="37">
            <field name="COMMENT">mqtt.0.domoticz.in</field>
            <next>
              <block type="on_ext" id="GT`:hBV!3yxgm!|!K~71">
                <mutation items="1"></mutation>
                <field name="CONDITION">ne</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="QsKav`scUw[F2b`k4|:0">
                    <field name="oid">default</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="variables_set" id="Oj_j6{/t`(UmgHca?z{h">
                    <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                    <value name="VALUE">
                      <block type="lists_split" id="BWP{vz7kklj8g/$9Z9w1">
                        <mutation mode="SPLIT"></mutation>
                        <field name="MODE">SPLIT</field>
                        <value name="INPUT">
                          <block type="get_attr" id=".(zz43SmwgHL-7;k06`A">
                            <value name="PATH">
                              <shadow type="text" id="p3x_XG,@)4*`}n1$EPK!">
                                <field name="TEXT">svalue</field>
                              </shadow>
                            </value>
                            <value name="OBJECT">
                              <block type="on_source" id="{ci9/]DbojUFy#dg!346">
                                <field name="ATTR">state.val</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="DELIM">
                          <shadow type="text" id="mVDhf?jm!P!+1axeKFt7">
                            <field name="TEXT">;</field>
                          </shadow>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="comment" id="vlRRKrcDW%0k~i/!$qCg">
                        <field name="COMMENT">Temperatur</field>
                        <next>
                          <block type="update" id="bEl[~{A}71F!?sOPMSE#">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">Object ID</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="convert_tonumber" id="q4kt:./.w7)aJ@R]Hrdm">
                                <value name="VALUE">
                                  <block type="lists_getIndex" id="c{lQ3iLBC_o=6LI!9r7j">
                                    <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="C.*hD-!6honAqqOr`{uk">
                                        <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                      </block>
                                    </value>
                                    <value name="AT">
                                      <block type="math_number" id="j}{GiOwS*(,Zgm2]Kcr:">
                                        <field name="NUM">1</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="comment" id="7:hpc2shYp-{jw${9Owx">
                                <field name="COMMENT">Luftfeuchtigkeit</field>
                                <next>
                                  <block type="update" id="zJiYj1wb9T6W[3{b:ip}">
                                    <mutation delay_input="false"></mutation>
                                    <field name="OID">Object ID</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="convert_tonumber" id="59Kp#ayU+-[lR:fq23M8">
                                        <value name="VALUE">
                                          <block type="lists_getIndex" id="uJH|GQie1lqx|6%EqSpH">
                                            <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="!2HC:9{c}JjO~-b?(bV}">
                                                <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                              </block>
                                            </value>
                                            <value name="AT">
                                              <block type="math_number" id="G,t04Tbinp}-ph0J;r|~">
                                                <field name="NUM">2</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </xml>
        
        

        W Offline
        W Offline
        winny1900
        schrieb am zuletzt editiert von
        #23

        @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)

        paul53P 1 Antwort Letzte Antwort
        0
        • W winny1900

          @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)

          paul53P Offline
          paul53P Offline
          paul53
          schrieb am zuletzt editiert von paul53
          #24

          @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.

          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

          W 1 Antwort Letzte Antwort
          0
          • paul53P 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 Offline
            W Offline
            winny1900
            schrieb am zuletzt editiert von
            #25

            @paul53 1234.PNG

            hatte ich auch aber klappt nicht !

            paul53P 1 Antwort Letzte Antwort
            0
            • W winny1900

              @paul53 1234.PNG

              hatte ich auch aber klappt nicht !

              paul53P Offline
              paul53P Offline
              paul53
              schrieb am zuletzt editiert von
              #26

              @winny1900 sagte:

              klappt nicht !

              Poste mal den Javascript-Code zu dem Blockly.

              Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
              Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

              1 Antwort Letzte Antwort
              0
              • W Offline
                W Offline
                winny1900
                schrieb am zuletzt editiert von
                #27
                <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>
                
                paul53P 1 Antwort Letzte Antwort
                0
                • W winny1900
                  <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>
                  
                  paul53P Offline
                  paul53P Offline
                  paul53
                  schrieb am zuletzt editiert von paul53
                  #28

                  @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.

                  Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                  Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                  W 1 Antwort Letzte Antwort
                  0
                  • paul53P 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 Offline
                    W Offline
                    winny1900
                    schrieb am zuletzt editiert von
                    #29

                    @paul53

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

                    1 Antwort Letzte Antwort
                    0
                    • W Offline
                      W Offline
                      winny1900
                      schrieb am zuletzt editiert von
                      #30

                      So eins noch . Versprochen !!!

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

                      Wie lösen wir das ?

                      1 Antwort Letzte Antwort
                      0
                      • W Offline
                        W Offline
                        winny1900
                        schrieb am zuletzt editiert von
                        #31

                        Schon erledigt habe was überlesen. War unter einstellungen.

                        1 Antwort Letzte Antwort
                        0
                        Antworten
                        • In einem neuen Thema antworten
                        Anmelden zum Antworten
                        • Älteste zuerst
                        • Neuste zuerst
                        • Meiste Stimmen


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        798

                        Online

                        32.4k

                        Benutzer

                        81.4k

                        Themen

                        1.3m

                        Beiträge
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                        ioBroker Community 2014-2025
                        logo
                        • Anmelden

                        • Du hast noch kein Konto? Registrieren

                        • Anmelden oder registrieren, um zu suchen
                        • Erster Beitrag
                          Letzter Beitrag
                        0
                        • Home
                        • Aktuell
                        • Tags
                        • Ungelesen 0
                        • Kategorien
                        • Unreplied
                        • Beliebt
                        • GitHub
                        • Docu
                        • Hilfe