- Übersicht
- Deutsch
- Entwicklung
- [Major Update] UniFi Adapter v0.5.0
[Major Update] UniFi Adapter v0.5.0
-
@braindead sagte in [Major Update] UniFi Adapter v0.5.0:
30 Sekunden? Welche Scheingenauigkeit möchtest Du damit erreichen?
Das war nur zum testen. Und was meinst Du mit Scheingenauigkeit ? Standard ist 60 Sekunden eingestellt, da logge ich mich auch jedes Mal ein und aus. Ich bin ja nur am probieren welcher Wert für eine An/Abwesenheitserkennung Sinn macht.
-
@dslraser Einige User erhoffen sich, dass sie sofort merken, ob ein Client on-/offline ist. Ich dachte Du wärst einer davon. Sorry.
Ich habe Deinen Test gerade bei mir nachgestellt: 30 Sekunden sind kein Problem. Nur ein Client funktioniert solange, wie dieser Client online ist. Geht dieser Client offline, bekomme ich die selbe Fehlermeldung wie Du. Das sollte sich leicht fixen lassen.
-
@dslraser Ich habe gerade v0.5.1-beta.3 auf GitHub veröffentlicht. Der Fehler sollte gefixt sein. Kannst Du das mal bei Dir probieren?
-
@braindead sagte in [Major Update] UniFi Adapter v0.5.0:
@dslraser Ich habe gerade v0.5.1-beta.3 auf GitHub veröffentlicht. Der Fehler sollte gefixt sein. Kannst Du das mal bei Dir probieren?
Mache ich, aber nicht mehr jetzt.
-
@braindead Beta3 scheint bei mir jetzt zu klappen.
Keine Fehlermeldung bisher. Mal Abwarten bis morgen. -
@braindead sagte in [Major Update] UniFi Adapter v0.5.0:
@dslraser Einige User erhoffen sich, dass sie sofort merken, ob ein Client on-/offline ist. Ich dachte Du wärst einer davon. Sorry.
Ich habe Deinen Test gerade bei mir nachgestellt: 30 Sekunden sind kein Problem. Nur ein Client funktioniert solange, wie dieser Client online ist. Geht dieser Client offline, bekomme ich die selbe Fehlermeldung wie Du. Das sollte sich leicht fixen lassen.
Der Fehler ist nun weg, jedenfalls kann ich ihn nicht mehr nachstellen.
Danke auf jeden Fall.
-
-
@braindead Beta5 ist installiert. Bisher wieder ohne Fehlermeldungen. Es scheint auch alles zu funktionieren wie gewohnt.
-
hab das nun mal mit dem
unifi.0.default.clients.XYZ.is_online
getestet, habe mir Telegram über den Schraubenschlüssel aktiviert.
Problem jedochZeitstempel
undletzte Änderung
, somit kommt bei jedem Abfrageintervall eine Nachricht, da sichletzte Änderung
fortlaufend mit aktualisiert,
selbiges betrifft auchis_wired
in der History sieht.is_online
so aus, funktioniert mit beta 5
-
ich mache es so und es funktioniert. (für is_online habe ich keinen vernünftigen Trigger hinbekommen, da letzter Wert und vorletzer Wert auch nicht funktioniert, auf Grund null/false oder null/true und der von Dir beschriebenen Aktualisierung)
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id=";k,Ihk0[-)fmYrQXm8m^">anlegen_in</variable> <variable type="" id="nTXOZ!3I{zM-7hg^DXcc">last_seen_by_uap</variable> <variable type="undefined" id="schedule">schedule</variable> </variables> <block type="procedures_defcustomnoreturn" id="eZsGA^2r{c%G,YpuLp]K" x="13" y="13"> <mutation statements="false"> <arg name="anlegen_in" varid=";k,Ihk0[-)fmYrQXm8m^"></arg> </mutation> <field name="NAME">Datenpunkte_anlegen</field> <field name="SCRIPT">LyoqCiAqIENyZWF0ZSBzdGF0ZXMgdW5kZXIgMF91c2VyZGF0YS4wIG9yIGphdmFzY3JpcHQueAogKiBDdXJyZW50IFZlcnNpb246ICAgICBodHRwczovL2dpdGh1Yi5jb20vTWljLU0vaW9icm9rZXIuY3JlYXRlVXNlclN0YXRlcwogKiBTdXBwb3J0OiAgICAgICAgICAgICBodHRwczovL2ZvcnVtLmlvYnJva2VyLm5ldC90b3BpYy8yNjgzOS8KICogQXV0b3I6ICAgICAgICAgICAgICAgTWljIChpb0Jyb2tlcikgfCBNaWMtTSAoZ2l0aHViKQogKiBWZXJzaW9uOiAgICAgICAgICAgICAxLjEgKDI2IEphbnVhcnkgMjAyMCkKICogRXhhbXBsZTogICAgICAgICAgICAgc2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9NaWMtTS9pb2Jyb2tlci5jcmVhdGVVc2VyU3RhdGVzI2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FjawogICAgICAgICAgICAgICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2coJ1tEZWJ1Z10gRnVuY3Rpb24gdG8gY2FsbGJhY2sgcGFyYW1ldGVyIHdhcyBwcm92aWRlZCcpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgIH0gZWxzZSB7CiAgICAgICAgLy8gQ3JlYXRlIFN0YXRlcyB1bmRlciAwX3VzZXJkYXRhLjAKICAgICAgICBsZXQgbnVtU3RhdGVzID0gc3RhdGVzVG9DcmVhdGUubGVuZ3RoOwogICAgICAgIGxldCBjb3VudGVyID0gLTE7CiAgICAgICAgc3RhdGVzVG9DcmVhdGUuZm9yRWFjaChmdW5jdGlvbihsb29wUGFyYW0pIHsKICAgICAgICAgICAgY291bnRlciArPSAxOwogICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2cgKCdbRGVidWddIEN1cnJlbnRseSBwcm9jZXNzaW5nIGZvbGxvd2luZyBzdGF0ZTogWycgKyBsb29wUGFyYW1bMF0gKyAnXScpOwogICAgICAgICAgICBpZiggKCQobG9vcFBhcmFtWzBdKS5sZW5ndGggPiAwKSAmJiAoZXhpc3RzU3RhdGUobG9vcFBhcmFtWzBdKSkgKSB7IC8vIFdvcmthcm91bmQgZHVlIHRvIGh0dHBzOi8vZ2l0aHViLmNvbS9pb0Jyb2tlci9pb0Jyb2tlci5qYXZhc2NyaXB0L2lzc3Vlcy80NzgKICAgICAgICAgICAgICAgIC8vIFN0YXRlIGlzIGV4aXN0aW5nLgogICAgICAgICAgICAgICAgaWYgKFdBUk4gJiYgIWZvcmNlKSBsb2coJ1N0YXRlIFsnICsgbG9vcFBhcmFtWzBdICsgJ10gaXMg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soKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gZ28gb3V0IGFuZCBjb250aW51ZSB3aXRoIG5leHQgZWxlbWVudCBpbiBsb29wLgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47IC8vIGh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zLzE4NDUyOTIwL2NvbnRpbnVlLWluLWN1cnNvci1mb3JlYWNoCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSAvLyBpZighZm9yY2UpCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC8vIFN0YXRlIGlzIG5vdCBleGlzdGluZyBvciBmb3JjZSA9IHRydWUsIHNvIHdlIGFyZSBjb250aW51aW5nIHRvIGNyZWF0ZSB0aGUgc3RhdGUgdGhyb3VnaCBzZXRPYmplY3QoKS4KICAgICAgICAgICAgbGV0IG9iaiA9IHt9OwogICAgICAgICAgICBvYmoudHlwZSA9ICdzdGF0ZSc7CiAgICAgICAgICAgIG9iai5uYXRpdmUgPSB7fTsKICAgICAgICAgICAgb2JqLmNvbW1vbiA9IGxvb3BQYXJhbVsxXTsKICAgICAgICAgICAgc2V0T2JqZWN0KGxvb3BQYXJhbVswXSwgb2JqLCBmdW5jdGlvbiAoZXJyKSB7CiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgbG9nKCdDYW5ub3Qgd3JpdGUgb2JqZWN0IGZvciBzdGF0ZSBbJyArIGxvb3BQYXJhbVswXSArICddOiAnICsgZXJyKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKExPR19ERUJVRykgbG9nKCdbRGVidWddIE5vdyB3ZSBhcmUgY3JlYXRpbmcgbmV3IHN0YXRlIFsnICsgbG9vcFBhcmFtWzBdICsgJ10nKQogICAgICAgICAgICAgICAgICAgIGxldCBpbml0ID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICBpZihsb29wUGFyYW1bMV0uZGVmID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9vcFBhcmFtWzFdLnR5cGUgPT09ICdudW1iZXInKSBpbml0ID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9vcFBhcmFtWzFdLnR5cGUgPT09ICdib29sZWFuJykgaW5pdCA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICBpZihsb29wUGFyYW1bMV0udHlwZSA9PT0gJ3N0cmluZycpIGluaXQgPSAnJzsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gbG9vcFBhcmFtWzFdLmRlZjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0U3RhdGUobG9vcFBhcmFtWzBdLCBpbml0LCB0cnVlLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMT0dfREVCVUcpIGxvZygnW0RlYnVnXSBzZXRTdGF0ZSBkdXJjaGdlZsO8aHJ0OiAnICsgbG9vcFBhcmFtWzBdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bVN0YXRlcy0tOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG51bVN0YXRlcyA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMT0dfREVCVUcpIGxvZygnW0RlYnVnXSBBbGwgc3RhdGVzIHByb2Nlc3NlZC4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNhbGxiYWNrID09PSAnZnVuY3Rpb24nKSB7IC8vIGV4ZWN1dGUgaWYgYSBmdW5jdGlvbiB3YXMgcHJvdmlkZWQgdG8gcGFyYW1ldGVyIGNhbGxiYWNrCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMT0dfREVCVUcpIGxvZygnW0RlYnVnXSBGdW5jdGlvbiB0byBjYWxsYmFjayBwYXJhbWV0ZXIgd2FzIHByb3ZpZGVkJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjaygpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgfSwgREVMQVkgKyAoMjAgKiBjb3VudGVyKSApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgIH0KfQoKCmxldCBzdGF0ZXNUb0NyZWF0ZSA9IFsKICAgIC8vQW53ZXNlbmhlaXQgUGVyc29uZW4vSGFuZHlzCiAgICBbJ0Fud2VzZW5oZWl0LkhlaWtvJywgeyduYW1lJzonSGVpa28gQW53ZXNlbmhlaXQnLCAndHlwZSc6J3N0cmluZycsICdyZWFkJzp0cnVlLCAnd3JpdGUnOnRydWUsICdyb2xlJzonc3RyaW5nJywgJ2RlZic6J25vY2ggbGVlcicgfV0sCiAgICBbJ0Fud2VzZW5oZWl0LktlcnN0aW4nLCB7J25hbWUnOidLZXJzdGluIEFud2VzZW5oZWl0JywgJ3R5cGUnOidzdHJpbmcnLCAncmVhZCc6dHJ1ZSwgJ3dyaXRlJzp0cnVlLCAncm9sZSc6J3N0cmluZycsICdkZWYnOidub2NoIGxlZXInIH1dLAogICAKXTsKCmNyZWF0ZVVzZXJTdGF0ZXMoYW5sZWdlbl9pbiwgZmFsc2UsIHN0YXRlc1RvQ3JlYXRlLCBmdW5jdGlvbigpezsKICAgIG1haW4oKTsKfSk7CgoK</field> <comment pinned="false" h="80" w="160">Datenpunkte erstellen</comment> </block> <block type="procedures_callcustomnoreturn" id="(4(-f$1VS~CwO}P[R@.6" x="13" y="63"> <mutation name="Datenpunkte_anlegen"> <arg name="anlegen_in"></arg> </mutation> <value name="ARG0"> <block type="text" id="4)/(kKqpd^/S.|-%(%s!"> <field name="TEXT">javascript.0</field> </block> </value> </block> <block type="procedures_defnoreturn" id="SSMy$1MUVX,GQsbb[2*m" x="13" y="138"> <field name="NAME">main</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="variables_set" id="x/A;x*nKgX6!*YEVG!tq"> <field name="VAR" id="nTXOZ!3I{zM-7hg^DXcc" variabletype="">last_seen_by_uap</field> <value name="VALUE"> <block type="field_oid" id="K-7W*}@_6*8kH(w#3=u0"> <field name="oid">unifi.0.default.clients.8c:b8:4a:34:ac:85.last_seen_by_uap</field> </block> </value> <next> <block type="schedule_create" id="S/j#m7!^1%Nt=iNwzRS-"> <field name="NAME">schedule</field> <value name="SCHEDULE"> <shadow type="field_cron" id=";r[9Exo]CQHPwtqLrQZQ"> <field name="CRON">* * * * *</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="o|V8!@#=5R+|*I`05TB4"> <field name="VAR" id="nTXOZ!3I{zM-7hg^DXcc" variabletype="">last_seen_by_uap</field> <value name="VALUE"> <block type="field_oid" id="b,nG5]~+E^QmVj}^OLHK"> <field name="oid">unifi.0.default.clients.8c:b8:4a:34:ac:85.last_seen_by_uap</field> </block> </value> <next> <block type="controls_if" id="_z?rO3%XvQmDU%U1=lon"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="/$w3`9Ff5xYiel|?K5Az"> <field name="OP">LTE</field> <value name="A"> <block type="math_arithmetic" id="VZ6IF-gK]$)JS9mN{`YK"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="QkfPH}!i3jgK?TzPhTe%"> <field name="NUM">1</field> </shadow> <block type="time_get" id="a[3B]W)o~qbg7R,|dJ7b"> <mutation format="false" language="false"></mutation> <field name="OPTION">m</field> </block> </value> <value name="B"> <shadow type="math_number" id="fw{ZJArB^VS):u6pli(T"> <field name="NUM">1</field> </shadow> <block type="convert_from_date" id="h@3O[Rmjr1W_;=7DZ:i`"> <mutation format="false" language="false"></mutation> <field name="OPTION">m</field> <value name="VALUE"> <block type="get_value_var" id="7Eq~kIl^~FZt/42Sm`V@"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="y/6*Cdpp{jB70^`7!Yz+"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="]6E|f-t0Ik)68zsY9^!g"> <field name="VAR" id="nTXOZ!3I{zM-7hg^DXcc" variabletype="">last_seen_by_uap</field> </block> </value> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="-aa6)TlDt;0}DX3miju8"> <field name="NUM">1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control_ex" id="q8DK@_{T^+trL5u?goV]" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="oI~m.j|.S**Jp#2.s;,j"> <field name="oid">javascript.0.Anwesenheit.Heiko</field> </shadow> </value> <value name="VALUE"> <shadow type="logic_boolean" id="onH/zg_lwNY;i9[%)$^d"> <field name="BOOL">TRUE</field> </shadow> <block type="text" id="Ec6r1EfG`xz73%/NnY!k"> <field name="TEXT">Heiko ist online ✅</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="yqWXH0g:VUZYAU{*-Lwk"> <field name="NUM">0</field> </shadow> </value> </block> </statement> <statement name="ELSE"> <block type="control_ex" id="~m81/itJLw]L5+x.f9j(" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="Q|$,f:2fvqDb-qr(b.[Y"> <field name="oid">javascript.0.Anwesenheit.Heiko</field> </shadow> </value> <value name="VALUE"> <shadow type="logic_boolean" id="onH/zg_lwNY;i9[%)$^d"> <field name="BOOL">TRUE</field> </shadow> <block type="text" id="e:z5Xl{@]xk_kF5Zt#I1"> <field name="TEXT">Heiko ist offline ❌</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="w7Yo75yEr6SeiQTojkXq"> <field name="NUM">0</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="on_ext" id="B9:ea#4L(Oy)Bn!/1XDs"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="+{|4+_:MEg}y(8j4):jk"> <field name="oid">javascript.0.Anwesenheit.Heiko</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="89X)lg$MSzz$I)(L[.@R"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="bic_/sHb4(u+:*T{HBaI"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="WIl,L_Tr4-jPC9#bj!LS"> <field name="ATTR">val</field> <field name="OID">javascript.0.Anwesenheit.Heiko</field> </block> </value> <value name="B"> <block type="text" id="Zrc,Gsx.Rl-VpL5{1FTH"> <field name="TEXT">Heiko ist online ✅</field> </block> </value> </block> </value> <statement name="DO0"> <block type="telegram" id="54*y/hkmyWndQBH{h#)V"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">Markdown</field> <value name="MESSAGE"> <shadow type="text" id="F8`_}5Ls0W8c7x2c+hZa"> <field name="TEXT">text</field> </shadow> <block type="text" id="@W?c;cM+bwA__@R-$2Ex"> <field name="TEXT">Heiko ist online ✅</field> </block> </value> <value name="USERNAME"> <block type="text" id="e%4Xn,W12]|0tv_IN1s{"> <field name="TEXT">Heiko</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="telegram" id="gONL!Ak:KiDx*lp_)..%"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">Markdown</field> <value name="MESSAGE"> <shadow type="text" id="=nQH.TsZSn{lfpy^dbYY"> <field name="TEXT">text</field> </shadow> <block type="text" id="MzWy_rxy3nBlUY?~nN9r"> <field name="TEXT">Heiko ist offline ❌</field> </block> </value> <value name="USERNAME"> <block type="text" id="WR[xJSy`G(s0Y):xgWwf"> <field name="TEXT">Heiko</field> </block> </value> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </xml>
-
@crunchip Ich bin mir nicht ganz sicher, ob ich Deinen Text richtig verstehe, deshalb habe ich das bei mir mit v0.5.1-beta.5 nachgestellt und
is_online
undis_wired
von meinem Handy werden geloggt und Änderungen werden mir per Telegram geschickt.Ich habe für die beiden DPs genau eine Telegram Nachricht bekommen, als das Handy offline gegangen ist. Genauso gab es jeweils nur einen Eintrag in der Historie. Selbiges ist passiert, als ich 30 Minuten später wieder online gegangen bin. Bei mir funktioniert die Aktualisierung der DPs also genau wie es sein soll.
Die Tatsache, dass
is_wired
sich ändert, wenn der Client offline geht, ist ein Bug des UniFi Controllers. Ich habe versucht das abzufangen, es ist mir bisher aber nicht gelungen.@dslraser In v0.5.1-beta.5 gibt es die null/false bzw. null/true Problematik nicht mehr. Kannst Du das bitte einmal testen und bestätigen?
-
@braindead sagte in [Major Update] UniFi Adapter v0.5.0:
In v0.5.1-beta.5 gibt es die null/false bzw. null/true Problematik nicht mehr. Kannst Du das bitte einmal testen und bestätigen?
probiere ich aus.
-
@braindead sagte in [Major Update] UniFi Adapter v0.5.0:
In v0.5.1-beta.5 gibt es die null/false bzw. null/true Problematik nicht mehr. Kannst Du das bitte einmal testen und bestätigen?
Top scheint zu funktionieren (kurz getestet)
einmal abgemeldet und einige Minuten später wieder angemeldet.
22.5.2020, 13:14:33.823 [info ]: javascript.0 (2548) Stop script script.js.13_Anwesenheit.Beta_5 22.5.2020, 13:14:33.948 [info ]: javascript.0 (2548) Start javascript script.js.13_Anwesenheit.Beta_5 22.5.2020, 13:14:33.959 [info ]: javascript.0 (2548) script.js.13_Anwesenheit.Beta_5: registered 1 subscription and 0 schedules 22.5.2020, 13:15:54.114 [info ]: javascript.0 (2548) script.js.13_Anwesenheit.Beta_5: 60 Sekunden: false 22.5.2020, 13:18:54.007 [info ]: javascript.0 (2548) script.js.13_Anwesenheit.Beta_5: 60 Sekunden: true
-
@braindead sagte in [Major Update] UniFi Adapter v0.5.0:
In v0.5.1-beta.5 gibt es die null/false bzw. null/true Problematik nicht mehr. Kannst Du das bitte einmal testen und bestätigen?
Zum Thema Anwesenheit:
Ich habe mal schnell was mit Blockly zusammengeklöppelt und werde damit mal ne Weile probieren. Ich habe bei mir erstmal nur zwei Personen zur Anwesenheit drinn. Bisher sieht das ganz gut aus, danke @braindead Mal sehen wie sich die Handys im Ruhemodus schlagen (zwei x Samsung)
Hier in der Funktion die Namen der Personen eintragen. In die Funktion klicken und zuden Zeilen 129/130 scrollen
Da die Namen eintragen
und im Blockly vor dem ersten Start auf die eigenen Daten anpassen
Nach dem ersten Blockly Start werden die Datenpunkte erstellt und der aktuelle Zustand der beiden Geräte eingelesen.
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id=";k,Ihk0[-)fmYrQXm8m^">anlegen_in</variable> <variable type="" id="fyVM({2.Ubq}R7hxFVRc">speicherort</variable> <variable type="" id="nTXOZ!3I{zM-7hg^DXcc">person_1_is_online_DP</variable> <variable type="" id="lvz.2`K]e8c1*JEc-vJu">anwesenheit_person_1</variable> <variable type="" id="@i-nl2q|$|OFpK!Yx+CC">anwesenheit_person_2</variable> <variable type="" id="yB(N?#)zIjYIo%.B@UT(">person_2_is_online_DP</variable> <variable type="" id=";^euFaDvC/jHl4C^!SUw">person_1</variable> <variable type="undefined" id="start">start</variable> <variable type="" id="sgYRW3,@::dC5Ux]x;8|">person_2</variable> <variable type="" id="![EW]9b!hQ9S[MT.q}6-">telegram_benutzer</variable> </variables> <block type="procedures_defcustomnoreturn" id="eZsGA^2r{c%G,YpuLp]K" x="13" y="13"> <mutation statements="false"> <arg name="anlegen_in" varid=";k,Ihk0[-)fmYrQXm8m^"></arg> </mutation> <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W1lIGJlaGF2aW9yIGFzIGNyZWF0ZVN0YXRlIGlmIG5vIGluaXQgdmFsdWUgaXMgcHJvdmlkZWQKICAgICAgICAgICAgY3JlYXRlU3RhdGUobG9vcFBhcmFtWzBdLCBsb29wSW5pdCwgZm9yY2UsIGxvb3BQYXJhbVsxXSwgZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICBudW1TdGF0ZXMtLTsKICAgICAgICAgICAgICAgIGlmIChudW1TdGF0ZXMgPT09IDApIHsKICAgICAgICAgICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2coJ1tEZWJ1Z10gQWxsIHN0YXRlcyBwcm9jZXNzZWQuJyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjYWxsYmFjayA9PT0gJ2Z1bmN0aW9uJykgeyAvLyBleGVjdXRlIGlmIGEgZnVuY3Rpb24gd2FzIHByb3ZpZGVkIHRvIHBhcmFtZXRlciBjYWxsYmFjawogICAgICAgICAgICAgICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2coJ1tEZWJ1Z10gRnVuY3Rpb24gdG8gY2FsbGJhY2sgcGFyYW1ldGVyIHdhcyBwcm92aWRlZCcpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgIH0gZWxzZSB7CiAgICAgICAgLy8gQ3JlYXRlIFN0YXRlcyB1bmRlciAwX3VzZXJkYXRhLjAKICAgICAgICBsZXQgbnVtU3RhdGVzID0gc3RhdGVzVG9DcmVhdGUubGVuZ3RoOwogICAgICAgIGxldCBjb3VudGVyID0gLTE7CiAgICAgICAgc3RhdGVzVG9DcmVhdGUuZm9yRWFjaChmdW5jdGlvbihsb29wUGFyYW0pIHsKICAgICAgICAgICAgY291bnRlciArPSAxOwogICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2cgKCdbRGVidWddIEN1cnJlbnRseSBwcm9jZXNzaW5nIGZvbGxvd2luZyBzdGF0ZTogWycgKyBsb29wUGFyYW1bMF0gKyAnXScpOwogICAgICAgICAgICBpZiggKCQobG9vcFBhcmFtWzBdKS5sZW5ndGggPiAwKSAmJiAoZXhpc3RzU3RhdGUobG9vcFBhcmFtWzBdKSkgKSB7IC8vIFdvcmthcm91bmQgZHVlIHRvIGh0dHBzOi8vZ2l0aHViLmNvbS9pb0Jyb2tlci9pb0Jyb2tlci5qYXZhc2NyaXB0L2lzc3Vlcy80NzgKICAgICAgICAgICAgICAgIC8vIFN0YXRlIGlzIGV4aXN0aW5nLgogICAgICAgICAgICAgICAgaWYgKFdBUk4gJiYgIWZvcmNlKSBsb2coJ1N0YXRlIFsnICsgbG9vcFBhcmFtWzBdICsgJ10gaXMgYWxyZWFkeSBleGlzdGluZyBhbmQgd2lsbCBubyBsb25nZXIgYmUgY3JlYXRlZC4nLCAnd2FybicpOwogICAgICAgICAgICAgICAgaWYgKCFXQVJOICYmIExPR19ERUJVRykgbG9nKCdbRGVidWddIFN0YXRlIFsnICsgbG9vcFBhcmFtWzBdICsgJ10gaXMgYWxyZWFkeSBleGlzdGluZy4gT3B0aW9uIGZvcmNlICg9b3ZlcndyaXRlKSBpcyBzZXQgdG8gWycgKyBmb3JjZSArICddLicpOwogICAgICAgICAgICAgICAgaWYoIWZvcmNlKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gU3RhdGUgZXhpc3RzIGFuZCBzaGFsbCBub3QgYmUgb3ZlcndyaXR0ZW4gc2luY2UgZm9yY2U9ZmFsc2UKICAgICAgICAgICAgICAgICAgICAvLyBTbywgd2UgZG8gbm90IHByb2NlZWQuCiAgICAgICAgICAgICAgICAgICAgbnVtU3RhdGVzLS07CiAgICAgICAgICAgICAgICAgICAgaWYgKG51bVN0YXRlcyA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2coJ1tEZWJ1Z10gQWxsIHN0YXRlcyBzdWNjZXNzZnVsbHkgcHJvY2Vzc2VkIScpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNhbGxiYWNrID09PSAnZnVuY3Rpb24nKSB7IC8vIGV4ZWN1dGUgaWYgYSBmdW5jdGlvbiB3YXMgcHJvdmlkZWQgdG8gcGFyYW1ldGVyIGNhbGxiYWNrCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoTE9HX0RFQlVHKSBsb2coJ1tEZWJ1Z10gQW4gb3B0aW9uYWwgY2FsbGJhY2sgZnVuY3Rpb24gd2FzIHByb3ZpZGVkLCB3aGljaCB3ZSBhcmUgZ29pbmcgdG8gZXhlY3V0ZSBub3cuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gZ28gb3V0IGFuZCBjb250aW51ZSB3aXRoIG5leHQgZWxlbWVudCBpbiBsb29wLgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47IC8vIGh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zLzE4NDUyOTIwL2NvbnRpbnVlLWluLWN1cnNvci1mb3JlYWNoCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSAvLyBpZighZm9yY2UpCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC8vIFN0YXRlIGlzIG5vdCBleGlzdGluZyBvciBmb3JjZSA9IHRydWUsIHNvIHdlIGFyZSBjb250aW51aW5nIHRvIGNyZWF0ZSB0aGUgc3RhdGUgdGhyb3VnaCBzZXRPYmplY3QoKS4KICAgICAgICAgICAgbGV0IG9iaiA9IHt9OwogICAgICAgICAgICBvYmoudHlwZSA9ICdzdGF0ZSc7CiAgICAgICAgICAgIG9iai5uYXRpdmUgPSB7fTsKICAgICAgICAgICAgb2JqLmNvbW1vbiA9IGxvb3BQYXJhbVsxXTsKICAgICAgICAgICAgc2V0T2JqZWN0KGxvb3BQYXJhbVswXSwgb2JqLCBmdW5jdGlvbiAoZXJyKSB7CiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7CiAgICAgICAgICAgICAgICAgICAgbG9nKCdDYW5ub3Qgd3JpdGUgb2JqZWN0IGZvciBzdGF0ZSBbJyArIGxvb3BQYXJhbVswXSArICddOiAnICsgZXJyKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKExPR19ERUJVRykgbG9nKCdbRGVidWddIE5vdyB3ZSBhcmUgY3JlYXRpbmcgbmV3IHN0YXRlIFsnICsgbG9vcFBhcmFtWzBdICsgJ10nKQogICAgICAgICAgICAgICAgICAgIGxldCBpbml0ID0gbnVsbDsKICAgICAgICAgICAgICAgICAgICBpZihsb29wUGFyYW1bMV0uZGVmID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9vcFBhcmFtWzFdLnR5cGUgPT09ICdudW1iZXInKSBpbml0ID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9vcFBhcmFtWzFdLnR5cGUgPT09ICdib29sZWFuJykgaW5pdCA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICBpZihsb29wUGFyYW1bMV0udHlwZSA9PT0gJ3N0cmluZycpIGluaXQgPSAnJzsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gbG9vcFBhcmFtWzFdLmRlZjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0U3RhdGUobG9vcFBhcmFtWzBdLCBpbml0LCB0cnVlLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMT0dfREVCVUcpIGxvZygnW0RlYnVnXSBzZXRTdGF0ZSBkdXJjaGdlZsO8aHJ0OiAnICsgbG9vcFBhcmFtWzBdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bVN0YXRlcy0tOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG51bVN0YXRlcyA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMT0dfREVCVUcpIGxvZygnW0RlYnVnXSBBbGwgc3RhdGVzIHByb2Nlc3NlZC4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNhbGxiYWNrID09PSAnZnVuY3Rpb24nKSB7IC8vIGV4ZWN1dGUgaWYgYSBmdW5jdGlvbiB3YXMgcHJvdmlkZWQgdG8gcGFyYW1ldGVyIGNhbGxiYWNrCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMT0dfREVCVUcpIGxvZygnW0RlYnVnXSBGdW5jdGlvbiB0byBjYWxsYmFjayBwYXJhbWV0ZXIgd2FzIHByb3ZpZGVkJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjaygpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgfSwgREVMQVkgKyAoMjAgKiBjb3VudGVyKSApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9KTsKICAgIH0KfQoKcGVyc29uMSA9ICdIZWlrbycKcGVyc29uMiA9ICdLZXJzdGluJwpsZXQgc3RhdGVzVG9DcmVhdGUgPSBbCiAgICAvL0Fud2VzZW5oZWl0IFBlcnNvbmVuL0hhbmR5cwogICAgWydVbmlmaS5Bbndlc2VuaGVpdC4nK1twZXJzb24xXSwgeyduYW1lJzpbcGVyc29uMV0rJyBBbndlc2VuaGVpdCcsICd0eXBlJzonc3RyaW5nJywgJ3JlYWQnOnRydWUsICd3cml0ZSc6dHJ1ZSwgJ3JvbGUnOidzdHJpbmcnLCAnZGVmJzonbm9jaCBsZWVyJyB9XSwKICAgIFsnVW5pZmkuQW53ZXNlbmhlaXQuJytbcGVyc29uMl0sIHsnbmFtZSc6W3BlcnNvbjJdKycgQW53ZXNlbmhlaXQnLCAndHlwZSc6J3N0cmluZycsICdyZWFkJzp0cnVlLCAnd3JpdGUnOnRydWUsICdyb2xlJzonc3RyaW5nJywgJ2RlZic6J25vY2ggbGVlcicgfV0sCiAgIApdOwoKY3JlYXRlVXNlclN0YXRlcyhhbmxlZ2VuX2luLCBmYWxzZSwgc3RhdGVzVG9DcmVhdGUsIGZ1bmN0aW9uKCl7OwogICAgbWFpbigpOwp9KTsKCgo=</field> <comment pinned="false" h="80" w="160">Datenpunkte erstellen</comment> </block> <block type="variables_set" id="oODt+HYM*+ptP0jLnPoN" x="13" y="62"> <field name="VAR" id="fyVM({2.Ubq}R7hxFVRc" variabletype="">speicherort</field> <value name="VALUE"> <block type="text" id="^a2)}wPt=s[~]UsHJqvr"> <field name="TEXT">0_userdata.0</field> </block> </value> <next> <block type="comment" id="@hJky?+Qv5OpJOJa;Tl6"> <field name="COMMENT">Unifi Adapter Client DP is_online</field> <next> <block type="variables_set" id="Y?6=|YzWSeM4LOdF5$XM"> <field name="VAR" id="nTXOZ!3I{zM-7hg^DXcc" variabletype="">person_1_is_online_DP</field> <value name="VALUE"> <block type="field_oid" id="knG,[`=1g+b,s{kx1EP,"> <field name="oid">unifi.0.default.clients.8c:b8:4a:34:ac:85.is_online</field> </block> </value> <next> <block type="comment" id="/R=ulymL%~caLxh2Ilfo"> <field name="COMMENT">Unifi Adapter Client DP is_online</field> <next> <block type="variables_set" id="Vx9vV3Sg8kY@H?;zDw@("> <field name="VAR" id="yB(N?#)zIjYIo%.B@UT(" variabletype="">person_2_is_online_DP</field> <value name="VALUE"> <block type="field_oid" id="!feFu(z:sKBl~0nK`eGu"> <field name="oid">unifi.0.default.clients.04:d6:aa:76:06:53.is_online</field> </block> </value> <next> <block type="variables_set" id="9m,K[:2^)KFEl|00rZQ7"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> <value name="VALUE"> <block type="text" id="pJ}1(u|}l3lA7~[z+Wg5"> <field name="TEXT">Heiko</field> </block> </value> <next> <block type="variables_set" id="k`L|~6i[HzfGD|D*L^Z["> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> <value name="VALUE"> <block type="text" id="$^o6%]+%A^W3{Txo4Yds"> <field name="TEXT">Kerstin</field> </block> </value> <next> <block type="variables_set" id="bEu?$N6,|qbfd8h2t;xr"> <field name="VAR" id="![EW]9b!hQ9S[MT.q}6-" variabletype="">telegram_benutzer</field> <value name="VALUE"> <block type="text" id="@AJ19!Lch7=H%ib(sX@`"> <field name="TEXT">Heiko</field> </block> </value> <next> <block type="procedures_callcustomnoreturn" id="(4(-f$1VS~CwO}P[R@.6" collapsed="true"> <mutation name="Datenpunkte_anlegen"> <arg name="anlegen_in"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="!74)L93;^_?DR0pALJ9f"> <field name="VAR" id="fyVM({2.Ubq}R7hxFVRc" variabletype="">speicherort</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defnoreturn" id="SSMy$1MUVX,GQsbb[2*m" x="12" y="313"> <field name="NAME">main</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="timeouts_cleartimeout" id="TZP~F0nTRJ5tX).DDSa`" collapsed="true"> <field name="NAME">start</field> <next> <block type="variables_set" id=",U2@|cXpD(cMh/t+?6ch" collapsed="true"> <field name="VAR" id="lvz.2`K]e8c1*JEc-vJu" variabletype="">anwesenheit_person_1</field> <value name="VALUE"> <block type="text_join" id="!1[II16BPGnRh-7=6hz["> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="xK5Ij}90B8}K(46SJ?nI"> <field name="VAR" id="fyVM({2.Ubq}R7hxFVRc" variabletype="">speicherort</field> </block> </value> <value name="ADD1"> <block type="text" id="j|:+t7a^%@D?7F{x85Vu"> <field name="TEXT">.Unifi.Anwesenheit.</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="/d9dG48mWBBOwwOV|b7q"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> </block> </value> <next> <block type="variables_set" id="!b3P0hupqzO)$LYY_96G" collapsed="true"> <field name="VAR" id="@i-nl2q|$|OFpK!Yx+CC" variabletype="">anwesenheit_person_2</field> <value name="VALUE"> <block type="text_join" id="j^1|XvQ;,bZdK7j*e[W]"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="{e5Na0l3aK]%yCR.A^B{"> <field name="VAR" id="fyVM({2.Ubq}R7hxFVRc" variabletype="">speicherort</field> </block> </value> <value name="ADD1"> <block type="text" id="IVD:VEYV~yR=s_-/Xf!N"> <field name="TEXT">.Unifi.Anwesenheit.</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="Aty5L{S^6krr(,SAac[M"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> </block> </value> <next> <block type="timeouts_settimeout" id=".|_m4*n~bGC)tC]M]!E^" collapsed="true"> <field name="NAME">start</field> <field name="DELAY">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="controls_if" id="@IdN-@8]b19pM5K:RKAV"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="mOtoF5ZD{_J6ssks0m)y"> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="P=ub#}lCd=k9sU(YPcg:"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="+?=%oVJ6|*ti.6j6/Wxj"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="l+hT5v.Pk.O2J$/Iaqt,"> <field name="VAR" id="nTXOZ!3I{zM-7hg^DXcc" variabletype="">person_1_is_online_DP</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="9{xgUNQr|Jen;~u_$)6d"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control_ex" id=".V]CdR(,WY/[gHi[+RLy" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="3%^DGT`3E`2/0p:w3{4^"> <field name="VAR" id="lvz.2`K]e8c1*JEc-vJu" variabletype="">anwesenheit_person_1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id="f8$xC!VB#l1J#2YIx60!"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="1oBT:?uj_zr?Mgi+#WM`"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> <value name="ADD1"> <block type="text" id="SWk`f2QCt@7CE*{M9F=y"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="Gh(!zydv3Jh_{d7dIKNr"> <field name="TEXT">ist online ✅</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="I7CJ`-|pTzVbPm]Rm~#j"> <field name="NUM">0</field> </shadow> </value> </block> </statement> <statement name="ELSE"> <block type="control_ex" id="Rm7t|TP;p?8IkYCVTFYf" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="rh!@7z?k=8.uZbxF?DoI"> <field name="VAR" id="lvz.2`K]e8c1*JEc-vJu" variabletype="">anwesenheit_person_1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id=";.n,Hn*I2XhhSW85o_Q2"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="tu5-.4UIt2~I(onp}L$P"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> <value name="ADD1"> <block type="text" id="`*!Euh8@c0Kv1`dL)`|]"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="OP@O9n8`%s$i4iu!qalG"> <field name="TEXT">ist offline ❌</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="?QJBHR?P%=ONW9U|7bz~"> <field name="NUM">0</field> </shadow> </value> </block> </statement> <next> <block type="controls_if" id="CW7PDI-i5$*GOj_KJb4Q"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="-!aPk*oy9xC5J=ysP)7="> <field name="OP">EQ</field> <value name="A"> <block type="get_value_var" id="n+Ps:J5qI;GEdiv{)E?z"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="+?=%oVJ6|*ti.6j6/Wxj"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="!|b(=p?G65~q+jglAR8w"> <field name="VAR" id="yB(N?#)zIjYIo%.B@UT(" variabletype="">person_2_is_online_DP</field> </block> </value> </block> </value> <value name="B"> <block type="logic_boolean" id="!(SIj5PDvV$R:iUQ*(LP"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control_ex" id="4VEiHKIjpLMpRX2h?+MR" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="MTibw$-yf66T#p]`3z?r"> <field name="VAR" id="@i-nl2q|$|OFpK!Yx+CC" variabletype="">anwesenheit_person_2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id=":iT@UQ1eLTq{?.Nc0-Ob"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=")vF^Rbw,2,7/)$D8gF};"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> <value name="ADD1"> <block type="text" id="23zE8haiF=Z5L.H#Pk7i"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="+0!/qeY$7F8aH-xnRR*0"> <field name="TEXT">ist online ✅</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="l4gI%#`:C=?(4rd|p`^."> <field name="NUM">0</field> </shadow> </value> </block> </statement> <statement name="ELSE"> <block type="control_ex" id="W?x]+MW|=5vu@Uj(3,75" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="VV1Lj`Qf^tQkmc+x.maW"> <field name="VAR" id="@i-nl2q|$|OFpK!Yx+CC" variabletype="">anwesenheit_person_2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id="ll.R;kcidI|hRLwDFVB{"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="WD$^uCEDqYwF6:QS*F]j"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> <value name="ADD1"> <block type="text" id="wR$`1P`CT=B)$/YSN(~J"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="4c(~/}V#~bT!jwy2iB}J"> <field name="TEXT">ist offline ❌</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="!d5FRdKZAaU7?)=#m4%_"> <field name="NUM">0</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="on_ext" id="SX%6!fqcVoVlD@SU-7Y4" collapsed="true"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=";0_S:)AqTJF$]lRUv@gx"> <field name="oid">default</field> </shadow> <block type="variables_get" id="UKe(AmN7{4GdYH(3_`O#"> <field name="VAR" id="nTXOZ!3I{zM-7hg^DXcc" variabletype="">person_1_is_online_DP</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="_z?rO3%XvQmDU%U1=lon"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="_(Fal+8L^ATHe#Hq|y+9"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="control_ex" id="LM-KIX/g(V6Tuik9CLF/" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="7,y}skvg#u?n$OT[5K=S"> <field name="VAR" id="lvz.2`K]e8c1*JEc-vJu" variabletype="">anwesenheit_person_1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id="l|J80x/T-`0?9M^7b]:N"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=".qiA1:)|eFl9@:8-b6*`"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> <value name="ADD1"> <block type="text" id="G0=0Fc~I_fA]0O)}g3W("> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="]N,+4OnsaC~Lw_.k0/hh"> <field name="TEXT">ist online ✅</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="1:S1**dQmdnwe.l7.Z-b"> <field name="NUM">0</field> </shadow> </value> <next> <block type="telegram" id="54*y/hkmyWndQBH{h#)V"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">Markdown</field> <value name="MESSAGE"> <shadow type="text" id="F8`_}5Ls0W8c7x2c+hZa"> <field name="TEXT">text</field> </shadow> <block type="text_join" id="IGB?:md|3ZD;,sYcS|bg"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="/tAT/wS-)[}+6m*I4~g8"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> <value name="ADD1"> <block type="text" id="fFlUO))aCIA!f=Yag|;M"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="V[o?yVyX~D{w{(:^NNVr"> <field name="TEXT">ist online ✅</field> </block> </value> </block> </value> <value name="USERNAME"> <block type="variables_get" id="41ZPm5?AKrt.cqhBg3{2"> <field name="VAR" id="![EW]9b!hQ9S[MT.q}6-" variabletype="">telegram_benutzer</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control_ex" id="YN=l|7.)+2WVOGMcg!/`" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="4.t^B;y;~YJA^DTb;gyE"> <field name="VAR" id="lvz.2`K]e8c1*JEc-vJu" variabletype="">anwesenheit_person_1</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id="o}K:*wP8{onf4yKv=4YT"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="941ISD`abMu2l=]8Y(/m"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> <value name="ADD1"> <block type="text" id="ZM+pW%,1k!o2Vf?t0R?l"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="S__OPp))@Dgo/JTcf}ax"> <field name="TEXT">ist offline ❌</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="f6RJ7!swO;Le1Bfko;L2"> <field name="NUM">0</field> </shadow> </value> <next> <block type="telegram" id="gONL!Ak:KiDx*lp_)..%"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">Markdown</field> <value name="MESSAGE"> <shadow type="text" id="=nQH.TsZSn{lfpy^dbYY"> <field name="TEXT">text</field> </shadow> <block type="text_join" id="z,us3C]4=+L0DA.p_}lp"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="i3Q4|n~53-sQ?^T*H.TC"> <field name="VAR" id=";^euFaDvC/jHl4C^!SUw" variabletype="">person_1</field> </block> </value> <value name="ADD1"> <block type="text" id="QFr-g%mo//Sg8;:roRfA"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id=")0nYWe-N-O.,_Jrn${Vm"> <field name="TEXT">ist offline ❌</field> </block> </value> </block> </value> <value name="USERNAME"> <block type="variables_get" id="vm,}kUg}PwBi!:PsGM,{"> <field name="VAR" id="![EW]9b!hQ9S[MT.q}6-" variabletype="">telegram_benutzer</field> </block> </value> </block> </next> </block> </statement> </block> </statement> <next> <block type="on_ext" id="~ObZs=5%-:^CnQuYO(z=" collapsed="true"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=";0_S:)AqTJF$]lRUv@gx"> <field name="oid">default</field> </shadow> <block type="variables_get" id="Olbu@Xq[MZTK?j4d_a#g"> <field name="VAR" id="yB(N?#)zIjYIo%.B@UT(" variabletype="">person_2_is_online_DP</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="!K2H`_FR~oD9eh*@T1|w"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="*I8C7_{s9`7I(Zx#@%|2"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="control_ex" id="mFAN(dDUr6q/gR6UwBVZ" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="$UftmC*.f}ze-ab-ys,Q"> <field name="VAR" id="@i-nl2q|$|OFpK!Yx+CC" variabletype="">anwesenheit_person_2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id="P3N04_kX]?qG{Xs2[(fH"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="P5IAcPBtd#@dS,*2B@fW"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> <value name="ADD1"> <block type="text" id="r7@)j/8/+({|VPB=@6%r"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="xxE=NzJgw3NYsn-%!LPx"> <field name="TEXT">ist online ✅</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="p/d5]r.~2%E#lqUZ+Zzo"> <field name="NUM">0</field> </shadow> </value> <next> <block type="telegram" id="G/k/uD]_e{FwK|;oni_9"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">Markdown</field> <value name="MESSAGE"> <shadow type="text" id="F8`_}5Ls0W8c7x2c+hZa"> <field name="TEXT">text</field> </shadow> <block type="text_join" id="EwI{:V.W#KbT~#,))hp4"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="rXJ#~l_SmSueR^}c}c+2"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> <value name="ADD1"> <block type="text" id="{++h2{_?][DK]_UJQ!1;"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="+T~B`e5Yo89(P:rS[eXJ"> <field name="TEXT">ist online ✅</field> </block> </value> </block> </value> <value name="USERNAME"> <block type="variables_get" id="SIP/Bn3+q.?-|~fP{|mj"> <field name="VAR" id="![EW]9b!hQ9S[MT.q}6-" variabletype="">telegram_benutzer</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control_ex" id="L{2Dp(q220seA@K)H~:9" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="hRVN~;8VstUL/pd4KSAZ"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="37B(F$tlde-Bt#u.;L~#"> <field name="VAR" id="@i-nl2q|$|OFpK!Yx+CC" variabletype="">anwesenheit_person_2</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="bbVKs5v:Ert)PYdo!`!i"> <field name="BOOL">TRUE</field> </shadow> <block type="text_join" id="eFy4q-cPhD:xWFQ|LO1f"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=";$UrDWF]KPE{L^K`r/hr"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> <value name="ADD1"> <block type="text" id="wwJ^.~7}z9=7(BjXQ.p)"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="lM_E)oJ#UCr|#hxu*pAT"> <field name="TEXT">ist offline ❌</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="~ECK]+XM?KdV2JNU{|2O"> <field name="NUM">0</field> </shadow> </value> <next> <block type="telegram" id="QrG*QsVt38c~9UI4H1.U"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">Markdown</field> <value name="MESSAGE"> <shadow type="text" id="=nQH.TsZSn{lfpy^dbYY"> <field name="TEXT">text</field> </shadow> <block type="text_join" id="i*RxzVi!*A==)}IS5C}S"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="}%!^~Qa|-+l=w6[91@*f"> <field name="VAR" id="sgYRW3,@::dC5Ux]x;8|" variabletype="">person_2</field> </block> </value> <value name="ADD1"> <block type="text" id="nE0K73Q(?EJwI52FCdl@"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="text" id="zQ8F1qC^L?*7c#hE}z_A"> <field name="TEXT">ist offline ❌</field> </block> </value> </block> </value> <value name="USERNAME"> <block type="variables_get" id="M|AZ+FjOe.JP3wkCCbbC"> <field name="VAR" id="![EW]9b!hQ9S[MT.q}6-" variabletype="">telegram_benutzer</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </xml>
-
@braindead siehe meines screens von oben
Zeitstempel und letzte Änderung haben die gleiche Uhrzeit, das Handy ist aber bereits 5 Min aus gewesen, was bedeutet, letzte Änderung(wechsel von true auf false) war um Uhrzeit 09:41Uhr und müsste dann folglich, da der Wert auf false bleibt, bei der Uhrzeit stehen bleiben, da jakeine Änderung
mehr statt findet, die Uhrzeit wird aber mit jeder Intevall Abfrage, mit aktualisiert, folglich kommen kontinuierlich die Telegram Meldungen
Hoffe, es war nun verständlich -
-
@crunchip sagte in [Major Update] UniFi Adapter v0.5.0:
allerdings noch nicht auf .last_seen umgestellt,
das Beispiel von eben ist mit is_online mit der Beta 5
-
@dslraser schreibfehler , meinte ich .is_online
passiert, wenn man schreibt und gleichzeitig was andres liest -
@crunchip sagte in [Major Update] UniFi Adapter v0.5.0:
@dslraser schreibfehler , meinte ich .is_online
passiert, wenn man schreibt und gleichzeitig was andres liestnicht das wir an einander vorbei reden ? Die hast Du seit ein par Tagen ?
-
@dslraser nein, ich hatte beta2 laufen, zusammen mit dem Script, als Anwesenheitserkennung, den Datenpunkt
.uptime_by_uap
hergenommen.
Heute morgen hab ich auf beta 5 umgestellt,
danach Telegram , nicht als blockly, sondern per Schraubenschlüssel aktiviert, für den Datenpunkt.is_online
, was zur Folge hat, Dauerbenachrichtigung, wegen dem Aktualisieren letzte Änderung, was ich oben noch mal erklärt habe