<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot;]]></title><description><![CDATA[<p dir="auto">Hallo Zusammen, ich möchte gerne ein Image-Widget einblenden wenn die Zeit in einem Datenpunkt eine größere Abweichung als 1min von "jetzt" hat.</p>
<p dir="auto">Die Zeit im Datenpunkt (string) ist wie folgt hinterlegt:<br />
12.09.2022 18:56:30</p>
<p dir="auto">ich weiß ich könnte jetzt ein Skript erstellen dass mir einen weiteren DP setzt wenn diese Bedingung eintritt aber ich hätte es gern direkt im Widget hinterlegt.</p>
<p dir="auto">Kann man das irgendwie über die Sichtbarkeit umsetzen? So in dieser Art fände ich super:<br />
<img src="/assets/uploads/files/1663002015697-2022-09-12-18_59_36-edit-vis-mozilla-firefox.png" alt="2022-09-12 18_59_36-Edit vis – Mozilla Firefox.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.iobroker.net/topic/57925/sichtbarkeit-in-vis-wenn-zeit-in-dp-1min-von-jetzt</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 00:23:24 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/57925.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Sep 2022 17:01:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Tue, 13 Sep 2022 08:28:09 GMT]]></title><description><![CDATA[<p dir="auto">Klasse, das funktioniert ja wie verrückt. Jetzt muss ich nur noch die einzelnen Zeilen verinnerlicht bekommen. Könntest du mir folgende Zeile etwas näher erläutern denn diese erschließt sich mir leider nicht von selbst:</p>
<pre><code>time = date[2] + '-' + date[1] + '-' + date[0] + ' ' + time[1]
</code></pre>
]]></description><link>https://forum.iobroker.net/post/856990</link><guid isPermaLink="true">https://forum.iobroker.net/post/856990</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Tue, 13 Sep 2022 08:28:09 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 18:52:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a><br />
Mit Umformatierung:</p>
<pre><code>const id1 = '0_userdata.0.testzeit'; // enthält Zeit im Format "DD.MM.YYYY hh:mm:ss"
const id2 = '0_userdata.0.testzeit2'; // boolean

on(id1, function(dp) {
    let time = dp.state.val.split(' ');
    let date = time[0].split('.');
    time = date[2] + '-' + date[1] + '-' + date[0] + ' ' + time[1]; 
    setState(id2, Date.now() - new Date(time).getTime() &gt; 60000, true);
});
</code></pre>
]]></description><link>https://forum.iobroker.net/post/856786</link><guid isPermaLink="true">https://forum.iobroker.net/post/856786</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:52:38 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 18:47:20 GMT]]></title><description><![CDATA[<p dir="auto">ach sorry den unterschied hatte ich auf die schnelle gar nicht bemerkt. dachte die umformatierung ist schon dabei. aber trotzdem danke dafür!</p>
]]></description><link>https://forum.iobroker.net/post/856784</link><guid isPermaLink="true">https://forum.iobroker.net/post/856784</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:47:20 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 18:38:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a> sagte: genau das, was im string steht</p>
<p dir="auto">Wie ich oben schon geschrieben habe: Dieses Format lässt sich nicht einfach, sondern nur aufwändig konvertieren. Kann nicht das Format "YYYY-MM-DD hh:mm:ss" erzeugt werden (s. Kommentar im Skript)?</p>
]]></description><link>https://forum.iobroker.net/post/856780</link><guid isPermaLink="true">https://forum.iobroker.net/post/856780</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:38:07 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 18:32:06 GMT]]></title><description><![CDATA[<p dir="auto">sorry musste mal schnell meine Frau einsammeln.</p>
<p dir="auto">Die Logausgabe lautet wie folgt:<br />
javascript.0 (454) script.js.Test8: 12.09.2022 20:30:00</p>
<p dir="auto">genau das, was im string steht</p>
]]></description><link>https://forum.iobroker.net/post/856774</link><guid isPermaLink="true">https://forum.iobroker.net/post/856774</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:32:06 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:50:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a><br />
Ergänze mal um eine Log-Ausgabe und zeige sie.</p>
<pre><code>const id1 = '0_userdata.0.testzeit'; // enthält Zeit im Format "YYYY-MM-DD hh:mm:ss"
const id2 = '0_userdata.0.testzeit2'; // boolean

