<?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[Zähler auslesen und Watt+ und Watt- in Whh rechnen.]]></title><description><![CDATA[<p dir="auto">Hallo,</p>
<p dir="auto">Ich lese meinen Zähler über Tasmota aus.<br />
Mir wird der aktuelle Verbauch in Watt+ und der Überschuss in Watt- angezeigt.<br />
Ist es möglich das mir die Watt+ Leistung in Kwh errechnet wird und die Watt- Leistung auch in Kwh.<br />
So das ich am Ende des Tages sehen kann wie viel Kwh Verbaucht und erzeugt wurde? Also zwei Werte raus bekomme.</p>
]]></description><link>https://forum.iobroker.net/topic/41730/zähler-auslesen-und-watt-und-watt-in-whh-rechnen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 21:07:33 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/41730.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Feb 2021 15:06:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zähler auslesen und Watt+ und Watt- in Whh rechnen. on Wed, 03 Feb 2021 12:47:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/schmello" aria-label="Profile: schmello">@<bdi>schmello</bdi></a> sagte: Muss ich die ID nur in die oberste zeile austauschen?</p>
<p dir="auto">Ja, wenn die weiteren IDs für Dich passen.</p>
]]></description><link>https://forum.iobroker.net/post/573277</link><guid isPermaLink="true">https://forum.iobroker.net/post/573277</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Wed, 03 Feb 2021 12:47:28 GMT</pubDate></item><item><title><![CDATA[Reply to Zähler auslesen und Watt+ und Watt- in Whh rechnen. on Wed, 03 Feb 2021 09:17:15 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><br />
Danke erstmal.</p>
<p dir="auto">Ich werde das heute Abend testen.<br />
Muss ich die ID nur in die oberste zeile austauschen?<br />
const idLeistung = 'mqtt.0.xyz';</p>
]]></description><link>https://forum.iobroker.net/post/573113</link><guid isPermaLink="true">https://forum.iobroker.net/post/573113</guid><dc:creator><![CDATA[schmello]]></dc:creator><pubDate>Wed, 03 Feb 2021 09:17:15 GMT</pubDate></item><item><title><![CDATA[Reply to Zähler auslesen und Watt+ und Watt- in Whh rechnen. on Tue, 02 Feb 2021 16:26:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/schmello" aria-label="Profile: schmello">@<bdi>schmello</bdi></a> sagte: Das wird nur durch das Vorzeichen erkannt.</p>
<p dir="auto">Versuche mal (nach Anpassung der IDs):</p>
<pre><code>// IDs anpassen!
const idLeistung = 'mqtt.0.xyz';
const path = '0_userdata.0.Zaehler.';
const idVStand = path + 'Verbrauch.Zaehlerstand';
const idVStandTag = path + 'Verbrauch.Tagesstand';
const idVTag = path + 'Verbrauch.Tag';
const idUStand = path + 'Ueberschuss.Zaehlerstand';
const idUStandTag = path + 'Ueberschuss.Tagesstand';
const idUTag = path + 'Ueberschuss.Tag';

if(!existsState(idVStand)) {
    createState(idVStand, 0, {type: 'number', name: 'Zählerstand Verbrauch', role: 'value.power.consumption', unit: 'kWh'});
    createState(idVStandTag, 0, {type: 'number', name: 'Tagesstand Verbrauch', role: 'value.power.consumption', unit: 'kWh'});
    createState(idVTag, 0, {type: 'number', name: 'Verbrauch gestern', role: 'value.power.consumption', unit: 'kWh'});
    createState(idUStand, 0, {type: 'number', name: 'Zählerstand Überschuss', role: 'value.power.consumption', unit: 'kWh'});
    createState(idUStandTag, 0, {type: 'number', name: 'Tagesstand Überschuss', role: 'value.power.consumption', unit: 'kWh'});
    createState(idUTag, 0, {type: 'number', name: 'Überschuss gestern', role: 'value.power.consumption', unit: 'kWh'});
}

var verbrauch = getState(idVStand).val;
var ueberschuss = getState(idUStand).val;

on(idLeistung, function(dp) {
    let energy = dp.oldState.val * (dp.state.lc - dp.oldState.lc) / 3600000000;
    if(dp.oldState.val &gt;= 0) {
        verbrauch += energy;
        setState(idVStand, Math.round(verbrauch * 100) / 100, true);
    } else {
        ueberschuss -= energy;
        setState(idUStand, Math.round(ueberschuss * 100) / 100, true);
    }
});

schedule('58 59 23 * * *', function() {
    let verbrauchTag = verbrauch - getState(idVStandTag).val;
    let ueberschussTag = ueberschuss - getState(idUStandTag).val;
    setState(idVTag, Math.round(verbrauchTag * 100) / 100, true);
    setState(idUTag, Math.round(ueberschussTag * 100) / 100, true);
    setState(idVStandTag, Math.round(verbrauch * 100) / 100, true);
    setState(idUStandTag, Math.round(ueberschuss * 100) / 100, true);
});
</code></pre>
]]></description><link>https://forum.iobroker.net/post/572700</link><guid isPermaLink="true">https://forum.iobroker.net/post/572700</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Tue, 02 Feb 2021 16:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to Zähler auslesen und Watt+ und Watt- in Whh rechnen. on Tue, 02 Feb 2021 15:20:33 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></p>
<p dir="auto">Das wird nur durch das Vorzeichen erkannt. Also ein Datenpunkt<br />
Ich müsste jetzt nochmal genau nachsehen. Bin gerade nicht Zuhause.<br />
400W verbrauch = 400W<br />
400W wird eingespeist = -400W</p>
]]></description><link>https://forum.iobroker.net/post/572669</link><guid isPermaLink="true">https://forum.iobroker.net/post/572669</guid><dc:creator><![CDATA[schmello]]></dc:creator><pubDate>Tue, 02 Feb 2021 15:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to Zähler auslesen und Watt+ und Watt- in Whh rechnen. on Tue, 02 Feb 2021 15:07:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/schmello" aria-label="Profile: schmello">@<bdi>schmello</bdi></a> sagte:</p>
<blockquote>
<p dir="auto">Mir wird der aktuelle Verbauch in Watt+ und der Überschuss in Watt- angezeigt.</p>
</blockquote>
<p dir="auto">Sind das zwei Datenpunkte oder erkennt man das über das Vorzeichen?</p>
]]></description><link>https://forum.iobroker.net/post/572657</link><guid isPermaLink="true">https://forum.iobroker.net/post/572657</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Tue, 02 Feb 2021 15:07:57 GMT</pubDate></item></channel></rss>