NEWS
ioBroker-Windows Steuerung
-
@qlink die abfrage ob z.bsp chrome läuft gibt es jetzt, zusätzlich gibt es jetzt auch die hotkeys senden option
-
Kann Message Client auch "DisplayOn" und "DisplayOff" als Befehl verarbeiten ?
Wenn ja wie würde das gehen ?Kannst du mir auch kurz erklären, wie du die Steuerung aus iobroker umgesetzt hast ?
Mit Blockly ? Kannst du hier eventuell ein Beispielscript herzeigen ?Danke und beste Grüße
-
@qlink So die Befehle sind nun impementiert.
https://github.com/felixcrafter54/message-client/releases/tag/v1.7Ich versuche jetzt mal ein Blockly zu basteln
-
@felixcrafter83 hier mal ein einfaches Blockly
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="KJ`(],L1vH}H^)otDRqm">host</variable> <variable id="TjJSy2#L3OUQDiT~:I97">json</variable> <variable id="uo$)0f5gD`Gm=HjjOwa`">username</variable> <variable id="h33;DbV.1JTf?hPM3#_4">password</variable> <variable id="ty4I6t;`3g2@Qo^cIGQS">type</variable> <variable id="zkcwi`_:P|Y-H+w!P0U3">payload</variable> </variables> <block type="procedures_defcustomreturn" id="Z54Pq[qn:vy8Fw}n3A9]" x="388" y="163"> <mutation statements="false"> <arg name="type" varid="ty4I6t;`3g2@Qo^cIGQS"></arg> <arg name="payload" varid="zkcwi`_:P|Y-H+w!P0U3"></arg> </mutation> <field name="NAME">json_generator</field> <field name="SCRIPT">anNvbiA9IEpTT04uc3RyaW5naWZ5KHsNCiAgICB0eXBlIDogdHlwZSwNCiAgICBwYXlsb2FkIDogcGF5bG9hZA0KfSkNCg0KcmV0dXJuIGpzb247</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defcustomreturn" id="H!?tgvif0E3`u4B,w{e1" x="363" y="213"> <mutation statements="false"> <arg name="host" varid="KJ`(],L1vH}H^)otDRqm"></arg> <arg name="json" varid="TjJSy2#L3OUQDiT~:I97"></arg> <arg name="username" varid="uo$)0f5gD`Gm=HjjOwa`"></arg> <arg name="password" varid="h33;DbV.1JTf?hPM3#_4"></arg> </mutation> <field name="NAME">request</field> <field name="SCRIPT">cmV0dXJuIGF3YWl0IG5ldyBQcm9taXNlKA0KICAgIChyZXNvbHZlLCByZWplY3QpID0+IHsNCiAgICAgICAgcmVxdWlyZSgicmVxdWVzdCIpKCJodHRwOi8vIiArIGhvc3QgKyAiOjgwODAvIiwgew0KICAgICAgICAgICAgbWV0aG9kOiAiUE9TVCIsDQogICAgICAgICAgICBib2R5OiBqc29uLA0KICAgICAgICAgICAgaGVhZGVyczogew0KICAgICAgICAgICAgICAgICJBdXRob3JpemF0aW9uIjogYEJhc2ljICR7QnVmZmVyLmZyb20oYCR7dXNlcm5hbWV9OiR7cGFzc3dvcmR9YCkudG9TdHJpbmcoImJhc2U2NCIpfWAsDQogICAgICAgICAgICAgICAgIkNvbnRlbnQtTGVuZ3RoIjoganNvbi5sZW5ndGgsDQogICAgICAgICAgICAgICAgIkNvbnRlbnQtVHlwZSI6ICJhcHBsaWNhdGlvbi9qc29uIg0KICAgICAgICAgICAgfSANCiAgICAgICAgfSkub24oImRhdGEiLCAocmVzcG9uc2UpID0+IHsNCiAgICAgICAgICAgIHJlc29sdmUocmVzcG9uc2UudG9TdHJpbmcoKSkNCiAgICAgICAgfSkub24oImVycm9yIiwgKGVycm9yKSA9PiByZWplY3QoZXJyb3IpICk7DQogICAgfQ0KKQ==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="debug" id="ePOz,x@MKz1g)2wigSnN" x="288" y="288"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="hS%`zO#~k-4MXX-FEeAC"> <field name="TEXT">test</field> </shadow> <block type="procedures_callcustomreturn" id="^*Az[{MYOMj2uz*YnE6?"> <mutation name="request"> <arg name="host"></arg> <arg name="json"></arg> <arg name="username"></arg> <arg name="password"></arg> </mutation> <value name="ARG0"> <block type="text" id="nJ6}9CO8#+E6Lv=*u!v`"> <field name="TEXT"></field> </block> </value> <value name="ARG1"> <block type="procedures_callcustomreturn" id="3$aWe1!t,IpxVZUMK;r,"> <mutation name="json_generator"> <arg name="type"></arg> <arg name="payload"></arg> </mutation> <value name="ARG0"> <block type="text" id="~Ib61]lS,~^qe~T~r=SI"> <field name="TEXT">message</field> </block> </value> <value name="ARG1"> <block type="text" id="eS2f]eyhtAoXXuoXAu|1"> <field name="TEXT">Test</field> </block> </value> </block> </value> <value name="ARG2"> <block type="text" id="_{#_8d{.GWj)J01tCv5}"> <field name="TEXT"></field> </block> </value> <value name="ARG3"> <block type="text" id="{([:tjE/NL/gn(Qr0e]5"> <field name="TEXT"></field> </block> </value> </block> </value> </block> </xml>
-
Vielen Dank fürs implementieren!
Ich verstehe leider nur Bahnhof bei deinem Blockly, kannst du mir erklären wie das gedacht ist, bzw. was welcher Bauteil macht ?
Aktuell verwende ich ja noch getadmin, das ich aber ablösen möchte.
Mein Blockly für getadmin sieht z.B. so aus:
In dem Teil schicke, sobald eine Bewegung erkannt wird mit dem Befehl: http://192.168.30.21:8585?key=F15 einen Tastendruck der Taste F15 an das Windows System, damit der Bildschirm angeht...
Nur damit du verstehst wie ich das bisher gelöst habe...
Beste Grüße
-
Um auf deine erste Frage drauf einzugehen:
Ich persönlich benutze nicht mehr so viel Blockly, außer meiner alten Skripte.
Ich nutze schon seit längeren nur noch Node-Red.
Da würde man dann die http request node nehmen.So ich habe dein Blockly etwas nachgebaut und den request Block durch meinen erstellten Block ersetzt.
Da der Message-Client immer etwas zurücksendet, wie zum Beispiel:
Systemfunction executing
bei einer Systemfunktion, hat der Block request eine Ausgabe, die man in einer Variable, hier Antwort, speichern kann.
Mein Block hat auch gewisse Eingabevariablen.
Außer json müsste eigentlich alles selbsterklärend sein.
Bei Json muss nämlich das in dieser Form eingeben werden:{"type":"hotkey","payload":"F15"}
Mit dem json_generator kann man direkt auf die Werte zugreifen um den Typ (Modus) und den Payload (Inhalt) zu setzten.
Dann wird daraus dieser String erzeugt und er muss nicht eingegeben werden.So würde das Beispiel aussehen, wenn man die screen_on Funktion nutzt:
Ich hoffe ich konnte dir hiermit weiterhelfen.
Um noch die anderen Funktionen des Message-Client zu sehen, kannst du dir die readme auf Github ansehen.Hier das neue Beispiel Blockly:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="ty4I6t;`3g2@Qo^cIGQS">type</variable> <variable id="zkcwi`_:P|Y-H+w!P0U3">payload</variable> <variable id="KJ`(],L1vH}H^)otDRqm">host</variable> <variable id="TjJSy2#L3OUQDiT~:I97">json</variable> <variable id="uo$)0f5gD`Gm=HjjOwa`">username</variable> <variable id="h33;DbV.1JTf?hPM3#_4">password</variable> <variable id="05cyd~/fXw)wYrY_9`j6">Antwort</variable> </variables> <block type="procedures_defcustomreturn" id="Z54Pq[qn:vy8Fw}n3A9]" x="613" y="63"> <mutation statements="false"> <arg name="type" varid="ty4I6t;`3g2@Qo^cIGQS"></arg> <arg name="payload" varid="zkcwi`_:P|Y-H+w!P0U3"></arg> </mutation> <field name="NAME">json_generator</field> <field name="SCRIPT">anNvbiA9IEpTT04uc3RyaW5naWZ5KHsNCiAgICB0eXBlIDogdHlwZSwNCiAgICBwYXlsb2FkIDogcGF5bG9hZA0KfSkNCg0KcmV0dXJuIGpzb247</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defcustomreturn" id="H!?tgvif0E3`u4B,w{e1" x="588" y="113"> <mutation statements="false"> <arg name="host" varid="KJ`(],L1vH}H^)otDRqm"></arg> <arg name="json" varid="TjJSy2#L3OUQDiT~:I97"></arg> <arg name="username" varid="uo$)0f5gD`Gm=HjjOwa`"></arg> <arg name="password" varid="h33;DbV.1JTf?hPM3#_4"></arg> </mutation> <field name="NAME">request</field> <field name="SCRIPT">cmV0dXJuIGF3YWl0IG5ldyBQcm9taXNlKA0KICAgIChyZXNvbHZlLCByZWplY3QpID0+IHsNCiAgICAgICAgcmVxdWlyZSgicmVxdWVzdCIpKCJodHRwOi8vIiArIGhvc3QgKyAiOjgwODAvIiwgew0KICAgICAgICAgICAgbWV0aG9kOiAiUE9TVCIsDQogICAgICAgICAgICBib2R5OiBqc29uLA0KICAgICAgICAgICAgaGVhZGVyczogew0KICAgICAgICAgICAgICAgICJBdXRob3JpemF0aW9uIjogYEJhc2ljICR7QnVmZmVyLmZyb20oYCR7dXNlcm5hbWV9OiR7cGFzc3dvcmR9YCkudG9TdHJpbmcoImJhc2U2NCIpfWAsDQogICAgICAgICAgICAgICAgIkNvbnRlbnQtTGVuZ3RoIjoganNvbi5sZW5ndGgsDQogICAgICAgICAgICAgICAgIkNvbnRlbnQtVHlwZSI6ICJhcHBsaWNhdGlvbi9qc29uIg0KICAgICAgICAgICAgfSANCiAgICAgICAgfSkub24oImRhdGEiLCAocmVzcG9uc2UpID0+IHsNCiAgICAgICAgICAgIHJlc29sdmUocmVzcG9uc2UudG9TdHJpbmcoKSkNCiAgICAgICAgfSkub24oImVycm9yIiwgKGVycm9yKSA9PiByZWplY3QoZXJyb3IpICk7DQogICAgfQ0KKQ==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="variables_set" id="YqU71]Z+:=wA)?51:4%)" x="138" y="188"> <field name="VAR" id="05cyd~/fXw)wYrY_9`j6">Antwort</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="C.@%1r4Dd)jcPQSno:Sr"> <mutation name="request"> <arg name="host"></arg> <arg name="json"></arg> <arg name="username"></arg> <arg name="password"></arg> </mutation> <value name="ARG0"> <block type="text" id="[Rls=Dv(tX[~?,{I@=S{"> <field name="TEXT"></field> </block> </value> <value name="ARG1"> <block type="procedures_callcustomreturn" id="%Jw---e/=/1p{vro~gUm"> <mutation name="json_generator"> <arg name="type"></arg> <arg name="payload"></arg> </mutation> <value name="ARG0"> <block type="text" id="0%`5Ivayw4`)7fHe]/=/"> <field name="TEXT">systemfunction</field> </block> </value> <value name="ARG1"> <block type="text" id="dh{WIfs1!eh`gC[LExVD"> <field name="TEXT">screen_on</field> </block> </value> </block> </value> <value name="ARG2"> <block type="text" id="uufN7iZ[`pZzC=_jH+AS"> <field name="TEXT"></field> </block> </value> <value name="ARG3"> <block type="text" id="82y)t{xcd!]EG?A-ts8?"> <field name="TEXT"></field> </block> </value> </block> </value> </block> </xml>
-
Vielen Dank für das Beispiel.
Screen Off and On funktioniert super damit !3 Fragen für weiterführende Sachen mit Message Client:
- Ich bekomme immer folgende Warnung im Log wegen des requests Blocks:
javascript.0 13:54:00.020 warn script.js.Tablet_OG.EZKU-Bewegung-aus: request package is deprecated - please use httpGet (or a stable lib like axios) instead!
Würde das Ganze auch mit einem httpGet Block funktionieren und falls ja, kannst du mir ein Beispiel geben ?
Kannst du mir ein Blockly Beispiel geben wie ich prüfen kann ob z.B. chrome.exe aktiv ist und wie ich die response vom client z.B. in eine Variable schreiben kann zum weiterverarbeiten ?
Kannst du mir ein Blockly Beispiel geben wie ich z.B. eine .bat Datei oder eine Verknüpfung am Desktop mit Message Client starten kann ?
Beste Grüße
-
Hallo, ich hatte keine Zeit gehabt mich deiner Frage zu widmen.
Dies habe ich jetzt gemacht und möchte Dir und auch andere in diesem Topic mein erstelltes Blockly bereitstellen.
Ich bin jetzt auf ein anderes Modul als Request gegangen, da es deprecated ist. Deshalb nutze ich jetzt Axios, wie man dies Installiert komme ich gleich zu.
Man kann leider nicht den Blockly httpPost Block benutzen da er keine Authentifizierung hat.So, damit mein Blockly funktionier muss erst in den Instanz Einstellungen von Javascript Axios installiert werden.
Dort geht man rein und gibt bei Zusätzliche NPM-Module "axios" ohne die Gänsefüsschen ein und drückt Enter. Danach noch die Speichern Taste drücken.
So jetzt kommen wir mal zum Blockly
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="05cyd~/fXw)wYrY_9`j6">Antwort</variable> <variable id="fTNS@?jYjM#KE.CR-mfM">type</variable> <variable id="v{;437#UnpG@Gz,9wi{]">payload</variable> <variable id="E4{G8%+?zO[buECtyli8">host</variable> <variable id="ndKqZ+s}Q8_J2zgP{]Hi">json</variable> <variable id="NaEY_n)9Ak#D)p.|*DW)">username</variable> <variable id="jU:(at05h5/Z]).1pbAw">password</variable> <variable id="WkdOp=DdByyU{Hf%duu7">Objekt</variable> <variable id=".Hn*tX32xa9]}sedS.Rz">Ausgabe</variable> <variable id="v5_8zUtLYJgn{{kAs`Ag">process</variable> <variable id="ih-}E#L@O[@Ht:cRpmBM">status</variable> </variables> <block type="variables_set" id="b#L7b2}c`J]s2/9fL82V" x="50" y="44"> <field name="VAR" id="05cyd~/fXw)wYrY_9`j6">Antwort</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="q/J/vjxx~jn]~XlFE?ks"> <mutation name="request3"> <arg name="host"></arg> <arg name="json"></arg> <arg name="username"></arg> <arg name="password"></arg> </mutation> <value name="ARG0"> <block type="text" id="0H)^hF7b@,4X#wXxY=2v"> <field name="TEXT"></field> </block> </value> <value name="ARG1"> <block type="procedures_callcustomreturn" id="wFTHMBXB)6XEc[Z]Q3vw"> <mutation name="json_generator"> <arg name="type"></arg> <arg name="payload"></arg> </mutation> <value name="ARG0"> <block type="text" id="JCDS^GY3cLS9x:@}f8~r"> <field name="TEXT"></field> </block> </value> <value name="ARG1"> <block type="text" id="w+1H9l/Y(WIt.F%6+T3V"> <field name="TEXT"></field> </block> </value> </block> </value> <value name="ARG2"> <block type="text" id="jKe-rWC5i*l~7kVx3s1@"> <field name="TEXT"></field> </block> </value> <value name="ARG3"> <block type="text" id="sj_$]X40Kbu);D$(F@@o"> <field name="TEXT"></field> </block> </value> </block> </value> <next> <block type="comment" id="9l;)OfO@W4,TSQYckPvW"> <field name="COMMENT">Einlesen der Antwort</field> <next> <block type="variables_set" id=":vby;%kQ,7NTo!}?FAs["> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> <value name="VALUE"> <block type="convert_json2object" id="gytHq8hYpM+1_*yksZ5x"> <value name="VALUE"> <block type="variables_get" id="m4|{ug:;El}qs^ZjFP}F"> <field name="VAR" id="05cyd~/fXw)wYrY_9`j6">Antwort</field> </block> </value> </block> </value> <next> <block type="comment" id="Y)/Kk`7sPI%+n2R{H{w/"> <field name="COMMENT">String oder Objekt</field> <next> <block type="controls_if" id="W`o(JmwVsuiE%4`t%.wW"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="Hs+l?9m4GMSmm$iGvAN~"> <field name="OP">EQ</field> <value name="A"> <block type="convert_type" id="K@GQpF,*a;@QS2saMLk]"> <value name="ITEM"> <block type="variables_get" id="rjfb*nVdb}$iWLBh0R;T"> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> </block> </value> </block> </value> <value name="B"> <block type="text" id="dx6b5)nwYLI;b-dGVq,%"> <field name="TEXT">object</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="~]uV1{yEIC02/jmevV`#"> <field name="COMMENT">process</field> <next> <block type="controls_if" id="d}}iy=fF[6Z:B-H;Tzut"> <value name="IF0"> <block type="object_has_attr" id="bZkucarJxh^(bschEw-l"> <field name="ATTR">process</field> <value name="OBJECT"> <shadow type="get_object" id="8+0Zs*Tt:=[6[o~IO`}d"> <field name="OID">Object ID</field> </shadow> <block type="variables_get" id=",VxFyF*cv]`Z-U.f-$Jg"> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="#Km8-jJh(JtNrRmDgMH:"> <field name="VAR" id="v5_8zUtLYJgn{{kAs`Ag">process</field> <value name="VALUE"> <block type="get_attr" id="}WPeU/*fSw_H0W8(MJqB"> <value name="PATH"> <shadow type="text" id="CDF~sA7Fg5ZG8]:MX4bT"> <field name="TEXT">attribute1</field> </shadow> <block type="text" id="CW-qi8d/5XFID#QwRxIt"> <field name="TEXT">process</field> </block> </value> <value name="OBJECT"> <shadow type="get_object" id="Kj5Zc~mrV{%P8^z?2Iy."> <field name="OID">Object ID</field> </shadow> <block type="variables_get" id="jr=tDUvxQ`}]v*KzFQAL"> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> </block> </value> </block> </value> <next> <block type="variables_set" id="1$STGQMssh`H6.REl?sO"> <field name="VAR" id="ih-}E#L@O[@Ht:cRpmBM">status</field> <value name="VALUE"> <block type="get_attr" id="p{lVupi649H^$8@LU#{W"> <value name="PATH"> <shadow type="text" id="CDF~sA7Fg5ZG8]:MX4bT"> <field name="TEXT">attribute1</field> </shadow> <block type="text" id="RNR0JDp?G/E]C.-L~(V0"> <field name="TEXT">status</field> </block> </value> <value name="OBJECT"> <shadow type="get_object" id="Kj5Zc~mrV{%P8^z?2Iy."> <field name="OID">Object ID</field> </shadow> <block type="variables_get" id="gGwA=:^w5AAi0e9j3~`O"> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> </block> </value> </block> </value> <next> <block type="comment" id="OI49,a1dH;FZ@1vrW4[N"> <field name="COMMENT">Hiernach weitere Blöcke</field> <next> <block type="debug" id="h_+LyeWFvMDV2`S45*$+"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="G7vL,7r)FwS?ex7Xlgp#"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="LhX2t,@cnR-J3upiW{!H"> <field name="VAR" id="v5_8zUtLYJgn{{kAs`Ag">process</field> </block> </value> <next> <block type="debug" id="w3qVI$Aupu#`pEiETBa_"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="G7vL,7r)FwS?ex7Xlgp#"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="3r8D8fTEk#/?*(nbh9Hr"> <field name="VAR" id="ih-}E#L@O[@Ht:cRpmBM">status</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="y)dK{/}-r^z^@8DPzGj|"> <field name="OP">EQ</field> <value name="A"> <block type="convert_type" id="7|BGpP@|W_jkjH0%0F)*"> <value name="ITEM"> <block type="variables_get" id="FVnW|C]BLyZU[kHkc-Z;"> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> </block> </value> </block> </value> <value name="B"> <block type="text" id="raclcE4Jw+*j,O@UJ_+q"> <field name="TEXT">string</field> </block> </value> </block> </value> <statement name="DO1"> <block type="comment" id="v4ln:$-;-K3Ak7?v7m}1"> <field name="COMMENT">message, command, hotkey oder systemfunction</field> <next> <block type="variables_set" id="b_gKh4|*;l^a]B=SZWI."> <field name="VAR" id=".Hn*tX32xa9]}sedS.Rz">Ausgabe</field> <value name="VALUE"> <block type="variables_get" id="6eJ1r=E5aW?52I@aUKke"> <field name="VAR" id="WkdOp=DdByyU{Hf%duu7">Objekt</field> </block> </value> <next> <block type="comment" id="7HS{2.OzN[4UWWf$|ngB"> <field name="COMMENT">Hiernach weitere Blöcke</field> <next> <block type="debug" id="~Y,(jj21{(Vgg^d;/F`j"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="G7vL,7r)FwS?ex7Xlgp#"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="Cb_OBIY3x]/+5=3g(hRh"> <field name="VAR" id=".Hn*tX32xa9]}sedS.Rz">Ausgabe</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defcustomreturn" id="Z54Pq[qn:vy8Fw}n3A9]" x="663" y="63"> <mutation statements="false"> <arg name="type" varid="fTNS@?jYjM#KE.CR-mfM"></arg> <arg name="payload" varid="v{;437#UnpG@Gz,9wi{]"></arg> </mutation> <field name="NAME">json_generator</field> <field name="SCRIPT">anNvbiA9IEpTT04uc3RyaW5naWZ5KHsNCiAgICB0eXBlIDogdHlwZSwNCiAgICBwYXlsb2FkIDogcGF5bG9hZA0KfSkNCg0KcmV0dXJuIGpzb247</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defcustomreturn" id="$ddJErJe`G|i!1I8h-lj" x="663" y="113"> <mutation statements="false"> <arg name="host" varid="E4{G8%+?zO[buECtyli8"></arg> <arg name="json" varid="ndKqZ+s}Q8_J2zgP{]Hi"></arg> <arg name="username" varid="NaEY_n)9Ak#D)p.|*DW)"></arg> <arg name="password" varid="jU:(at05h5/Z]).1pbAw"></arg> </mutation> <field name="NAME">request3</field> <field name="SCRIPT">Y29uc3QgYXhpb3MgPSByZXF1aXJlKCJheGlvcyIpOw0KDQpyZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gew0KICAgICAgICBheGlvcy5wb3N0KGBodHRwOi8vJHtob3N0fTo4MDgwL2AsIGpzb24sIHsNCiAgICAgICAgICAgIGhlYWRlcnM6IHsNCiAgICAgICAgICAgICAgICAiQXV0aG9yaXphdGlvbiI6IGBCYXNpYyAke0J1ZmZlci5mcm9tKGAke3VzZXJuYW1lfToke3Bhc3N3b3JkfWApLnRvU3RyaW5nKCJiYXNlNjQiKX1gLA0KICAgICAgICAgICAgICAgICJDb250ZW50LVR5cGUiOiAiYXBwbGljYXRpb24vanNvbiINCiAgICAgICAgICAgIH0NCiAgICAgICAgfSkNCiAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4gcmVzb2x2ZShKU09OLnN0cmluZ2lmeShyZXNwb25zZS5kYXRhKSkpDQogICAgICAgIC5jYXRjaChlcnJvciA9PiByZWplY3QoZXJyb3IpKTsNCiAgICB9KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
Ich habe es so Aufgebaut das es mit jeden Funktionen mit Message Client funktioniert.
Jetzt zu deinen Fragen:
-
Du musst bei type: process und bei payload: chrome ohne .exe eingeben, das wird automatisch drangehangen.
Dann kannst du die Informationen aus den Variablen process und status entnehmen. -
Um zum Beispiel eine .bat datei oder eine Verknüpfung vom Desktop starten zu können musst du bei type: command eintragen und bei payload: C:\Users\xxxxx\Desktop\chrome.lnk für die Verknüpfung oder "C:\Users\xxxxx\Documents\start.bat" für die .bat Datei.
-
-
Vielen Dank für das Script und die Beispiele, das hat mir sehr geholfen !
Ich hab soweit alles hinbekommen mit process und command.
Die laufenden Programme kann ich abfragen und den Bilschirm ein/ausschalten etc.Was ich noch nicht hinbekommen habe ist hotkey.
Mit folgendem Script funktioniert die Ausführung der ESC Taste nicht:Mache ich hier beim Aufruf was falsch, oder wo liegt das Problem ?
Hier noch der Log Output dazu:
javascript.0 2025-01-27 07:45:33.735 error Error: connect ETIMEDOUT 192.168.30.21:8080 at Function.AxiosError.from (file:///opt/iobroker/node_modules/@iobroker-javascript.0/axios/lib/core/AxiosError.js:92:14) at RedirectableRequest.handleRequestError (file:///opt/iobroker/node_modules/@iobroker-javascript.0/axios/lib/adapters/http.js:620:25) at RedirectableRequest.emit (node:events:518:28) at RedirectableRequest.emit (node:domain:489:12) at ClientRequest.eventHandlers.<computed> (/opt/iobroker/node_modules/follow-redirects/index.js:38:24) at ClientRequest.emit (node:events:530:35) at ClientRequest.emit (node:domain:489:12) at emitErrorEvent (node:_http_client:101:11) at Socket.socketErrorListener (node:_http_client:504:5) at Socket.emit (node:events:518:28) at Axios.request (file:///opt/iobroker/node_modules/@iobroker-javascript.0/axios/lib/core/Axios.js:45:41) at processTicksAndRejections (node:internal/process/task_queues:95:5) javascript.0 2025-01-27 07:45:33.735 error Error: connect ETIMEDOUT 192.168.30.21:8080 javascript.0 2025-01-27 07:45:33.735 error An error happened which is most likely from one of your scripts, but the originating script could not be detected.
-
@Qlink
Hallo vielen Dank für dein Lob und deine Nachricht.
Ich habe es selber mal ausprobiert und bei mir drückt er die Taste ESC. Habe ich mit einer Website herausgefunden wo man die Tastatur überprüfen kann.
Folgende Fragen erstmal an dich:- Hast du von mir die neuste Version des Scriptes (die letzte aus diesem topic) und die neuste Version von MessageClient.exe (da wo in dem Programm eine v1.8 steht)?
- Was ist in dem Programm in dem Output zu sehen?
- Stürtzt das Programm MessageClient.exe ab?
Wenn du mir diese Fragen beantworten kannst könnte ich vielleicht den Fehler eingrenzen.
Der Aufruf sieht für mich richtig aus.
Du kannst ja gerne nochmal zum testen mein Blockly probieren obwohl es eigentlich dasselbe macht.
Ich hoffe das es irgendwann dann klappt.
EDIT:
Was mir eben noch aufgefallen ist:
Kann es sein das beim umschalten in den Sreensaver diverse mechanismen von Windows greifen und meine Software "einfrieren"?
Probiere da mal andere befehle zu senden. Wenn es auch nicht klappt müsste meine Vermutung stimmen. -
Ja ich hab die 1.8er Version inkl. der neuesten Version des Scriptes am Laufen.
Deine Vermutung scheint (zumindest teilweise) richtig zu sein:
Solange der Screensaver aktiv ist werden scheinbar keine hotkeys vom MessageClient erfasst.
Commands (wie z.B. ein Programmaufruf) funktionieren allerdings trotzdem.Sobald ich den Sceensaver manuell per richtiger ESC Taste beende, werden danach auch sämtliche hotkeys übermittelt und im output angezeigt.
Ich habs auch mit einem Texteditor probiert.
- leerer Texteditor aufgemacht
- Screensaver gestartet
- hotkey "ABC" übermittelt
- Screensaver manuell per richtiger ESC Taste beendet
- erst jetzt wird "ABC" im Texteditor übermittelt