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

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Fehler im Blockly Skript?

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    231

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.5k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.3k

Fehler im Blockly Skript?

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
blockly
5 Beiträge 2 Kommentatoren 182 Aufrufe
  • Ä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.
  • surfer09S Offline
    surfer09S Offline
    surfer09
    schrieb am zuletzt editiert von surfer09
    #1

    Hallo zusammen,

    vieleicht kann mir jemand einmal mit meinem Skript zur Weckersteuerung helfen.

    <xml xmlns="https://developers.google.com/blockly/xml">
      <block type="comment" id="=~.x=m%ycv!}CXTHjk2." x="88" y="-187">
        <field name="COMMENT">Weckersteuerung Logitech Squeezebox</field>
        <next>
          <block type="schedule" id="TZ$7DDhrIXUwBtk[x2iG">
            <field name="SCHEDULE">*/30 0-5 * * *</field>
            <statement name="STATEMENT">
              <block type="controls_if" id=".ZHZLZx@Gr`OX^,[ufGi">
                <mutation elseif="2"></mutation>
                <value name="IF0">
                  <block type="logic_operation" id="]pay3y@ae^Q2tSPhxqH]">
                    <field name="OP">OR</field>
                    <value name="A">
                      <block type="logic_operation" id="FsgQ/+^h__4~.|gP~]60">
                        <field name="OP">OR</field>
                        <value name="A">
                          <block type="logic_operation" id="(}/0l4Y#e4[%;IFJsq3q">
                            <field name="OP">OR</field>
                            <value name="A">
                              <block type="logic_compare" id="l3f?)3X.B+vl^~;6]~E3">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="tQVy#gbfCs|spB6U+_k]">
                                    <field name="ATTR">val</field>
                                    <field name="OID">ical.0.events.0.today.Urlaub</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="1howKr:;}Ba5NyEdKo(:">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="V_7cNP-Fy2#%VG:Ah:~w">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="VdKL+)a@$MxKCa]w3;UB">
                                    <field name="ATTR">val</field>
                                    <field name="OID">ical.0.events.0.today.krank</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="N$g*::H4S~nOkr_uwk,_">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="vuITMj+3=a5c8W3y,%dX">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="CJ[Hr0b}D#|q/d#UIoan">
                                <field name="ATTR">val</field>
                                <field name="OID">ical.0.events.0.today.Feiertag</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="ZsiDK9YC%5ZF{d}b,tsc">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_compare" id="J{o_AsZY`M5ZuYqUb!l5">
                        <field name="OP">GTE</field>
                        <value name="A">
                          <block type="time_get" id="P[j!)eL@.hnTfPi1[vH-">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                            <field name="OPTION">wd</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="Nb$Br`3Qp}UH#CVnj9P^">
                            <field name="NUM">6</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="control" id="KJ*0Ac2~HG,%VVSd`)9q">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="text" id="tn!(+5t~$;|NeGKpiDnx">
                        <field name="TEXT">"alarm","enableall"</field>
                      </block>
                    </value>
                    <next>
                      <block type="control" id="yVyC$h}yg+?R5aaV(I~/">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="text" id="!]4]Vg5`TEi$r~cuuZ1O">
                            <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id=":|^7]J]0G~]$~m4@t@n0">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="text" id="B.u6t,yHX4`qWKYb^:~o">
                                <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                              </block>
                            </value>
                            <next>
                              <block type="debug" id="2z/?Y,KZ%b3S|-%z]1$5">
                                <field name="Severity">error</field>
                                <value name="TEXT">
                                  <shadow type="text" id="+V/#[]M@{(eJ22Y2mB=e">
                                    <field name="TEXT">Wecker 1 und 2 aus - (Feiertag, Wochenende, Urlaub, krank)!</field>
                                  </shadow>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <value name="IF1">
                  <block type="logic_operation" id="Gu1_A=Uy)1;#Q#)1urvq">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_compare" id="PG-,d,GSzD5*-4U[$XH4">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="get_value" id="NB_mQV-HCv:/u[DjG)Tg">
                            <field name="ATTR">val</field>
                            <field name="OID">ical.0.events.0.today.Homeoffice</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_boolean" id="w.O/Qv(,_G+$Vh/7F9Yx">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_compare" id="H?Q?w=@O(E}:;XCP~~SL">
                        <field name="OP">LTE</field>
                        <value name="A">
                          <block type="time_get" id="-w7fxDVUui01BZ%YA%-2">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                            <field name="OPTION">wd</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="44qpB5?3EA3z=oLwI-e_">
                            <field name="NUM">5</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO1">
                  <block type="comment" id=":3FGUCm85Eg6#h;fGMb)">
                    <field name="COMMENT">HomeOffice-Wecker2 aktiv setzen, Wecker1 Arbeit aus</field>
                    <next>
                      <block type="control" id="aYo4E[AjnOIK0+z=]Q8=">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="text" id="]bPhy^Bo`rv2Kf_Mgw%.">
                            <field name="TEXT">"alarm","enableall"</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id="{(HQSbjyqX8|yJ+z%B[p">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="text" id="=2nBcIgNYV6#t3[JA3Ea">
                                <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                              </block>
                            </value>
                            <next>
                              <block type="control" id="YlLe~FFSpkPncOof^$Lv">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="text" id="WxcgKXli+j!QwK93@BI1">
                                    <field name="TEXT">"alarm","update","id:d70d52aa","enabled:1"</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="debug" id="2;(bM+6)cg]fP*Ht=mxb">
                                    <field name="Severity">error</field>
                                    <value name="TEXT">
                                      <shadow type="text" id="RSt)^FbTG??PpZA1CEeX">
                                        <field name="TEXT">Radiowecker - Homeoffice!</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <value name="IF2">
                  <block type="logic_operation" id="+nOe?4$U7?IbH:ZMd~5Q">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_operation" id="^J_oELVKE@GnhT2`xUO]">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="logic_operation" id="2k*VjZ,p$2rlD:/.]J8!">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="logic_compare" id="o%`[U9JV+P*t9)pwkU#b">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="uRx`:|-FVd5FO_;A7%ms">
                                    <field name="ATTR">val</field>
                                    <field name="OID">ical.0.events.0.today.Urlaub</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="svG]g=~;_5EMRs[pc~NL">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="!fI@?2}5XTI#KW:CMg_L">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="u^jX|%Tw(m`Xb],eyrtL">
                                    <field name="ATTR">val</field>
                                    <field name="OID">ical.0.events.0.today.krank</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="F9nt6=Gx`%4|;[bWbN]#">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="Cq*1C~TJTV}}DpWCdinc">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="Jf-@CO]?@([cayi}P|Zx">
                                <field name="ATTR">val</field>
                                <field name="OID">ical.0.events.0.today.Feiertag</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="+9*viY8_|=UzK+%Ds#K%">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_compare" id="+Di9R/?E*2eYr4kg2Ekf">
                        <field name="OP">LTE</field>
                        <value name="A">
                          <block type="time_get" id="M7m^:T3jB6W3}8tje09x">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                            <field name="OPTION">wd</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="Q.NK1p2J`7_*d?gan^^*">
                            <field name="NUM">5</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO2">
                  <block type="comment" id=";{;)xPC.?nLa%v}Ak%]q">
                    <field name="COMMENT"> Wecker1 Arbeit aktiv setzen, HomeOffice-Wecker2 aus</field>
                    <next>
                      <block type="control" id="%+XExA,r5#rLgc~FQ;eK">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="text" id=")()!VOv?6/6D?WA/*Wsf">
                            <field name="TEXT">"alarm","enableall"</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id="u$xtE^}DpRBoh#-LL*|4">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="text" id=",C{xi|$4vlforq-U~ed$">
                                <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:1"</field>
                              </block>
                            </value>
                            <next>
                              <block type="control" id="YmK:D9f^5u)3x+m6k^{8">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="text" id="bMl]4`%y#b{N3^[=|im`">
                                    <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="debug" id="d#yaVgc,e-2xCq^r069m">
                                    <field name="Severity">error</field>
                                    <value name="TEXT">
                                      <shadow type="text" id="kKA}Z0};u)3U6ghBJ4`O">
                                        <field name="TEXT">Radiowecker - normal Büro!</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </next>
      </block>
    </xml>
    

    Das Skrpit steuert je nach Kalendereintrag den entsprechenden Wecker in meiner Squeezebox. Heute war ein ganz normaler Bürotag, somit hätte der Wecker mit der ID 81bf1cdf klingeln müssen. Das tat er aber nicht. Es ging der Wecker mit der anderen ID.
    In der LOG steht aber, dass der normale "Büro-Wecker" aktiviert wird.

    LOG.jpg

    Habe ich vielleicht einen Fehler in meinem Skript?

    .. hier nochmal die Variablen aus dem Kalender von heute. Also diese werden korrekt abgefragt.

    Kalender_Variablen.jpg

    Danke euch!

    Gruß surfer ;-)

    IO-Broker Master/Slave auf Windows 11 64bit, NPM 10.9.4, Node 22.21.1 js-controller 7.0.7

    paul53P surfer09S 2 Antworten Letzte Antwort
    0
    • surfer09S surfer09

      Hallo zusammen,

      vieleicht kann mir jemand einmal mit meinem Skript zur Weckersteuerung helfen.

      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="comment" id="=~.x=m%ycv!}CXTHjk2." x="88" y="-187">
          <field name="COMMENT">Weckersteuerung Logitech Squeezebox</field>
          <next>
            <block type="schedule" id="TZ$7DDhrIXUwBtk[x2iG">
              <field name="SCHEDULE">*/30 0-5 * * *</field>
              <statement name="STATEMENT">
                <block type="controls_if" id=".ZHZLZx@Gr`OX^,[ufGi">
                  <mutation elseif="2"></mutation>
                  <value name="IF0">
                    <block type="logic_operation" id="]pay3y@ae^Q2tSPhxqH]">
                      <field name="OP">OR</field>
                      <value name="A">
                        <block type="logic_operation" id="FsgQ/+^h__4~.|gP~]60">
                          <field name="OP">OR</field>
                          <value name="A">
                            <block type="logic_operation" id="(}/0l4Y#e4[%;IFJsq3q">
                              <field name="OP">OR</field>
                              <value name="A">
                                <block type="logic_compare" id="l3f?)3X.B+vl^~;6]~E3">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="tQVy#gbfCs|spB6U+_k]">
                                      <field name="ATTR">val</field>
                                      <field name="OID">ical.0.events.0.today.Urlaub</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="1howKr:;}Ba5NyEdKo(:">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id="V_7cNP-Fy2#%VG:Ah:~w">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="VdKL+)a@$MxKCa]w3;UB">
                                      <field name="ATTR">val</field>
                                      <field name="OID">ical.0.events.0.today.krank</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="N$g*::H4S~nOkr_uwk,_">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="vuITMj+3=a5c8W3y,%dX">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="CJ[Hr0b}D#|q/d#UIoan">
                                  <field name="ATTR">val</field>
                                  <field name="OID">ical.0.events.0.today.Feiertag</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="ZsiDK9YC%5ZF{d}b,tsc">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="J{o_AsZY`M5ZuYqUb!l5">
                          <field name="OP">GTE</field>
                          <value name="A">
                            <block type="time_get" id="P[j!)eL@.hnTfPi1[vH-">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                              <field name="OPTION">wd</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="math_number" id="Nb$Br`3Qp}UH#CVnj9P^">
                              <field name="NUM">6</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="control" id="KJ*0Ac2~HG,%VVSd`)9q">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="text" id="tn!(+5t~$;|NeGKpiDnx">
                          <field name="TEXT">"alarm","enableall"</field>
                        </block>
                      </value>
                      <next>
                        <block type="control" id="yVyC$h}yg+?R5aaV(I~/">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="text" id="!]4]Vg5`TEi$r~cuuZ1O">
                              <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id=":|^7]J]0G~]$~m4@t@n0">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="text" id="B.u6t,yHX4`qWKYb^:~o">
                                  <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                                </block>
                              </value>
                              <next>
                                <block type="debug" id="2z/?Y,KZ%b3S|-%z]1$5">
                                  <field name="Severity">error</field>
                                  <value name="TEXT">
                                    <shadow type="text" id="+V/#[]M@{(eJ22Y2mB=e">
                                      <field name="TEXT">Wecker 1 und 2 aus - (Feiertag, Wochenende, Urlaub, krank)!</field>
                                    </shadow>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <value name="IF1">
                    <block type="logic_operation" id="Gu1_A=Uy)1;#Q#)1urvq">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_compare" id="PG-,d,GSzD5*-4U[$XH4">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="NB_mQV-HCv:/u[DjG)Tg">
                              <field name="ATTR">val</field>
                              <field name="OID">ical.0.events.0.today.Homeoffice</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="w.O/Qv(,_G+$Vh/7F9Yx">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="H?Q?w=@O(E}:;XCP~~SL">
                          <field name="OP">LTE</field>
                          <value name="A">
                            <block type="time_get" id="-w7fxDVUui01BZ%YA%-2">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                              <field name="OPTION">wd</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="math_number" id="44qpB5?3EA3z=oLwI-e_">
                              <field name="NUM">5</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO1">
                    <block type="comment" id=":3FGUCm85Eg6#h;fGMb)">
                      <field name="COMMENT">HomeOffice-Wecker2 aktiv setzen, Wecker1 Arbeit aus</field>
                      <next>
                        <block type="control" id="aYo4E[AjnOIK0+z=]Q8=">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="text" id="]bPhy^Bo`rv2Kf_Mgw%.">
                              <field name="TEXT">"alarm","enableall"</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="{(HQSbjyqX8|yJ+z%B[p">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="text" id="=2nBcIgNYV6#t3[JA3Ea">
                                  <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                                </block>
                              </value>
                              <next>
                                <block type="control" id="YlLe~FFSpkPncOof^$Lv">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="text" id="WxcgKXli+j!QwK93@BI1">
                                      <field name="TEXT">"alarm","update","id:d70d52aa","enabled:1"</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="debug" id="2;(bM+6)cg]fP*Ht=mxb">
                                      <field name="Severity">error</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="RSt)^FbTG??PpZA1CEeX">
                                          <field name="TEXT">Radiowecker - Homeoffice!</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <value name="IF2">
                    <block type="logic_operation" id="+nOe?4$U7?IbH:ZMd~5Q">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_operation" id="^J_oELVKE@GnhT2`xUO]">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_operation" id="2k*VjZ,p$2rlD:/.]J8!">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_compare" id="o%`[U9JV+P*t9)pwkU#b">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="uRx`:|-FVd5FO_;A7%ms">
                                      <field name="ATTR">val</field>
                                      <field name="OID">ical.0.events.0.today.Urlaub</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="svG]g=~;_5EMRs[pc~NL">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id="!fI@?2}5XTI#KW:CMg_L">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="u^jX|%Tw(m`Xb],eyrtL">
                                      <field name="ATTR">val</field>
                                      <field name="OID">ical.0.events.0.today.krank</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="F9nt6=Gx`%4|;[bWbN]#">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="Cq*1C~TJTV}}DpWCdinc">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="Jf-@CO]?@([cayi}P|Zx">
                                  <field name="ATTR">val</field>
                                  <field name="OID">ical.0.events.0.today.Feiertag</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="+9*viY8_|=UzK+%Ds#K%">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="+Di9R/?E*2eYr4kg2Ekf">
                          <field name="OP">LTE</field>
                          <value name="A">
                            <block type="time_get" id="M7m^:T3jB6W3}8tje09x">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                              <field name="OPTION">wd</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="math_number" id="Q.NK1p2J`7_*d?gan^^*">
                              <field name="NUM">5</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO2">
                    <block type="comment" id=";{;)xPC.?nLa%v}Ak%]q">
                      <field name="COMMENT"> Wecker1 Arbeit aktiv setzen, HomeOffice-Wecker2 aus</field>
                      <next>
                        <block type="control" id="%+XExA,r5#rLgc~FQ;eK">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="text" id=")()!VOv?6/6D?WA/*Wsf">
                              <field name="TEXT">"alarm","enableall"</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="u$xtE^}DpRBoh#-LL*|4">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="text" id=",C{xi|$4vlforq-U~ed$">
                                  <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:1"</field>
                                </block>
                              </value>
                              <next>
                                <block type="control" id="YmK:D9f^5u)3x+m6k^{8">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="text" id="bMl]4`%y#b{N3^[=|im`">
                                      <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="debug" id="d#yaVgc,e-2xCq^r069m">
                                      <field name="Severity">error</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="kKA}Z0};u)3U6ghBJ4`O">
                                          <field name="TEXT">Radiowecker - normal Büro!</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </next>
        </block>
      </xml>
      

      Das Skrpit steuert je nach Kalendereintrag den entsprechenden Wecker in meiner Squeezebox. Heute war ein ganz normaler Bürotag, somit hätte der Wecker mit der ID 81bf1cdf klingeln müssen. Das tat er aber nicht. Es ging der Wecker mit der anderen ID.
      In der LOG steht aber, dass der normale "Büro-Wecker" aktiviert wird.

      LOG.jpg

      Habe ich vielleicht einen Fehler in meinem Skript?

      .. hier nochmal die Variablen aus dem Kalender von heute. Also diese werden korrekt abgefragt.

      Kalender_Variablen.jpg

      Danke euch!

      Gruß surfer ;-)

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

      @surfer09
      Die Abfragen können vereinfacht werden und sind damit übersichtlicher. Einmal am Tag den Wecker zu stellen, sollte genügen.

      Blockly_temp.JPG

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="C^j(OZz=r=454U#9$#i%">wecker1</variable>
         <variable id="1aT!=68Bd9!-XCj8{@h9">wecker2</variable>
       </variables>
       <block type="comment" id="=~.x=m%ycv!}CXTHjk2." x="88" y="-187">
         <field name="COMMENT">Weckersteuerung Logitech Squeezebox</field>
         <next>
           <block type="schedule" id="TZ$7DDhrIXUwBtk[x2iG">
             <field name="SCHEDULE">0 5 * * *</field>
             <statement name="STATEMENT">
               <block type="controls_if" id=".ZHZLZx@Gr`OX^,[ufGi">
                 <mutation elseif="1" else="1"></mutation>
                 <value name="IF0">
                   <block type="logic_operation" id="]pay3y@ae^Q2tSPhxqH]" inline="false">
                     <field name="OP">OR</field>
                     <value name="A">
                       <block type="logic_operation" id="(}/0l4Y#e4[%;IFJsq3q" inline="false">
                         <field name="OP">OR</field>
                         <value name="A">
                           <block type="get_value" id="tQVy#gbfCs|spB6U+_k]">
                             <field name="ATTR">val</field>
                             <field name="OID">ical.0.events.0.today.Urlaub</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="get_value" id="VdKL+)a@$MxKCa]w3;UB">
                             <field name="ATTR">val</field>
                             <field name="OID">ical.0.events.0.today.krank</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_operation" id="FsgQ/+^h__4~.|gP~]60" inline="false">
                         <field name="OP">OR</field>
                         <value name="A">
                           <block type="get_value" id="CJ[Hr0b}D#|q/d#UIoan">
                             <field name="ATTR">val</field>
                             <field name="OID">ical.0.events.0.today.Feiertag</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id="J{o_AsZY`M5ZuYqUb!l5">
                             <field name="OP">GTE</field>
                             <value name="A">
                               <block type="time_get" id="P[j!)eL@.hnTfPi1[vH-">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                 <field name="OPTION">wd</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="Nb$Br`3Qp}UH#CVnj9P^">
                                 <field name="NUM">6</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="variables_set" id="8(a+9BWwJ+^(L3GATyxr">
                     <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                     <value name="VALUE">
                       <block type="text" id="!]4]Vg5`TEi$r~cuuZ1O">
                         <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                       </block>
                     </value>
                     <next>
                       <block type="variables_set" id="{|Mm)/vMkVt(o5~SEWp(">
                         <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                         <value name="VALUE">
                           <block type="text" id="B.u6t,yHX4`qWKYb^:~o">
                             <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                           </block>
                         </value>
                         <next>
                           <block type="debug" id="2z/?Y,KZ%b3S|-%z]1$5">
                             <field name="Severity">error</field>
                             <value name="TEXT">
                               <shadow type="text" id="+V/#[]M@{(eJ22Y2mB=e">
                                 <field name="TEXT">Wecker 1 und 2 aus - (Feiertag, Wochenende, Urlaub, krank)!</field>
                               </shadow>
                             </value>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <value name="IF1">
                   <block type="get_value" id="NB_mQV-HCv:/u[DjG)Tg">
                     <field name="ATTR">val</field>
                     <field name="OID">ical.0.events.0.today.Homeoffice</field>
                   </block>
                 </value>
                 <statement name="DO1">
                   <block type="comment" id=":3FGUCm85Eg6#h;fGMb)">
                     <field name="COMMENT">HomeOffice-Wecker2 aktiv setzen, Wecker1 Arbeit aus</field>
                     <next>
                       <block type="variables_set" id="1cVPcLn(!6t%5YYMMd~H">
                         <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                         <value name="VALUE">
                           <block type="text" id="=2nBcIgNYV6#t3[JA3Ea">
                             <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="k/do]}AR;@IDlDtnDXT-">
                             <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                             <value name="VALUE">
                               <block type="text" id="WxcgKXli+j!QwK93@BI1">
                                 <field name="TEXT">"alarm","update","id:d70d52aa","enabled:1"</field>
                               </block>
                             </value>
                             <next>
                               <block type="debug" id="2;(bM+6)cg]fP*Ht=mxb">
                                 <field name="Severity">error</field>
                                 <value name="TEXT">
                                   <shadow type="text" id="RSt)^FbTG??PpZA1CEeX">
                                     <field name="TEXT">Radiowecker - Homeoffice!</field>
                                   </shadow>
                                 </value>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <statement name="ELSE">
                   <block type="comment" id=";{;)xPC.?nLa%v}Ak%]q">
                     <field name="COMMENT"> Wecker1 Arbeit aktiv setzen, HomeOffice-Wecker2 aus</field>
                     <next>
                       <block type="variables_set" id="tyNuOyy-uu*~4Kv_%~WL">
                         <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                         <value name="VALUE">
                           <block type="text" id=",C{xi|$4vlforq-U~ed$">
                             <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:1"</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="|BFw(lvTJclw.jGmxzOA">
                             <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                             <value name="VALUE">
                               <block type="text" id="bMl]4`%y#b{N3^[=|im`">
                                 <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                               </block>
                             </value>
                             <next>
                               <block type="debug" id="d#yaVgc,e-2xCq^r069m">
                                 <field name="Severity">error</field>
                                 <value name="TEXT">
                                   <shadow type="text" id="kKA}Z0};u)3U6ghBJ4`O">
                                     <field name="TEXT">Radiowecker - normal Büro!</field>
                                   </shadow>
                                 </value>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <next>
                   <block type="control" id="%+XExA,r5#rLgc~FQ;eK">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="text" id=")()!VOv?6/6D?WA/*Wsf">
                         <field name="TEXT">"alarm","enableall"</field>
                       </block>
                     </value>
                     <next>
                       <block type="control" id="u$xtE^}DpRBoh#-LL*|4">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="variables_get" id="zvUkM(oXb^gQS}J]gil#">
                             <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                           </block>
                         </value>
                         <next>
                           <block type="control" id="YmK:D9f^5u)3x+m6k^{8">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="variables_get" id="GZU|.j6/KBh)Z|xyx}Uf">
                                 <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                               </block>
                             </value>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </next>
       </block>
      </xml>
      

      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

      surfer09S 1 Antwort Letzte Antwort
      0
      • paul53P paul53

        @surfer09
        Die Abfragen können vereinfacht werden und sind damit übersichtlicher. Einmal am Tag den Wecker zu stellen, sollte genügen.

        Blockly_temp.JPG

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable id="C^j(OZz=r=454U#9$#i%">wecker1</variable>
           <variable id="1aT!=68Bd9!-XCj8{@h9">wecker2</variable>
         </variables>
         <block type="comment" id="=~.x=m%ycv!}CXTHjk2." x="88" y="-187">
           <field name="COMMENT">Weckersteuerung Logitech Squeezebox</field>
           <next>
             <block type="schedule" id="TZ$7DDhrIXUwBtk[x2iG">
               <field name="SCHEDULE">0 5 * * *</field>
               <statement name="STATEMENT">
                 <block type="controls_if" id=".ZHZLZx@Gr`OX^,[ufGi">
                   <mutation elseif="1" else="1"></mutation>
                   <value name="IF0">
                     <block type="logic_operation" id="]pay3y@ae^Q2tSPhxqH]" inline="false">
                       <field name="OP">OR</field>
                       <value name="A">
                         <block type="logic_operation" id="(}/0l4Y#e4[%;IFJsq3q" inline="false">
                           <field name="OP">OR</field>
                           <value name="A">
                             <block type="get_value" id="tQVy#gbfCs|spB6U+_k]">
                               <field name="ATTR">val</field>
                               <field name="OID">ical.0.events.0.today.Urlaub</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="get_value" id="VdKL+)a@$MxKCa]w3;UB">
                               <field name="ATTR">val</field>
                               <field name="OID">ical.0.events.0.today.krank</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <value name="B">
                         <block type="logic_operation" id="FsgQ/+^h__4~.|gP~]60" inline="false">
                           <field name="OP">OR</field>
                           <value name="A">
                             <block type="get_value" id="CJ[Hr0b}D#|q/d#UIoan">
                               <field name="ATTR">val</field>
                               <field name="OID">ical.0.events.0.today.Feiertag</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="logic_compare" id="J{o_AsZY`M5ZuYqUb!l5">
                               <field name="OP">GTE</field>
                               <value name="A">
                                 <block type="time_get" id="P[j!)eL@.hnTfPi1[vH-">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                   <field name="OPTION">wd</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="Nb$Br`3Qp}UH#CVnj9P^">
                                   <field name="NUM">6</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="variables_set" id="8(a+9BWwJ+^(L3GATyxr">
                       <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                       <value name="VALUE">
                         <block type="text" id="!]4]Vg5`TEi$r~cuuZ1O">
                           <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                         </block>
                       </value>
                       <next>
                         <block type="variables_set" id="{|Mm)/vMkVt(o5~SEWp(">
                           <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                           <value name="VALUE">
                             <block type="text" id="B.u6t,yHX4`qWKYb^:~o">
                               <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                             </block>
                           </value>
                           <next>
                             <block type="debug" id="2z/?Y,KZ%b3S|-%z]1$5">
                               <field name="Severity">error</field>
                               <value name="TEXT">
                                 <shadow type="text" id="+V/#[]M@{(eJ22Y2mB=e">
                                   <field name="TEXT">Wecker 1 und 2 aus - (Feiertag, Wochenende, Urlaub, krank)!</field>
                                 </shadow>
                               </value>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <value name="IF1">
                     <block type="get_value" id="NB_mQV-HCv:/u[DjG)Tg">
                       <field name="ATTR">val</field>
                       <field name="OID">ical.0.events.0.today.Homeoffice</field>
                     </block>
                   </value>
                   <statement name="DO1">
                     <block type="comment" id=":3FGUCm85Eg6#h;fGMb)">
                       <field name="COMMENT">HomeOffice-Wecker2 aktiv setzen, Wecker1 Arbeit aus</field>
                       <next>
                         <block type="variables_set" id="1cVPcLn(!6t%5YYMMd~H">
                           <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                           <value name="VALUE">
                             <block type="text" id="=2nBcIgNYV6#t3[JA3Ea">
                               <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                             </block>
                           </value>
                           <next>
                             <block type="variables_set" id="k/do]}AR;@IDlDtnDXT-">
                               <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                               <value name="VALUE">
                                 <block type="text" id="WxcgKXli+j!QwK93@BI1">
                                   <field name="TEXT">"alarm","update","id:d70d52aa","enabled:1"</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="debug" id="2;(bM+6)cg]fP*Ht=mxb">
                                   <field name="Severity">error</field>
                                   <value name="TEXT">
                                     <shadow type="text" id="RSt)^FbTG??PpZA1CEeX">
                                       <field name="TEXT">Radiowecker - Homeoffice!</field>
                                     </shadow>
                                   </value>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <statement name="ELSE">
                     <block type="comment" id=";{;)xPC.?nLa%v}Ak%]q">
                       <field name="COMMENT"> Wecker1 Arbeit aktiv setzen, HomeOffice-Wecker2 aus</field>
                       <next>
                         <block type="variables_set" id="tyNuOyy-uu*~4Kv_%~WL">
                           <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                           <value name="VALUE">
                             <block type="text" id=",C{xi|$4vlforq-U~ed$">
                               <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:1"</field>
                             </block>
                           </value>
                           <next>
                             <block type="variables_set" id="|BFw(lvTJclw.jGmxzOA">
                               <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                               <value name="VALUE">
                                 <block type="text" id="bMl]4`%y#b{N3^[=|im`">
                                   <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="debug" id="d#yaVgc,e-2xCq^r069m">
                                   <field name="Severity">error</field>
                                   <value name="TEXT">
                                     <shadow type="text" id="kKA}Z0};u)3U6ghBJ4`O">
                                       <field name="TEXT">Radiowecker - normal Büro!</field>
                                     </shadow>
                                   </value>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <next>
                     <block type="control" id="%+XExA,r5#rLgc~FQ;eK">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="text" id=")()!VOv?6/6D?WA/*Wsf">
                           <field name="TEXT">"alarm","enableall"</field>
                         </block>
                       </value>
                       <next>
                         <block type="control" id="u$xtE^}DpRBoh#-LL*|4">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="variables_get" id="zvUkM(oXb^gQS}J]gil#">
                               <field name="VAR" id="C^j(OZz=r=454U#9$#i%">wecker1</field>
                             </block>
                           </value>
                           <next>
                             <block type="control" id="YmK:D9f^5u)3x+m6k^{8">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="variables_get" id="GZU|.j6/KBh)Z|xyx}Uf">
                                   <field name="VAR" id="1aT!=68Bd9!-XCj8{@h9">wecker2</field>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </statement>
             </block>
           </next>
         </block>
        </xml>
        

        surfer09S Offline
        surfer09S Offline
        surfer09
        schrieb am zuletzt editiert von
        #3

        @paul53 Wahnsinn, wie schnell du das jetzt umgebaut hast :-) Ich bin beeindruckt! Vielen Dank erst einmal! Meinst du der Fehlauslöser heute morgen kam von meiner umständlichen Programmierung?

        IO-Broker Master/Slave auf Windows 11 64bit, NPM 10.9.4, Node 22.21.1 js-controller 7.0.7

        1 Antwort Letzte Antwort
        0
        • surfer09S surfer09

          Hallo zusammen,

          vieleicht kann mir jemand einmal mit meinem Skript zur Weckersteuerung helfen.

          <xml xmlns="https://developers.google.com/blockly/xml">
            <block type="comment" id="=~.x=m%ycv!}CXTHjk2." x="88" y="-187">
              <field name="COMMENT">Weckersteuerung Logitech Squeezebox</field>
              <next>
                <block type="schedule" id="TZ$7DDhrIXUwBtk[x2iG">
                  <field name="SCHEDULE">*/30 0-5 * * *</field>
                  <statement name="STATEMENT">
                    <block type="controls_if" id=".ZHZLZx@Gr`OX^,[ufGi">
                      <mutation elseif="2"></mutation>
                      <value name="IF0">
                        <block type="logic_operation" id="]pay3y@ae^Q2tSPhxqH]">
                          <field name="OP">OR</field>
                          <value name="A">
                            <block type="logic_operation" id="FsgQ/+^h__4~.|gP~]60">
                              <field name="OP">OR</field>
                              <value name="A">
                                <block type="logic_operation" id="(}/0l4Y#e4[%;IFJsq3q">
                                  <field name="OP">OR</field>
                                  <value name="A">
                                    <block type="logic_compare" id="l3f?)3X.B+vl^~;6]~E3">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="tQVy#gbfCs|spB6U+_k]">
                                          <field name="ATTR">val</field>
                                          <field name="OID">ical.0.events.0.today.Urlaub</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="1howKr:;}Ba5NyEdKo(:">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_compare" id="V_7cNP-Fy2#%VG:Ah:~w">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="VdKL+)a@$MxKCa]w3;UB">
                                          <field name="ATTR">val</field>
                                          <field name="OID">ical.0.events.0.today.krank</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="N$g*::H4S~nOkr_uwk,_">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id="vuITMj+3=a5c8W3y,%dX">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="CJ[Hr0b}D#|q/d#UIoan">
                                      <field name="ATTR">val</field>
                                      <field name="OID">ical.0.events.0.today.Feiertag</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="ZsiDK9YC%5ZF{d}b,tsc">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="J{o_AsZY`M5ZuYqUb!l5">
                              <field name="OP">GTE</field>
                              <value name="A">
                                <block type="time_get" id="P[j!)eL@.hnTfPi1[vH-">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                  <field name="OPTION">wd</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="Nb$Br`3Qp}UH#CVnj9P^">
                                  <field name="NUM">6</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="control" id="KJ*0Ac2~HG,%VVSd`)9q">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="text" id="tn!(+5t~$;|NeGKpiDnx">
                              <field name="TEXT">"alarm","enableall"</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="yVyC$h}yg+?R5aaV(I~/">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="text" id="!]4]Vg5`TEi$r~cuuZ1O">
                                  <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                                </block>
                              </value>
                              <next>
                                <block type="control" id=":|^7]J]0G~]$~m4@t@n0">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="text" id="B.u6t,yHX4`qWKYb^:~o">
                                      <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="debug" id="2z/?Y,KZ%b3S|-%z]1$5">
                                      <field name="Severity">error</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="+V/#[]M@{(eJ22Y2mB=e">
                                          <field name="TEXT">Wecker 1 und 2 aus - (Feiertag, Wochenende, Urlaub, krank)!</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                      <value name="IF1">
                        <block type="logic_operation" id="Gu1_A=Uy)1;#Q#)1urvq">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_compare" id="PG-,d,GSzD5*-4U[$XH4">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="NB_mQV-HCv:/u[DjG)Tg">
                                  <field name="ATTR">val</field>
                                  <field name="OID">ical.0.events.0.today.Homeoffice</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="w.O/Qv(,_G+$Vh/7F9Yx">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="H?Q?w=@O(E}:;XCP~~SL">
                              <field name="OP">LTE</field>
                              <value name="A">
                                <block type="time_get" id="-w7fxDVUui01BZ%YA%-2">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                  <field name="OPTION">wd</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="44qpB5?3EA3z=oLwI-e_">
                                  <field name="NUM">5</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO1">
                        <block type="comment" id=":3FGUCm85Eg6#h;fGMb)">
                          <field name="COMMENT">HomeOffice-Wecker2 aktiv setzen, Wecker1 Arbeit aus</field>
                          <next>
                            <block type="control" id="aYo4E[AjnOIK0+z=]Q8=">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="text" id="]bPhy^Bo`rv2Kf_Mgw%.">
                                  <field name="TEXT">"alarm","enableall"</field>
                                </block>
                              </value>
                              <next>
                                <block type="control" id="{(HQSbjyqX8|yJ+z%B[p">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="text" id="=2nBcIgNYV6#t3[JA3Ea">
                                      <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:0"</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="YlLe~FFSpkPncOof^$Lv">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="text" id="WxcgKXli+j!QwK93@BI1">
                                          <field name="TEXT">"alarm","update","id:d70d52aa","enabled:1"</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="debug" id="2;(bM+6)cg]fP*Ht=mxb">
                                          <field name="Severity">error</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="RSt)^FbTG??PpZA1CEeX">
                                              <field name="TEXT">Radiowecker - Homeoffice!</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                      <value name="IF2">
                        <block type="logic_operation" id="+nOe?4$U7?IbH:ZMd~5Q">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_operation" id="^J_oELVKE@GnhT2`xUO]">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_operation" id="2k*VjZ,p$2rlD:/.]J8!">
                                  <field name="OP">AND</field>
                                  <value name="A">
                                    <block type="logic_compare" id="o%`[U9JV+P*t9)pwkU#b">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="uRx`:|-FVd5FO_;A7%ms">
                                          <field name="ATTR">val</field>
                                          <field name="OID">ical.0.events.0.today.Urlaub</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="svG]g=~;_5EMRs[pc~NL">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_compare" id="!fI@?2}5XTI#KW:CMg_L">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="u^jX|%Tw(m`Xb],eyrtL">
                                          <field name="ATTR">val</field>
                                          <field name="OID">ical.0.events.0.today.krank</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="F9nt6=Gx`%4|;[bWbN]#">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id="Cq*1C~TJTV}}DpWCdinc">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="Jf-@CO]?@([cayi}P|Zx">
                                      <field name="ATTR">val</field>
                                      <field name="OID">ical.0.events.0.today.Feiertag</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="+9*viY8_|=UzK+%Ds#K%">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="+Di9R/?E*2eYr4kg2Ekf">
                              <field name="OP">LTE</field>
                              <value name="A">
                                <block type="time_get" id="M7m^:T3jB6W3}8tje09x">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                  <field name="OPTION">wd</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="Q.NK1p2J`7_*d?gan^^*">
                                  <field name="NUM">5</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO2">
                        <block type="comment" id=";{;)xPC.?nLa%v}Ak%]q">
                          <field name="COMMENT"> Wecker1 Arbeit aktiv setzen, HomeOffice-Wecker2 aus</field>
                          <next>
                            <block type="control" id="%+XExA,r5#rLgc~FQ;eK">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="text" id=")()!VOv?6/6D?WA/*Wsf">
                                  <field name="TEXT">"alarm","enableall"</field>
                                </block>
                              </value>
                              <next>
                                <block type="control" id="u$xtE^}DpRBoh#-LL*|4">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="text" id=",C{xi|$4vlforq-U~ed$">
                                      <field name="TEXT">"alarm","update","id:81bf1cdf","enabled:1"</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="YmK:D9f^5u)3x+m6k^{8">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">squeezeboxrpc.0.Players.Squeezebox Radio.cmdGeneral</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="text" id="bMl]4`%y#b{N3^[=|im`">
                                          <field name="TEXT">"alarm","update","id:d70d52aa","enabled:0"</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="debug" id="d#yaVgc,e-2xCq^r069m">
                                          <field name="Severity">error</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="kKA}Z0};u)3U6ghBJ4`O">
                                              <field name="TEXT">Radiowecker - normal Büro!</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </xml>
          

          Das Skrpit steuert je nach Kalendereintrag den entsprechenden Wecker in meiner Squeezebox. Heute war ein ganz normaler Bürotag, somit hätte der Wecker mit der ID 81bf1cdf klingeln müssen. Das tat er aber nicht. Es ging der Wecker mit der anderen ID.
          In der LOG steht aber, dass der normale "Büro-Wecker" aktiviert wird.

          LOG.jpg

          Habe ich vielleicht einen Fehler in meinem Skript?

          .. hier nochmal die Variablen aus dem Kalender von heute. Also diese werden korrekt abgefragt.

          Kalender_Variablen.jpg

          Danke euch!

          Gruß surfer ;-)

          surfer09S Offline
          surfer09S Offline
          surfer09
          schrieb am zuletzt editiert von surfer09
          #4

          Hab den Fehler gefunden, das Skript war nicht Schuld. (falsche IP Adresse des Squeezebox Servers im Adapter)

          IO-Broker Master/Slave auf Windows 11 64bit, NPM 10.9.4, Node 22.21.1 js-controller 7.0.7

          paul53P 1 Antwort Letzte Antwort
          0
          • surfer09S surfer09

            Hab den Fehler gefunden, das Skript war nicht Schuld. (falsche IP Adresse des Squeezebox Servers im Adapter)

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

            @surfer09 sagte: aber es wird dennoch der falsche Wecker aktiviert.

            Mit "squeezebox" kenne ich mich nicht aus.

            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
            Antworten
            • In einem neuen Thema antworten
            Anmelden zum Antworten
            • Älteste zuerst
            • Neuste zuerst
            • Meiste Stimmen


            Support us

            ioBroker
            Community Adapters
            Donate

            334

            Online

            32.7k

            Benutzer

            82.5k

            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