<?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[Fehler mit &quot;null&quot;]]></title><description><![CDATA[<p dir="auto">Hallo Leute,</p>
<p dir="auto">Fehler:</p>
<pre><code>2026-03-28 10:19:31.548 - error: javascript.0 (5190) Invalid read function for "alias.0.SMA.Power": "Math.round(JSON.parse(val).value * 100) / 100" =&gt; Cannot read properties of null (reading 'value')
2026-03-28 10:19:31.548 - error: web.0 (28807) Invalid read function for "alias.0.SMA.Power": "Math.round(JSON.parse(val).value * 100) / 100" =&gt; Cannot read properties of null (reading 'value')
2026-03-28 10:19:31.548 - error: influxdb.0 (262) Invalid read function for "alias.0.SMA.Power": "Math.round(JSON.parse(val).value * 100) / 100" =&gt; Cannot read properties of null (reading 'value')
</code></pre>
<p dir="auto">Alias:<br />
<img src="/assets/uploads/files/1774691285586-bildschirmfoto-2026-03-28-um-10.46.55-resized.png" alt="Bildschirmfoto 2026-03-28 um 10.46.55.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">der Mqtt Wert:<br />
<img src="/assets/uploads/files/1774691362286-bildschirmfoto-2026-03-28-um-10.49.07-resized.png" alt="Bildschirmfoto 2026-03-28 um 10.49.07.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Meine Vermutung, der Wert ist auch mal nicht gesetzt oder null, wie kann ich die Fehlermeldung verhindern?<br />
Besten Dank!</p>
]]></description><link>https://forum.iobroker.net/topic/84147/fehler-mit-null</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 07:59:12 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/84147.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Mar 2026 09:49:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler mit &quot;null&quot; on Sun, 29 Mar 2026 14:26:49 GMT]]></title><description><![CDATA[<p dir="auto">OK, dann gibt es da keine einfache Lösung, dann bleibt halt die Fehlermedlung.</p>
]]></description><link>https://forum.iobroker.net/post/1332090</link><guid isPermaLink="true">https://forum.iobroker.net/post/1332090</guid><dc:creator><![CDATA[Humidor]]></dc:creator><pubDate>Sun, 29 Mar 2026 14:26:49 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit &quot;null&quot; on Sun, 29 Mar 2026 08:57:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/humidor" aria-label="Profile: Humidor">@<bdi>Humidor</bdi></a> sagte: wäre das etwas für den Adapter selbst ?</p>
<p dir="auto">Nein, das wäre eine Erweiterung im js-controller.</p>
]]></description><link>https://forum.iobroker.net/post/1332008</link><guid isPermaLink="true">https://forum.iobroker.net/post/1332008</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Sun, 29 Mar 2026 08:57:33 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit &quot;null&quot; on Sun, 29 Mar 2026 08:19:45 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> wäre das etwas für den Adapter selbst ?</p>
]]></description><link>https://forum.iobroker.net/post/1332002</link><guid isPermaLink="true">https://forum.iobroker.net/post/1332002</guid><dc:creator><![CDATA[Humidor]]></dc:creator><pubDate>Sun, 29 Mar 2026 08:19:45 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit &quot;null&quot; on Sat, 28 Mar 2026 18:58:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/humidor" aria-label="Profile: Humidor">@<bdi>Humidor</bdi></a> sagte: den Umweg will ich mir nicht geben müssen</p>
<p dir="auto">Das Problem beim Alias ist, dass bei jeder Aktualisierung des Zeitstempels ein Wert in den Alias geschrieben wird. Man könnte auch in der Lesekonvertierung eine Prüfung einbauen, würde dann aber ein <em>oldVal</em> benötigen, um nicht einen unsinnigen Wert zu schreiben.</p>
]]></description><link>https://forum.iobroker.net/post/1331931</link><guid isPermaLink="true">https://forum.iobroker.net/post/1331931</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Sat, 28 Mar 2026 18:58:48 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit &quot;null&quot; on Sat, 28 Mar 2026 17:43:39 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> OK, danke, aber ich hab da einige Aliase und den Umweg will ich mir nicht geben müssen, das ist zuviel und bei jeder Anpassung oder Änderung wieder...</p>
]]></description><link>https://forum.iobroker.net/post/1331916</link><guid isPermaLink="true">https://forum.iobroker.net/post/1331916</guid><dc:creator><![CDATA[Humidor]]></dc:creator><pubDate>Sat, 28 Mar 2026 17:43:39 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit &quot;null&quot; on Sat, 28 Mar 2026 13:25:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/humidor" aria-label="Profile: Humidor">@<bdi>Humidor</bdi></a> sagte: null, wie kann ich die Fehlermeldung verhindern?</p>
<p dir="auto">Per Alias kann man es nicht verhindern, denn es wird auf jede Aktualisierung des Zeitstempels reagiert.<br />
In einem Skript kann man prüfen, ob ein Objekt mit dem Attribut "value" vorhanden ist.</p>
<pre><code>const idMPower = 'mqtt.1...'; // ID anpassen!
const idUPower = '0_userdata.0.SMA.Power';

on(idMPower, function(dp) {
    if(typeof dp.state.val == 'string' &amp;&amp; dp.state.val.includes('value')) {
        setState(idUPower, Math.round(JSON.parse(dp.state.val).value * 100) / 100, true);
    }
});
</code></pre>
]]></description><link>https://forum.iobroker.net/post/1331822</link><guid isPermaLink="true">https://forum.iobroker.net/post/1331822</guid><dc:creator><![CDATA[paul53]]></dc:creator><pubDate>Sat, 28 Mar 2026 13:25:06 GMT</pubDate></item></channel></rss>