<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="fY_F9{eY1;h}wP?vcr()">UptimeZeit</variable>
<variable id="?EJ`gu88:dm2f6c(O0fA">uptimeHeute</variable>
</variables>
<block type="comment" id="/;ZRw=#X-(8q/6mmWt-j" x="88" y="-362">
<field name="COMMENT">Datenpunkt anlegen</field>
<next>
<block type="create" id="K(QDlz0t6.{2Pq+PF_A^">
<field name="NAME">0_userdata.0.unifi.Nutzungsdauer_Frank</field>
<value name="VALUE">
<block type="math_number" id="F:fd)tm:n!J6^vPJg$:H">
<field name="NUM">0</field>
</block>
</value>
<value name="COMMON">
<block type="text" id="q6Pk,4oOFfz~N`%)`^jw">
<field name="TEXT">{"name": "NutzungsdauerFrank", "type": "string", "unit": "h", "write": true, "read": true}</field>
</block>
</value>
<next>
<block type="comment" id="dwTsB5EXpHuS0=+=4Gp.">
<field name="COMMENT">um 0:01 den Wert merken</field>
<next>
<block type="schedule" id="b[lyw/{nfZfvqKs4+VvL">
<field name="SCHEDULE">1 0 * * *</field>
<statement name="STATEMENT">
<block type="variables_set" id="_WC{AOB{MCn`w+CZ0:[F">
<field name="VAR" id="fY_F9{eY1;h}wP?vcr()">UptimeZeit</field>
<value name="VALUE">
<block type="get_value" id="9Ox]xc@g|k2Vl5XwkWf6">
<field name="ATTR">val</field>
<field name="OID">unifi.1.default.clients.18:65:90:81:be:bf.uptime</field>
</block>
</value>
</block>
</statement>
<next>
<block type="comment" id="hx=3,gLEAlY2M5P9|.Zs">
<field name="COMMENT">Berechnen</field>
<next>
<block type="on_ext" id="8,jc8wcL/E4r7n$HaBfB">
<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="?xFLO|`y~#Vhz,Q~=yLv">
<field name="oid">unifi.1.default.clients.18:65:90:81:be:bf.uptime</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="debug" id="?UPgrIZ-lci;kNCIfRn?">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="ZoX+2y9fnOMe?v%6h$lZ">
<field name="TEXT">test</field>
</shadow>
<block type="on_source" id="i%Re+gm?HisoQvZ;y2H?">
<field name="ATTR">state.val</field>
</block>
</value>
<next>
<block type="variables_set" id="+Ad_I(4;Hx9C#}vW2u:3">
<field name="VAR" id="?EJ`gu88:dm2f6c(O0fA">uptimeHeute</field>
<value name="VALUE">
<block type="math_arithmetic" id="#.(*={p.K+|SSE3~X`4." inline="false">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="ic3~jzU3Heq7a]h$my[N">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id=".mm%y[Glk7cd6%LuRXa-">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="HcdJJ1aCFn?dZ]YwAv5h">
<field name="NUM">1000</field>
</shadow>
</value>
<value name="B">
<shadow type="math_number" id="Wkax6/#15pV!${E9IE@4">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="Invk3@2?f1O75MEI=sS!">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="on_source" id="e7iCe8|M,+^]3/?~+(:v">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="F`gi#wosHQ0g`l.:#+pc">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="xcrw1;dE|qXShSx-otl[">
<field name="VAR" id="fY_F9{eY1;h}wP?vcr()">UptimeZeit</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="5]u@T|+HV0Op_TI4:g(w">
<field name="NUM">1</field>
</shadow>
<block type="convert_from_date" id="AwmW29lLcLxZG%k;H#]4">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="text" id="7Um.T_hWoFIoi=UF/(xS">
<field name="TEXT">1970-01-01 00:00</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="mkdE@1?+[f.d7?[}%U5V">
<field name="VAR" id="?EJ`gu88:dm2f6c(O0fA">uptimeHeute</field>
<value name="VALUE">
<block type="convert_from_date" id="c.j)Fc5=0bDEWf6xx#+m">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm</field>
<value name="VALUE">
<block type="variables_get" id="_re-~2thuGY^uWubf{Kp">
<field name="VAR" id="?EJ`gu88:dm2f6c(O0fA">uptimeHeute</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id=")8ne~ZLQBD(i(Yud=L:}">
<field name="COMMENT">in Datenpunkt schreiben</field>
<next>
<block type="update" id=",wh2(O`,J,1c4LrU5Xd2">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.unifi.Nutzungsdauer_Frank</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="4+929|Af=:Z(!b}{w_Sc">
<field name="VAR" id="?EJ`gu88:dm2f6c(O0fA">uptimeHeute</field>
</block>
</value>
<next>
<block type="debug" id="#;K;/u%_kmz(l?i0Vr5X">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="Tvr?+gMKk$:J/eB:;db[">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id="C$k?WDu//?ZuRK?AN,ko">
<field name="VAR" id="?EJ`gu88:dm2f6c(O0fA">uptimeHeute</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>