on(id1, function(dp) {
    log(dp.state.val);
    setState(id2, Date.now() - new Date(dp.state.val).getTime() &gt; 60000, true);
});
</code></pre>
]]></description><link>https://forum.iobroker.net/post/856751</link><guid isPermaLink="true">https://forum.iobroker.net/post/856751</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:48:09 GMT]]></title><description><![CDATA[<p dir="auto">Funktioniert leider nicht. es wird jedes Mal false gesetzt egal welche zeit ich eingebe <img src="https://forum.iobroker.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=ba16ebd4856" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":disappointed:" alt="😞" /></p>
]]></description><link>https://forum.iobroker.net/post/856749</link><guid isPermaLink="true">https://forum.iobroker.net/post/856749</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:42:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a></p>
<pre><code>const id1 = '0_userdata.0.testzeit'; // enthält Zeit im Format "YYYY-MM-DD hh:mm:ss"
const id2 = '0_userdata.0.testzeit2'; // boolean

on(id1, function(dp) {
    setState(id2, Date.now() - new Date(dp.state.val).getTime() &gt; 60000, true);
});
</code></pre>
]]></description><link>https://forum.iobroker.net/post/856745</link><guid isPermaLink="true">https://forum.iobroker.net/post/856745</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:42:15 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:37:22 GMT]]></title><description><![CDATA[<p dir="auto">Änderung von 0_userdata.0.testzeit</p>
]]></description><link>https://forum.iobroker.net/post/856740</link><guid isPermaLink="true">https://forum.iobroker.net/post/856740</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:37:22 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:36:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a><br />
Womit soll getriggert werden?</p>
]]></description><link>https://forum.iobroker.net/post/856739</link><guid isPermaLink="true">https://forum.iobroker.net/post/856739</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:36:44 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:28:34 GMT]]></title><description><![CDATA[<p dir="auto">Mit Java kenne ich mich wiederum leider nicht aus könntest du mir bitte bei dem Code helfen wie er insgesamt aussehen müsste wenn ich den DP 0_userdata.0.testzeit abfage und einen anderen DP 0_userdata.0.testzeit2 auf true setze wenn diese Bedingung eintritt. Das wäre auch eine super Vorlage für mich um weitere ähnliche Probleme lösen zu können.</p>
]]></description><link>https://forum.iobroker.net/post/856737</link><guid isPermaLink="true">https://forum.iobroker.net/post/856737</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:28:34 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:22:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a> sagte: Welches Fomat müsste der Zeitstempel denn haben damit man damit vergleichen kann?</p>
<p dir="auto">In Javascript z.B.:</p>
<pre><code>Date.now() - new Date('2022-09-12 18:56:30').getTime() &gt; 60000
</code></pre>
<p dir="auto">Mit Vis kenne ich mich nicht aus.</p>
]]></description><link>https://forum.iobroker.net/post/856736</link><guid isPermaLink="true">https://forum.iobroker.net/post/856736</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:22:34 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:17:04 GMT]]></title><description><![CDATA[<p dir="auto">Mir ist noch eine andere Herangehensweise eigefallen die mir weiterhelfen würde. Statt der Prüfung des strings im DP würde für mich auch eine Prüfung wann der Datenpunkt das letzte mal geändert wurde funktionieren.</p>
<p dir="auto">Sichbarkeit wenn letzte Änderung des DP länger als eine Minute zurück liegt</p>
<p dir="auto">Hätte dazu jemand eine Idee?</p>
]]></description><link>https://forum.iobroker.net/post/856730</link><guid isPermaLink="true">https://forum.iobroker.net/post/856730</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:17:04 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:09:57 GMT]]></title><description><![CDATA[<p dir="auto">okay wenn es nicht anders geht wäre ich auch für eine indirekte Variante offen. Welches Fomat müsste der Zeitstempel denn haben damit man damit vergleichen kann?</p>
]]></description><link>https://forum.iobroker.net/post/856723</link><guid isPermaLink="true">https://forum.iobroker.net/post/856723</guid><dc:creator><![CDATA[prorun]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:09:57 GMT</pubDate></item><item><title><![CDATA[Reply to Sichtbarkeit in VIS wenn Zeit in DP &gt;1min von &quot;jetzt&quot; on Mon, 12 Sep 2022 17:04:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prorun" aria-label="Profile: prorun">@<bdi>prorun</bdi></a> sagte: Die Zeit im Datenpunkt (string) ist wie folgt hinterlegt: 12.09.2022 18:56:30</p>
<p dir="auto">Mit diesem Format sind Vergleiche &gt; oder &lt; nicht möglich. Es lässt sich auch nicht direkt wandeln.</p>
]]></description><link>https://forum.iobroker.net/post/856714</link><guid isPermaLink="true">https://forum.iobroker.net/post/856714</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Mon, 12 Sep 2022 17:04:48 GMT</pubDate></item></channel></rss>