<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shelly Archive - Smart home Ratgeber</title>
	<atom:link href="https://homeitems.de/category/shelly/feed/" rel="self" type="application/rss+xml" />
	<link>https://homeitems.de/category/shelly/</link>
	<description>Einfache Lösungen für zuhause mit Smart home items</description>
	<lastBuildDate>Thu, 12 Dec 2024 17:14:38 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://homeitems.de/wp-content/uploads/2020/10/cropped-wpicon_homeitems-32x32.jpg</url>
	<title>Shelly Archive - Smart home Ratgeber</title>
	<link>https://homeitems.de/category/shelly/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Strommessung mit Shelly Plus PM Mini und Node-RED</title>
		<link>https://homeitems.de/strommessung-mit-shelly-plus-pm-mini-und-node-red/</link>
					<comments>https://homeitems.de/strommessung-mit-shelly-plus-pm-mini-und-node-red/#comments</comments>
		
		<dc:creator><![CDATA[Dieter]]></dc:creator>
		<pubDate>Mon, 15 Apr 2024 08:05:15 +0000</pubDate>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[MQTT]]></category>
		<category><![CDATA[Node-Red]]></category>
		<category><![CDATA[Shelly]]></category>
		<guid isPermaLink="false">https://homeitems.de/?p=2740</guid>

					<description><![CDATA[<p>Mit dem kleinen Shelly Plus PM Mini wird eine günstige Möglichkeit geboten, eine Leistungsmessung durchzuführen. Das Gerät ist nur ca. 28 x 32 x 16 mm (HxBxT) groß und passt in viele UP-Dosen z.B. hinter einer Steckdose. Das Gerät unterstützt dabei eine Messung bis zu 16A Leistung (ist leider nicht bei allen  [...]</p>
<p>Der Beitrag <a href="https://homeitems.de/strommessung-mit-shelly-plus-pm-mini-und-node-red/">Strommessung mit Shelly Plus PM Mini und Node-RED</a> erschien zuerst auf <a href="https://homeitems.de">Smart home Ratgeber</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling" style="--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;" ><div class="fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap" style="max-width:1216.8px;margin-left: calc(-4% / 2 );margin-right: calc(-4% / 2 );"><div class="fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_5_6 5_6 fusion-flex-column" style="--awb-bg-size:cover;--awb-width-large:83.3333333333%;--awb-margin-top-large:0px;--awb-spacing-right-large:2.304%;--awb-margin-bottom-large:0px;--awb-spacing-left-large:2.304%;--awb-width-medium:100%;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;"><div class="fusion-column-wrapper fusion-flex-justify-content-flex-start fusion-content-layout-column"><div class="fusion-title title fusion-title-1 fusion-sep-none fusion-title-text fusion-title-size-one" style="--awb-margin-top:20px;--awb-margin-bottom:20px;--awb-margin-top-small:0px;--awb-margin-right-small:0px;--awb-margin-bottom-small:20px;--awb-margin-left-small:0px;"><h1 class="fusion-title-heading title-heading-left fusion-responsive-typography-calculated" style="margin:0;--fontSize:32;line-height:1.1;">Shelly</h1></div><div class="fusion-separator fusion-full-width-sep" style="align-self: center;margin-left: auto;margin-right: auto;margin-top:40px;width:100%;"></div><div class="fusion-text fusion-text-1"><p>Mit dem kleinen Shelly Plus PM Mini wird eine günstige Möglichkeit geboten, eine Leistungsmessung durchzuführen. Das Gerät ist nur ca. 28 x 32 x 16 mm (HxBxT) groß und passt in viele UP-Dosen z.B. hinter einer Steckdose. Das Gerät unterstützt dabei eine Messung bis zu <strong>16A</strong> Leistung (ist leider nicht bei allen Shelly Geräten so), so dass man mit dem Gerät theoretisch die Leistung eines Balkonkraftwerks, von Lichtschaltern oder Steckdosen messen kann.</p>
<p>Im folgenden Beitrag beschreibe ich, wie man das PM Mini auch ohne Shelly-App über WLAN und MQTT einbinden und die Daten in Node-Red weiterverarbeiten kann.</p>
<p>Grundsätzlich erfolgt hier der Hinweise, dass das Arbeiten an Elektroleitungen immer nur von Fachleuten (Elektrikern) durchgeführt werden und immer die fünf Sicherheitsregeln der Elektrotechnik berücksichtigt werden sollten.</p>
<h2>Gerät ins Netzwerk einbinden</h2>
<p>Ich möchte auf die Shelly Cloud sowie das Einrichten der Shelly App verzichten, sondern nur eine lokale Nutzung mittels WLAN umsetzen. Nach der Stomversorgung spannt das PM Mini ein eigenes Netz auf (Access Point), mit dem man sich verbinden muss. Das WLAN erkennt man an dem Namen, der mit "ShellyPMMini..." beginnt. Um anschließend in den Shelly-WebAdmin-Oberfläche zu kommen, gibt man im Browser die Adresse "192.168.33.1" ein und schon sollte die administrative Weboberfläche  erscheinen. Bitte berücksichtigt, dass auch die Shelly-Geräte nur das 2,4 GHz WLAN unterstützen. Die Optionen und Anzeigen  in der WebAdmin-Oberfläche sind unter diesem <a href="https://kb.shelly.cloud/knowledge-base/shelly-plus-pm-mini">Link</a> super erklärt.</p>
<p>Nun geht man auf "Configure Wifi-Setting", wählt "Enable Wifi-network" und gibt die SSID (Name des WLANs) sowie das Passwort für das WLAN an und speichert die Einstellungen. Theoretisch kann man das Gerät nun neu starten und es sollte dann unter einer eigenen IP-Adresse in der Netzwerkliste des Routers erscheinen.</p>
<h2>Generelle Einstellungen</h2>
<p>Da es bei älteren Shelly-Firmwareversionen zu Problemen mit der korrekten Leistungsmessung kam, sollte unbedingt die aktuelle Firmware für das PM Mini aufgespielt werden.  Dazu geht man auf "Settings" und "Firmware". Shelly prüft nun automatisch, ob eine neue Version verfügbar ist und bietet an, diese online zu installieren.</p>
<p><a href="https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small.webp"><img fetchpriority="high" decoding="async" class="alignnone wp-image-3043 size-medium" src="https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-300x208.webp" alt="" width="300" height="208" srcset="https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-200x138.webp 200w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-300x208.webp 300w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-400x277.webp 400w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-600x415.webp 600w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-768x532.webp 768w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small-800x554.webp 800w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_Firmware_Update-small.webp 1024w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Nach dem Drücken von "Update" wird die Firmware aufgespielt und das Gerät neu gestartet. Nun sollten folgende Einstellungen vorgenommen werden:</p>
</div>
<div class="table-1" style="--awb-margin-bottom:20px;">
<table width="100%">
<thead>
<tr>
<th align="left">Menü</th>
<th align="left">Wert</th>
<th align="left">Beschreibung</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">"Settings" und "Device Name"</td>
<td align="left">Sprechender Name des Gerätes</td>
<td align="left">Hilft später bei der Identifikation im Netzwerk und ist gleichzeitig der Topic-Name für MQTT</td>
</tr>
<tr>
<td align="left">"Settings" und "Bluetooth"</td>
<td align="left">"Enable Bluetooth" und "Enable RPC": Haken entfernen</td>
<td align="left">Da nur das WLAN benötigt wird</td>
</tr>
<tr>
<td align="left">"Settings" "Eco"</td>
<td align="left">"Enable Eco Mode": Haken setzen</td>
<td align="left">Aktiviert den Eco-Modus</td>
</tr>
<tr>
<td align="left">"Setting" "Authentication"</td>
<td align="left">Eigenes Passwort setzen</td>
<td align="left">Sperrt den freien Zugang auf die Weboberfläche</td>
</tr>
<tr>
<td align="left">"Settings" und "Access Point"</td>
<td align="left">"Enable AP-Network": Haken entfernen</td>
<td align="left">Deaktiviert den Access Point</td>
</tr>
</tbody>
</table>
</div>
<div class="fusion-text fusion-text-2"><h2>MQTT-Settings</h2>
<p>Für das erfolgreiche Senden von Nachrichten an einen MQTT-Broker müssen folgende Einstellungen vorgenommen werden:</p>
</div>
<div class="table-1" style="--awb-margin-bottom:20px;">
<table width="100%">
<thead>
<tr>
<th align="left">Menü</th>
<th align="left">Wert</th>
<th align="left">Beschreibung</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">"Settings" und "MQTT-Settings"</td>
<td align="left">
<ol>
<li>"Enable MQTT-Network": Haken setzen</li>
<li>"Connection Type" :  No-SSL</li>
<li>"Enable MQTT Control": Haken setzen</li>
<li>"Generic status updat over MQTT": Haken setzen</li>
<li>"Enable RPC over MQTT": Haken entfernen</li>
<li>"RPC Status notification over MQTT": Haken entfernen</li>
<li>"Server": "IP-Adresse des MQTT-Servers: 1883"</li>
</ol>
</td>
<td align="left">
<ol>
<li>MQTT aktivieren, damit Daten gesendet werden</li>
<li>Nur wenn man SSL nicht aktiviert hat, ansonsten das richtige Protokoll wählen</li>
<li>Gibt die Möglichkeit, per MQTT auch Befehle zu senden</li>
<li>Muss gesetzt werden, da sonst nichts vom PM Mini gesendet wird.</li>
</ol>
</td>
</tr>
</tbody>
</table>
</div>
<div class="fusion-text fusion-text-3"><p><a href="https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small.webp"><img decoding="async" class="alignnone wp-image-3044 size-medium" src="https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-300x199.webp" alt="" width="300" height="199" srcset="https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-200x133.webp 200w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-300x199.webp 300w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-400x266.webp 400w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-600x398.webp 600w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-768x510.webp 768w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small-800x531.webp 800w, https://homeitems.de/wp-content/uploads/2024/04/Shelly_MQTT_Settings_small.webp 1024w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Nach dem Speichern der Settings ist das Gerät vollständig konfiguriert und kann über "Settings" "Reboot-Device" neu gestartet werden. Anschließend kann man z.B. mit dem <a href="http://mqtt-explorer.com/">MQTT-Explorer</a> prüfen, welche Informationen an den MQTT-Broker gesendet werden.</p>
<p><em>Tipp: Bei mir wurden zuerst keine Nachrichten gesendet. Erst als ich in den MQTT-Settings den Punkt „Generic Status update over MQTT“  enabled und dann wieder disabled habe, hat es funktioniert.</em></p>
<h2>Daten in Node-Red weiterverarbeiten</h2>
<p>Die Daten können jetzt in Node-Red weiterverarbeitet werden. In meinem Fall speichere ich diese direkt in einer InfluxDB ab.</p>
<p><a href="https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow.webp"><img decoding="async" class="alignnone wp-image-3040 size-medium" src="https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-300x56.webp" alt="" width="300" height="56" srcset="https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-200x38.webp 200w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-300x56.webp 300w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-400x75.webp 400w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-600x113.webp 600w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-768x145.webp 768w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-800x151.webp 800w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-1024x193.webp 1024w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow-1200x226.webp 1200w, https://homeitems.de/wp-content/uploads/2024/04/Node-Red-Shelly-Flow.webp 1376w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Im mqtt-in-Node frage ich erst einmal das Topic vom MQTT-Server ab. Dieses findet man unter dem Namen, den man dem Shelly-Gerät  gegeben hat (siehe oben), gefolgt von einem "/pm1:0", also in meinem Fall heißt das Topic "EM-Licht/pm1:0". Als Ausgabe wird "Ein analysiertes (parsed) JSON-Objekt." gewählt.</p>
<p>Im Function-Node wird nun die Leistung aus dem JSON-Objekt extrahiert:</p>
<p>Der Code dazu lautet:</p>
</div><style type="text/css" scopped="scopped">.fusion-syntax-highlighter-1 > .CodeMirror, .fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }</style><div class="fusion-syntax-highlighter-container fusion-syntax-highlighter-1 fusion-syntax-highlighter-theme-light" style="opacity:0;margin-top:0px;margin-right:0px;margin-bottom:20px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:#e0dede;"><div class="syntax-highlighter-copy-code"><span class="syntax-highlighter-copy-code-title" data-id="fusion_syntax_highlighter_1" style="font-size:14px;">Copy to Clipboard</span></div><label for="fusion_syntax_highlighter_1" class="screen-reader-text">Syntax Highlighter</label><textarea class="fusion-syntax-highlighter-textarea" id="fusion_syntax_highlighter_1" data-readOnly="nocursor" data-lineNumbers="1" data-lineWrapping="" data-theme="default" data-mode="text/x-sh">msg.payload=msg.payload.aenergy.total;
return msg;</textarea></div><div class="fusion-text fusion-text-4"><p>Das bedeutet, dass sich unter "aenergy.total" der benötigte Wert im payload-Objekt befindet.</p>
<p>Zuletzt speichere ich diesen Wert noch mit einem influxdb-out-Node in die Datenbank. Mit dieser Vorgehensweise kann man auch andere Shelly-Geräte ohne Shelly-App abfragen und deren Daten weiterverarbeiten.</p>
<p>Wie man Node-Red, MQTT und InfluxDB installiert und Daten austauscht steht unter anderem in meinen Beiträgen <a href="https://homeitems.de/mit-node-red-influxdb-und-grafana-daten-auf-einem-synology-nas-sammeln-und-visualisieren-teil-1-2/">Mit Node-Red, InfluxDB und Grafana Daten auf einem Synology NAS sammeln und visualisieren (Teil 1/2)</a> und  <a href="https://homeitems.de/mit-node-red-influxdb-und-grafana-daten-auf-einem-synology-nas-sammeln-und-visualisieren-teil-2-2/">Mit Node-Red, InfluxDB und Grafana Daten auf einem Synology NAS sammeln und visualisieren (Teil 2/2)</a></p>
</div></div></div></div></div>
<p>Der Beitrag <a href="https://homeitems.de/strommessung-mit-shelly-plus-pm-mini-und-node-red/">Strommessung mit Shelly Plus PM Mini und Node-RED</a> erschien zuerst auf <a href="https://homeitems.de">Smart home Ratgeber</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://homeitems.de/strommessung-mit-shelly-plus-pm-mini-und-node-red/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
