NEWS
[Gelöst]Blockly zum Schalten des VIS - PC läuft nicht
-
@David-Froebus Es handelt sich nur um einen wake on lan Befehl. Ein Herunterfahren passiert nicht bei doppelter Betätigung.
Das Script dient nur dazu, wol wieder auf false zu setzen. Ich hatte da irgendwie früher mal ein Problem, dass bei true und erneutem true Kommando nichts passierte.
-
@UncleSam Zum ersten Punkt, das werde ich probieren. Zu Zweitens, du hast recht das ist verwirrend, die Datenpunkte heißen gleich sind aber anderen Ordnern zugeordnet, ich habe dies geprüft, es handelt sich immer um Steffi oder Matthias im richtigen Kontext.
Auszug aus dem Unifi Adapter:
-
füge dir ein paar debug blocklys ein - dann siehst du im log besser, wann was wie oft geschalten wird
-
@Matten sagte in Blockly zum Schalten des VIS - PC läuft nicht:
es handelt sich immer um Steffi oder Matthias im richtigen Kontext
Meine Interpretation:
Stimmt das?
-
@UncleSam Ja, alles so richtig...
-
@liv-in-sky Habe ich jetzt mal getan.
-
@liv-in-sky Wenn ich jetzt mein wlan abschalte und wieder einschalte kommt der Power Off Befehl, das kann eigentlich nicht sein...
-
steffi ist online oder offline ?
-
@liv-in-sky Steffi ist online
-
@Matten poste mal dein blockly als import - dann stelle ich das mal nach
-
@Matten sagte in Blockly zum Schalten des VIS - PC läuft nicht:
Wenn ich jetzt mein wlan abschalte und wieder einschalte kommt der Power Off Befehl, das kann eigentlich nicht sein...
Datenpunkt Mattes is online ist invertiert ?
Der Datenpunkt / Trigger ist Online wird bei außer Haus gehen woher von true nach false geschaltet ? -
habe es mal nachgebaut - funktioniert ohne probleme - da stimmt etwas anderes nicht - iobroker neustart oder zumindest mal javascript instanz neustart
beide hier abgebildete versionen funktionieren
-
@Ralla66 das passiert vom Unifi Adapter, wenn das Wlan des Handys fehlt schaltet er auf false
-
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="comment" id=")qGpr$[Qn*!U*GHK]V@k" x="288" y="-537"> <field name="COMMENT">Matthias</field> <next> <block type="on" id="gQuJp%K/1t*}GbAe!/|X"> <field name="OID">unifi.0.default.clients.e0:24:81:44:5c:59.is_online</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION">true</field> <statement name="STATEMENT"> <block type="controls_if" id="8S0hycGvH`g+}xL4qcw0"> <value name="IF0"> <block type="logic_operation" id="/1-rP25[{9({~-t0`AZs"> <field name="OP">AND</field> <value name="A"> <block type="time_compare" id="qx#XnbNL],av9TV#ibuF"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false"></mutation> <field name="OPTION">></field> <field name="START_TIME">07:00</field> </block> </value> <value name="B"> <block type="time_compare" id="tHaC-``UO`LXIHzMA2`|"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false"></mutation> <field name="OPTION"><</field> <field name="START_TIME">23:59</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="@*=y.va%1kT-IC4P].h2"> <field name="NAME">timeout</field> <field name="DELAY">5</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="controls_if" id="G-q0IjA=FvR6eH)Ztfe^"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="AZHnL*58nEPd;XwK)5(^"> <field name="OP">EQ</field> <value name="A"> <block type="logic_operation" id="n*}P,~qpyRvR_w5nEaTt"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="Q^Q%#mOHP#)5^nG{]UK_"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="*{-oM3eSj=ESwLg.K$5A"> <field name="ATTR">val</field> <field name="OID">unifi.0.default.clients.e0:24:81:44:5c:59.is_online</field> </block> </value> <value name="B"> <block type="logic_boolean" id="SrD68:uvK+bK8qA{[Kxo"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="get_value" id="Dr]6!,B-CPm0?4Jn,-s]"> <field name="ATTR">val</field> <field name="OID">unifi.0.default.clients.2c:78:0e:ad:07:f2.is_online</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id=")[Ic{tmRL)Qw9);7Z6;/"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="~H6pG:kXa0%haT$lQ1KY"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">windows-control.0.SmartHomePC.poweroff</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="A^NBEYRN46h6d8PsP*!s"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="V*FKcAR,o}7nfD6.$U_W"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="`d(xE(Dnq2Cf8T!rhnG."> <field name="TEXT">Poweroff wahr</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control" id="TO78$MiHb/JwF0TtBN*S"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.1.wol.wolwin</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="AWnm_d~yHU~X)M4$gkEk"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="#G.?x^8J=%cD+2dP!OT4"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="$Bx,+RO?$QQQW}KB%lxO"> <field name="TEXT">wol wahr</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> </block> </statement> </block> </statement> <next> <block type="comment" id="Ehy/w?q_030:Y(9vXi5q"> <field name="COMMENT">Steffi</field> <next> <block type="on" id="J!3{d{~W|n$b#ymJIBK#"> <field name="OID">unifi.0.default.clients.2c:78:0e:ad:07:f2.is_online</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION">true</field> <statement name="STATEMENT"> <block type="controls_if" id="J1Zk6-|-G8.g2T)!VP}["> <value name="IF0"> <block type="logic_operation" id="lZT7)zR@E4Es=(_vw;m8"> <field name="OP">AND</field> <value name="A"> <block type="time_compare" id="cOivF)(gLh/#SJVfTI`1"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false"></mutation> <field name="OPTION">></field> <field name="START_TIME">07:00</field> </block> </value> <value name="B"> <block type="time_compare" id="%`@uXTOwOBI_7*d?SuoC"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false"></mutation> <field name="OPTION"><</field> <field name="START_TIME">23:59</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="p$ZxSSSNKhBG0biUx0o("> <field name="NAME">timeout2</field> <field name="DELAY">5</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="controls_if" id="v11b_kPJ[XI7$q^nnRi!"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="$tYu`M)fL+rNGt7kw#!5"> <field name="OP">EQ</field> <value name="A"> <block type="logic_operation" id="K]8062qA2`GWIx~=#H!?"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="o^`bReGj.FR-+rX9r1U*"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="|D_`ap7aIy+b.LZPq,j+"> <field name="ATTR">val</field> <field name="OID">unifi.0.default.clients.e0:24:81:44:5c:59.is_online</field> </block> </value> <value name="B"> <block type="logic_boolean" id="[a.)u^?RVSmp9XuLA}xY"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="get_value" id="=s3$XIv[i8*8EBydLqsj"> <field name="ATTR">val</field> <field name="OID">unifi.0.default.clients.2c:78:0e:ad:07:f2.is_online</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="xv;p|Zg{0|ZPbN}?MhZw"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="5h-D{VZ?;b8E:-x@4T1I"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">windows-control.0.SmartHomePC.poweroff</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="}9nsQ[{u[79_mS+YB]qx"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="YizH(]dv@y:H`x+X:L.*"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="v@xjbmvhXW*-vr(;6%04"> <field name="TEXT">poweroff steffi wahr</field> </shadow> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control" id="K8U}y!]dF9/Wlx7y)ET9"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.1.wol.wolwin</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="R#-b`kSpa__2{$6r`Qqs"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id=":-eCEb-K6xWfSiVnwmf5"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="{eE{6ViZcc4bbn%tG9Ed"> <field name="TEXT">wol steffi wahr</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml>
Wlan Handy abgeschaltet: Debug: wol true ist wahr
Javascript habe ich neu gestartet, iobroker mache ich dann jetzt noch mal.
Mod-Edit: Code/Log in Code Tags gepackt. Bitte benutzt die Code Tags Funktion -> </>
Hier gehts zur Hilfe. -
@Matten deine if abfragen sind falsch
bei dir:
richtig:
der zweite block ist falsch in der if abfrage - nach dem "und"
-
@Matten hier sieht man es besser
-
@liv-in-sky Super, ich hatte kurz vor Deinem Hinsweis meinen or Block auf externe Eingänge umstellt und das gesehen was Du mir gezeigt hast. Dabei hatte ich mich vorher schon gewundert, warum der Block so "dick" ist
Ich danke Dir, es läuft wie es soll!!!!!! -
Danke auch an alle anderen für Euren Einsatz!!!