NEWS
FritzBox Onlinezeit von Teilnehmern verlängern
-
Und noch mal ich:
https://github.com/schlomo/fritzbox-internet-ticket
Also Auslesen der Tickets müsste prinzipiell möglich sein
-
Und ich spamme weiter - beim Umbau meines Routen-Skriptes zum auslesen der Codes habe ich das hier gefunden:
https://forum.iobroker.net/topic/36095/internet-filter-in-der-fritzbox-mit-javascript-setzen
-
@bananajoe danke, dass probiere ich mal aus. Ist ein wenig umständlich, aber besser wie gar nix.
Probiere es auch mal über ein Blockly und Countdown inkl. möglicher Bonuszeit. Mal schauen, wie weit ich da komme. -
@stefanrs mit meinem Skript bin ich bisher gescheitert, im FHEM Forum gibt es was. (Das Auslesen der Tickets)
Der Pfad scheint anders zu sein, wenn ich diekids*
Seiten abfragen bekomme ich immer eine Gesamtübersicht zurück.
Die Seite scheint nicht über/data.lua
sondern über/internet/kids.lua
etc erreichbar zu sein.Wobei in der Gesamtliste auch die "Links" sind, also die Namen der Unterseiten. Sachen wie WireGuard konnte ich abfragen, aber aus dem Kids-Bereich hat bei mir nichts funktioniert
Gehen muss es, die BoxToGo App kann es ja auch abfragen
-
Also ich hab es mit Blockly lösen können. Hab es getestet und es hat funktioniert.
So schaut es ausDie Bonuszeit gebe ich per Befehl in Telegram ein und aktiviere damit 30min. Läßt sich beliebig oft wiederholen.
Zusätzlich habe ich noch einen täglichen Befehl eingeführt, der nachts das Gerät (in dem Fall die PS5 vom Sohnemann) wieder im Netz freischaltet und
die "Spielzeit" resettet. -
@stefanrs welche Datenpunkte steuerst du genau?
active
ist vermutlich ob Gerät xyz online ist,
command
ist dertr-064.0.states.command
?Ich würde auch einen Export deines Skriptes nehmen
-
Ich hatte auch so einen Gedanken, jedoch hatte ich angenommen das sich das gerät einfach auch bei nichtbenutzung im Wlan befindet, und der active Status bzw. dessen Zeit Stempel daher nicht wirklich brauchbar ist um einen "benutzungs-Zeitraum" zu analysieren.
Wenn es für dich so geht, natürlich um so besser
-
@bananajoe du liegst mit beiden Annahmen richtig. Ich stelle morgen den Export rein. Kopiert man die Zeilen einfach in den Beitrag? In anderen Beiträgen mit Auszügen hab ich immer ein "Spoiler" Button gesehen.
-
@cinimod ja das hatte ich auch erst gedacht. Aber nach Inaktivität, geht er auf inaktiv.
Aber das gute ist, dass bei mir das betroffene Gerät direkt mit LAN angeschlossen ist. Also da passt der Status sehr gut -
@stefanrs einfach den Export als Code, also in den Code-Tags einfügen, wenn es zu lang wird begrenzt er das selbst (so das man nur den Anfang sieht, aber scrollen kann)
-
@bananajoe Anbei das Script
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="}/BV?J`ZBj[g9)lo@/Xb">Spielzeit</variable> <variable type="interval" id="Intervall">Intervall</variable> <variable id="ew40Bf2{8Yw8DtK6weyX">Bonuszeit</variable> <variable type="interval" id="Intervall2">Intervall2</variable> </variables> <block type="on_ext" id="5/ZEq7o$e2CNvj5jJlHX" x="-4505" y="-3273"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <comment pinned="true" h="80" w="160">Tägliche Spielzeit</comment> <value name="OID0"> <shadow type="field_oid" id="t4`1=0WacF/7lwKvu(Cg"> <field name="oid">tr-064.1.devices.ps5-61c94dlan.active</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="H4kymGZi,S/A#4@/o{1{"> <value name="IF0"> <block type="logic_compare" id="$$O,t76l+aa8c(]0i43_"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="igDb+CncG)X!rO5Vu%Lc"> <field name="ATTR">val</field> <field name="OID">tr-064.1.devices.ps5-61c94dlan.active</field> </block> </value> <value name="B"> <block type="logic_boolean" id="Ri5vcHZx_XV!-7M:jV@z"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="J*VPf~+lNGw$P];BN]5_"> <field name="VAR" id="}/BV?J`ZBj[g9)lo@/Xb">Spielzeit</field> <value name="VALUE"> <block type="get_value" id="7,TyJg}[afyM3GYn!WBF"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Playstation.Spielzeit</field> </block> </value> <next> <block type="timeouts_clearinterval" id="_i)|aBOk-+gG6k+}~Mxy"> <field name="NAME">Intervall</field> <next> <block type="timeouts_setinterval" id="nh_mg|XZDI2A]T7k24K*"> <field name="NAME">Intervall</field> <field name="INTERVAL">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="math_change" id="Vv{m[XOiXR;=x3VpTS6n"> <field name="VAR" id="}/BV?J`ZBj[g9)lo@/Xb">Spielzeit</field> <value name="DELTA"> <shadow type="math_number" id="d+;Dk{:1B#R0y!u80D;,"> <field name="NUM">-1</field> </shadow> </value> <next> <block type="update" id=".~)p{s$FPpIp[`Cg^VcW"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Playstation.Spielzeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="cU7rCPb,n.s|5yGD?(|f"> <field name="VAR" id="}/BV?J`ZBj[g9)lo@/Xb">Spielzeit</field> </block> </value> <next> <block type="controls_if" id="d;8#gYb(h@)[|[5=cb67"> <value name="IF0"> <block type="logic_compare" id="V5|yFTv}ud64?E7BWj3k"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="pmH-*R?j_F:.6cxA^T/N"> <field name="VAR" id="}/BV?J`ZBj[g9)lo@/Xb">Spielzeit</field> </block> </value> <value name="B"> <block type="math_number" id="w:w`pMlaG+l@AD,C{i}l"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_clearinterval" id="[C$s~CNZ%``pv`rXQ4bU"> <field name="NAME">Intervall</field> <next> <block type="control" id="u:{aZ$a`y1pEKVwdU0Bh"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tr-064.1.states.command</field> <field name="WITH_DELAY">FALSE</field> <comment pinned="true" h="80" w="160">Command Befehl vom TR064 Adapter. NewDisallow: 1= Gerät wird gespertt 0= Geräte wieder freigeschaltet </comment> <value name="VALUE"> <block type="text" id="4}qm.Z8#Y[A4Le2O)kkN"> <field name="TEXT">{ "service": "urn:dslforum-org:service:X_AVM-DE_HostFilter:1", "action": "DisallowWANAccessByIP", "params": { "NewIPv4Address": "192.168.178.118", "NewDisallow": 1 } }</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </statement> <next> <block type="on_ext" id="#{+.-:M($}0:gUxj]xk1"> <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="kI1r9AD7*Tz`}A:uKb2B"> <field name="oid">0_userdata.0.Playstation.Bonuszeit_Aktivator</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="#*2B^/XUIN#JV9E(Yzkd"> <value name="IF0"> <block type="logic_compare" id="_64G!8.HoP7*RGMlu|4o"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="m7ZLAgsEOHtrK=7:fDQ_"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Playstation.Bonuszeit_Aktivator</field> </block> </value> <value name="B"> <block type="logic_boolean" id="H,FV%ShQCi5GT8x#l7$p"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Oj80pJCR}+*)DlD7$(,)"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tr-064.1.states.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="-:{k+}jPr}rv)p)G(7Zf"> <field name="TEXT">{ "service": "urn:dslforum-org:service:X_AVM-DE_HostFilter:1", "action": "DisallowWANAccessByIP", "params": { "NewIPv4Address": "192.168.178.118", "NewDisallow": 0 } }</field> </block> </value> <next> <block type="update" id="+6$r)*skoKdB%TW37-9n"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Playstation.Extrazeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="6+tKP`C3rVwPK,KwJCWO"> <field name="NUM">1800</field> </block> </value> <next> <block type="variables_set" id="bscs6L0+m`?]=6(a,4]p"> <field name="VAR" id="ew40Bf2{8Yw8DtK6weyX">Bonuszeit</field> <value name="VALUE"> <block type="get_value" id="GI?clIE]o%sgbN1+$~uz"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Playstation.Extrazeit</field> </block> </value> <next> <block type="timeouts_clearinterval" id="!{i%+gK)aqs00*9i9hO5"> <field name="NAME">Intervall2</field> <next> <block type="timeouts_setinterval" id="`0`zG3^f1IY1km|y`}Td"> <field name="NAME">Intervall2</field> <field name="INTERVAL">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="math_change" id="PKl]c;Q/DDv}NCp|3*cn"> <field name="VAR" id="ew40Bf2{8Yw8DtK6weyX">Bonuszeit</field> <value name="DELTA"> <shadow type="math_number" id=".{vboei$0X.Jy){kSTU2"> <field name="NUM">-1</field> </shadow> </value> <next> <block type="update" id="+M8VoW5o7SVdgMR-7.D+"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Playstation.Extrazeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="P3c9U.Xo^vSObZ:V?ejD"> <field name="VAR" id="ew40Bf2{8Yw8DtK6weyX">Bonuszeit</field> </block> </value> <next> <block type="controls_if" id="I~^3=?vpN0,9u(g)QbQ!"> <value name="IF0"> <block type="logic_compare" id="VI,6xaUA1u}sAdum8l~Y"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="]wrti}f7XbqcTmJGZgX~"> <field name="VAR" id="ew40Bf2{8Yw8DtK6weyX">Bonuszeit</field> </block> </value> <value name="B"> <block type="math_number" id="1lKv4F@t-EP2eZ_ww3~q"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_clearinterval" id="JeD[K:Y-KD5-thJyRpK="> <field name="NAME">Intervall2</field> <next> <block type="control" id="o;0vLTy1:G0khe9,Oix?"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tr-064.1.states.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="..tJUyU1=CLa$$Y,EfY;"> <field name="TEXT">{ "service": "urn:dslforum-org:service:X_AVM-DE_HostFilter:1", "action": "DisallowWANAccessByIP", "params": { "NewIPv4Address": "192.168.178.118", "NewDisallow": 1 } }</field> </block> </value> <next> <block type="update" id="NO`p]!;Di0]4`nr}8,4u"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Playstation.Bonuszeit_Aktivator</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="~/awpVORNqBC?RGed9:y"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </xml>