NEWS
Akkustand vom Laptop auslesen
-
@mickym sagte in Akkustand vom Laptop auslesen:
Dieser Adapter erfordert als Proxy, dass ein Programm namens GetAdmin auf Deinem Rechner läuft (muss man von einem russischen Server runterladen), der dann die Befehle des Adapters entgegen nimmt. Aber ich glaube, ich würde das NICHT wollen.
Das ist jetzt aber bissle daneben. Der Entwickler kommt aus Russland, macht einen tollen Job, ist hilfsbereit und das Tool "getadmin" ist natürlich dann auch auf "seinem" Server. Habe das Tool und den Adapter jetzt schon 2 Jahre am Start und, was soll ich sagen, ich wurde noch nicht verhaftet oder bedroht oder gehackt - UND- es funktioniert perfekt !
Das jetzt quasi am Rande !!!
-
das gibt es auch noch https://github.com/Bettman66/ioBroker.wiobrowser
soweit ich weiß, muss der browser nicht genutzt werden - aber die daten des laptops kommen trotzdem bei iobroker an
wioNoweb (same functions without the web)
-
schau mal hier: mit dem Script lasse ich mir meine Steckdose am Laptop ein und ausschalten.
Das script könntest Du z.B. mit dem Windows Task in regelmäßigen Abständen aufrufen.
Somit könntest Du auch Die die entsprechenden Akkustände an iobroker übertragen.
der Befehl zum Ausschalten müsste an diese Stelle. (kannst ja Dir das Script entsprechend anpassen)
) ELSE ( ECHO Batterie über 99%, wird geladen REM Befehle hier http://192.168.178.xxx:8087/set/sonoff.0.Steckdose_5.POWER?value=false ) GOTO ENDE
der Befehl für Steckdose aus:
http://192.168.178.xxx:8087/set/sonoff.0.Steckdose_5.POWER?value=false
ober um einen Wert zu schreiben:
http://192.168.178.xxx:8087/set/Datenpunkt.0.Akkustand?value=20
-
@djmarc75 Ok habs durchgestrichen, um die subjektiven Einschätzungen zu entschärfen. Objektiv habe ich ja gar keine Grundlagen, um eine Gefahrenlage zu unterstellen. Da gebe ich Dir vollkommen Recht.
-
@mickym habs gesehen, mensch Micky, passt doch alles !
-
das hab ich mittlerweile geschafft. Trotzdem danke.
Der gepostete Browser Adapter hat auch mein Interesse geweckt, jedoch kann man den im Windows anscheinend nicht im Kiosk-Modus betreiben.
Da aber jetzt vermutlich exec klar ist, kann man vermutlich alle Befehle absetzen.
Ideen sind natürlich weiter gerne Willkommen.
Lösung für exec: Befehl eintragen, danach selbst eine Variable result erstellen und mit dieser weiterarbeiten. War mir nicht so bewusst, und hab ich zumindest nirgends so gelesen.
-
Hier das Ergebnis:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="P`aq^gme%S^s@1={sVON">result</variable> <variable id="y[tgJd5t@eWrz4E1CoO6">temp</variable> </variables> <block type="on_ext" id="_z4%}l+,%8*HxQy|HKXL" x="12" y="12"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="t)e.k/{l!rv/8W`qUPW7"> <field name="oid">0_userdata.0.VIS-Steuerung.Akkustand</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="3x=48t*(Ps?uY1Z~=Rhp"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id=")$.@bF7WUJ=32}2BFBn(" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="~lt2yHIMc^w~I?-5Jrk$"> <field name="OP">LTE</field> <value name="A"> <block type="on_source" id="C?t[]QrI.xALaIz$c~eZ"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="tF.i~DHSooucxNyWYuL`"> <field name="NUM">30</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="](9o{dRrg$7bf|VQU]|u"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=":$D)3LYxZXB$5.|;w4nO"> <field name="ATTR">val</field> <field name="OID">alias.0.EG.Wohnzimmer.Tablet-iobroker.SET</field> </block> </value> <value name="B"> <block type="logic_boolean" id="GpmVm!~z:WsOKQhsoUU/"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="T8|IHU:CJgrz7i+=Xm0t"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alias.0.EG.Wohnzimmer.Tablet-iobroker.SET</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="M:-f^rg?8u$XuRY9ha3?"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="F^T*|+:Qi5VStj73IOd?"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="b3RVFGRy$[4GaRU#yoaj"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="Sok`{73hmjmAl]/WG3q)"> <field name="TEXT">+++ Tablet Akku </field> </block> </value> <value name="ADD1"> <block type="on_source" id="L#9tP[bTUK[+dVj`w_|}"> <field name="ATTR">state.val</field> </block> </value> <value name="ADD2"> <block type="text" id="wFOGEOxttr#O$MKf.^g)"> <field name="TEXT"> wird geladen +++</field> </block> </value> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="Ee:TLUY6TOO(S.^i0j;S" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="JdfXHxW*p8XJN_(v/ud+"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="vhU_5GylDKUC{$Bzd2PV"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id=")UfKNUF.s%5H%|V%jDYu"> <field name="NUM">100</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="|$HRh]b6.),/s|QDVm$b"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="nWd6.]}fu:T^@$iQ/Q|P"> <field name="ATTR">val</field> <field name="OID">alias.0.EG.Wohnzimmer.Tablet-iobroker.SET</field> </block> </value> <value name="B"> <block type="logic_boolean" id="%G=/[z|-y{~2DlGaZ5]C"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id=",~Ack:=Bjb/c=YXnjg#U"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alias.0.EG.Wohnzimmer.Tablet-iobroker.SET</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="w*nKw[5|vA+5$8J*hfb*"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="0Q9HK/`N.VS;qz2BHE#5"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="b^[oS%VA7axy%#=1@O(*"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="rV;1?e:_)%-+yh[x$2Tv"> <field name="TEXT">+++ Tablet Akku </field> </block> </value> <value name="ADD1"> <block type="on_source" id="+7ftLg3;}%r@uJ%1Sf3s"> <field name="ATTR">state.val</field> </block> </value> <value name="ADD2"> <block type="text" id="!![E1KSCs.1?b|2]p5Pd"> <field name="TEXT"> ist aufgeladen +++</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> <block type="schedule" id="fSVF8B`jnd1u542;5nCu" x="588" y="12"> <field name="SCHEDULE">*/5 * * * *</field> <statement name="STATEMENT"> <block type="exec" id="[6BE11/Gcj.[l5)Rdcmw"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="*Jflc%*XVH_-GN9g1!H}"> <field name="TEXT">wmic path Win32_Battery get EstimatedChargeRemaining /value</field> </shadow> </value> <statement name="STATEMENT"> <block type="update" id="V}:n.mvQ=2F]a)O,Q~Ag"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.VIS-Steuerung.Akkustand</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_tonumber" id="7fuG6n4(X`U0Jrl`PX=4"> <value name="VALUE"> <block type="text_getSubstring" id="joi37QB3H.oDpjJk/]h[" inline="false" collapsed="true"> <mutation at1="true" at2="false"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">LAST</field> <value name="STRING"> <block type="variables_get" id="Wt7Pr;]4c{QQ#L[(VPG5"> <field name="VAR" id="P`aq^gme%S^s@1={sVON">result</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="_er;=7R}=}O)2idyrC2-"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="RjuY2Y#0x9gZ6p5A]=VA"> <field name="NUM">1</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="zUwr|j#aP!^h|Z9(~`LE"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="+JNax]M:g(._$pm$YJ4#"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="q`s;/MGV%dMbW5pDjC@4"> <field name="VAR" id="P`aq^gme%S^s@1={sVON">result</field> </block> </value> <value name="FIND"> <shadow type="text" id=".508(3[pi^r^mo@wTVL@"> <field name="TEXT">=</field> </shadow> </value> </block> </value> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="timeouts_wait" id="}j5-=Sl=*O/]Y-!mSY?}"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="exec" id="aBhhZLIu^wv%SF!Ip}Y6"> <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="5Xy-o/*vi;-e,Dnm?RV."> <field name="TEXT">wmic path win32_battery get BatteryStatus</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id="LAu829ZNOMMdg6xkble%"> <field name="COMMENT">return enthaelt Leerzeichen</field> <next> <block type="variables_set" id="K#//vOiIOp#vI~mgUO3m"> <field name="VAR" id="y[tgJd5t@eWrz4E1CoO6">temp</field> <value name="VALUE"> <block type="convert_tonumber" id="bFTRiey-1,:?M7GruRQh"> <value name="VALUE"> <block type="text_charAt" id="dHWOb}b@,WP{4R/{J0Ce" inline="false" collapsed="true"> <mutation at="true"></mutation> <field name="WHERE">FROM_END</field> <value name="VALUE"> <block type="text_trim" id=")4ipe9t362~@F(S6%z[T"> <field name="MODE">BOTH</field> <value name="TEXT"> <shadow type="text" id="2$,R6Tel[Pq|%~z*@*zg"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id=".A3tBeG@lK5b_c!%@*-)"> <field name="VAR" id="P`aq^gme%S^s@1={sVON">result</field> </block> </value> </block> </value> <value name="AT"> <block type="math_number" id="A0GWXr~@-#o`9xLf]CAd"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <next> <block type="comment" id="4m0TxE`#3%8;5^?Ve-]f"> <field name="COMMENT">Rückgabewerte: 1 : Batterie wird entladen 2 : Stromversorgung angeschlossen, Batterie muss nicht geladen werden 3 : Batterie voll geladen 4 : Ladezustand niedrig 5 : Ladezustand kritisch 6 : Batterie wird geladen 7 : Batterie wird geladen, Ladezustand ist hoch 8 : Batterie wird geladen, Ladezustand ist niedrig 9 : Batterie wird geladen, Ladezustand ist kritisch 10 : Nicht definiert 11 : Ladezustand ist "teilweise geladen"</field> <next> <block type="controls_if" id="QzG3Ck]yBdtMH;ruW5AQ"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="lGALIk[FRI+gvlo]OR6H" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id=";z)Cg+o;q,0jS~F[z!aU"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="dsK$F4L/iY[TxM5YvYaC"> <field name="VAR" id="y[tgJd5t@eWrz4E1CoO6">temp</field> </block> </value> <value name="B"> <block type="math_number" id="y+L4Fl|EcU14G5nd30dC"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="qT-,mqG$(bX}%#M8YVXE" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="H44?6}Re_@}35t`4ELI1"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="eU2g/58!56$9qM8-u)pq"> <field name="VAR" id="y[tgJd5t@eWrz4E1CoO6">temp</field> </block> </value> <value name="B"> <block type="math_number" id="tS:j]MoHc#XIY;?Ny+Ah"> <field name="NUM">4</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="d(OBnrgh18jJIsLV*I4;"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="1VpVbskuED1nC|~iHv,A"> <field name="VAR" id="y[tgJd5t@eWrz4E1CoO6">temp</field> </block> </value> <value name="B"> <block type="math_number" id="[qI:is|I_@em|hSXkQs_"> <field name="NUM">5</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="update" id=":4ZU=%]ArPlr:T8Bbn2+"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.VIS-Steuerung.Stromversorgung</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="x?`k6Fl*DTmDRWYS$7x@"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="update" id="SoZ!%5bH={6m?_`zu0LR"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.VIS-Steuerung.Stromversorgung</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="zx=#Bt9%,*7{nJ79R=N0"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </xml>
-
@falke69
Wenn die Info hier korrekt ist, kann man den Akkustand auch per SNMP auslesen.
https://serverfault.com/questions/303230/querying-windows-server-battery-level-through-snmp -
Danke für die Info. Schau ich mir mal mit an.
-
@codierknecht sagte in Akkustand vom Laptop auslesen:
@falke69
Wenn die Info hier korrekt ist, kann man den Akkustand auch per SNMP auslesen.
https://serverfault.com/questions/303230/querying-windows-server-battery-level-through-snmpUnter Windows 11 ist es nicht mehr so leicht, SNMP out of the box zu aktivieren. (Nicht mehr Bestandteil der erweiterten Windows Features). Hier gibts einen Artikel zu, wie es geht:
https://techwithjasmin.com/monitoring/can-you-still-monitor-your-windows-11-with-snmp/
-
-
@wendy2702 said in Akkustand vom Laptop auslesen:
@biker1602 Der Rechner scheint aktuell nicht ins Internet zu kommen.
ping 8.8.8.8
Ich trenne das jetzt aber mal vom Ursprünglichen Thema ab da wir zu weit abdriften
Das sieht so aus
login as: biker1602 biker1602@192.168.57.211's password: Linux Debian 5.15.83-1-pve #1 SMP PVE 5.15.83-1 (2022-12-15T00:00Z) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Jan 13 16:37:38 2023 biker1602@Debian:~$ ping 8.8.8.8 ping: socket: Operation not permitted biker1602@Debian:~$