<?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[Logging per Script aktivieren]]></title><description><![CDATA[<p dir="auto">Hallo zusammen,</p>
<p dir="auto">kennt jemand eine Möglichkeit, wie man das Logging (influxDB) per Script aktivieren kann?</p>
<p dir="auto">Ziel des Ganzen ist, auf einen Schlag die Datenpunkte <code>ACTUAL_TEMPERATURE</code> aller Homematic-Geräte zu aktivieren.</p>
<p dir="auto">Für einen Tipp wäre ich sehr dankbar.</p>
]]></description><link>https://forum.iobroker.net/topic/54769/logging-per-script-aktivieren</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 14:15:37 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/54769.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 May 2022 15:21:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Logging per Script aktivieren on Sat, 07 May 2022 17:37:13 GMT]]></title><description><![CDATA[<p dir="auto">Ich lasse dann auch mal den Code da, den ich verwende.</p>
<ol>
<li>Script, um das Selektieren der Datenpunkte zu testen, damit nichts passiert, was ich nicht will.<br />
Sinn des Ganzen ist, dass ich in Ruhe herumprobieren kann, die richtige RegEx zu finden, die die gewünschten Datenpunkte adressiert.<br />
Alles, was das Script macht ist die entsprechenden IDs der Datenpunkte ins Log zu schreiben.</li>
</ol>
<pre><code class="language-//RegEx">let select_dp = $('hm*.*.RSSI*');

//Über alle DP iterieren...
select_dp.each(function(id, i) {
    
    try {
        //Datenpunkte im Log ausgeben
        console.log(id); 
    }

    catch (e) {}
});
</code></pre>
<ol start="2">
<li>Script, um bei den gewünschten Datenpunkten das Logging zu aktiveren.<br />
Dabei wird lediglich das Logging aktiviert und die Option <code>Nur Änderungen aufzeichnen</code> deaktiviert.</li>
</ol>
<pre><code>//DP, für die Logging aktiviert werden soll
let enable_Logging1 = $('hm*.*.RSSI*');

//Über alle DP iterieren...
enable_Logging1.each(function(id, i) {
    
    try {

        //... und Logging aktivieren
        sendTo('influxdb.0', 'enableHistory', {
            id: id,
            options: {
                changesOnly:  false
            }
        }, function (result) {
            if (result.error) {
                console.log(result.error);
            }
            if (result.success) {
                // successfully enabled
                console.log(result.success + ' ' + id);
            }
        });
    }

    catch (e) {}
});
</code></pre>
<ol start="3">
<li>Script, um bei den gewünschten Datenpunkten das Logging zu deaktivieren.</li>
</ol>
<pre><code>//DP, für die Logging deaktiviert werden soll
let disable_Logging1 = $('hm*.*.RSSI*');

//Über alle DP iterieren...
disable_Logging1.each(function(id, i) {
    
    try {

        //... und Logging aktivieren
        sendTo('influxdb.0', 'disableHistory', {
            id: id,
        }, function (result) {
            if (result.error) {
                console.log(result.error);
            }
            if (result.success) {
                // successfully disabled
                console.log(result.success + ' ' + id);
            }
        });
    }

    catch (e) {}
});
</code></pre>
]]></description><link>https://forum.iobroker.net/post/799919</link><guid isPermaLink="true">https://forum.iobroker.net/post/799919</guid><dc:creator><![CDATA[Hiltex]]></dc:creator><pubDate>Sat, 07 May 2022 17:37:13 GMT</pubDate></item><item><title><![CDATA[Reply to Logging per Script aktivieren on Sat, 07 May 2022 16:49:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paul53" aria-label="Profile: paul53">@<bdi>paul53</bdi></a> Ach, danke. Darauf wäre ich nie gekommen. Ich hatte nach einer deutlich komplizierten Lösung gesucht <img src="https://forum.iobroker.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f601.png?v=ba16ebd4856" class="not-responsive emoji emoji-android emoji--grin" style="height:23px;width:auto;vertical-align:middle" title=":grin:" alt="😁" /></p>
]]></description><link>https://forum.iobroker.net/post/799903</link><guid isPermaLink="true">https://forum.iobroker.net/post/799903</guid><dc:creator><![CDATA[Hiltex]]></dc:creator><pubDate>Sat, 07 May 2022 16:49:35 GMT</pubDate></item><item><title><![CDATA[Reply to Logging per Script aktivieren on Sat, 07 May 2022 16:15:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hiltex" aria-label="Profile: hiltex">@<bdi>hiltex</bdi></a> sagte: Logging (influxDB) per Script aktivieren kann?</p>
<p dir="auto">In der <a href="https://github.com/ioBroker/ioBroker.influxdb#history-logging-management-via-javascript" rel="nofollow ugc">Doku</a> steht es.</p>
]]></description><link>https://forum.iobroker.net/post/799885</link><guid isPermaLink="true">https://forum.iobroker.net/post/799885</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Sat, 07 May 2022 16:15:51 GMT</pubDate></item></channel></rss>