{"id":1391,"date":"2022-08-18T19:35:12","date_gmt":"2022-08-18T17:35:12","guid":{"rendered":"https:\/\/outpost.garf.de\/wordpress\/?p=1391"},"modified":"2022-10-01T14:53:33","modified_gmt":"2022-10-01T12:53:33","slug":"stromzaehler-optisch-auslesen","status":"publish","type":"post","link":"https:\/\/outpost.garf.de\/wordpress\/index.php\/de\/2022\/08\/18\/stromzaehler-optisch-auslesen\/","title":{"rendered":"Stromz\u00e4hler optisch auslesen"},"content":{"rendered":"<p>Da es hier vor kurzem endlich moderne Stromz\u00e4hler gab und das Thema wahrscheinlich eher l\u00e4nderspezifisch ist, schreibe ich diesen Artikel zur Abwechslung auf Deutsch.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Idee<\/h3>\n\n\n\n<p>Die Idee stammt von <a href=\"http:\/\/volkszaehler.org\">volkszaehler.org<\/a>, wobei deren L\u00f6sung nicht so ganz zu meiner Hausautomatisierung passt. Aber auch bei <a href=\"http:\/\/esphome.io\">esphome.io<\/a> gibt es alles an Software was man braucht.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Material<\/h3>\n\n\n\n<p>Der von mir gebaute Lesekopf kommt mit sehr wenigen Bauteilen aus:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Infrarot-Fototransisor (z.B. <a href=\"https:\/\/www.aliexpress.com\/item\/1005001516026730.html\">SFH309<\/a>, <a href=\"https:\/\/www.reichelt.de\/fototransistor-npn-30v-100ma-0-1w-bedrahtet-bpw-40-p5806.html\">BPW40<\/a>)<\/li><li>Widerstand 1k<\/li><li>Microcontroller D1 mini ESP32 (ein ESP8266 k\u00f6nnte es auch tun aber da der ESP32 nicht viel mehr kostet setze ich keine ESP8266 mehr ein)<\/li><li>Ring-Magnet (25x6x13, z.B. <a href=\"https:\/\/www.aliexpress.com\/item\/1005004105123252.html\">hier<\/a>)<\/li><li>USB-Kabel und Netzteil<\/li><li>3D-gedrucktes Geh\u00e4use (<a href=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/2022\/08\/Lesekopf-Lesekopf2.stl\">Lesekopf<\/a>, <a href=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/2022\/08\/Lesekopf-Deckel.stl\">Deckel<\/a>, <a href=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/2022\/08\/Lesekopf-Deckel.stl\">Freecad-Zeichnung<\/a>)<\/li><\/ul>\n\n\n <div id=\"wppa-container-wrapper-1\" class=\"aligncenter wppa-container-wrapper \" style=\"width:100%;clear:both;display:block;margin-left:auto;margin-right:auto;padding:0;position:relative;\"><div id=\"wppa-container-1\" style=\"width:100%;\" class=\"wppa-container aligncenter wp-caption\"><div style=\"font-size:0;line-height:0\"><a data-id=\"QA4xZwwfPAwZ\" href=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/543.jpg\" data-lbtitle=\"20220817-204110-wt-Stromzaehler-0002.jpg&lt;br&gt;\" data-rel=\"wppa\" target=\"_self\" class=\"thumb-img\" id=\"a-543-1\" data-alt=\"20220817-204110-wt-Stromzaehler-0002.jpg\" style=\"cursor:wait;\" onclick=\"return false;\"><img decoding=\"async\" id=\"ph-543-1\" title=\"Vergr\u00f6\u00dfern\" style=\"width:100%;margin:0;padding:0;border:none;\" src=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/543.jpg?ver=1\" alt=\"20220817-204110-wt-Stromzaehler-0002.jpg\" class=\"size-medium wppa-sphoto\"><\/a><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-1\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"width:120px; height:120px; position:fixed; top:50%; margin-top:-60px; left:50%; margin-left:-60px; opacity:1; display:none; fill:#666666; background-color:transparent; border-radius:24px;\"><rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\" class=\"bk\"><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(0 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(22.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.09375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(45 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.1875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(67.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.28125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(90 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(112.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.46875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(135 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.5625s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(157.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.65625s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(180 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.75s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(202.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.84375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(225 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.9375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(247.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.03125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(270 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(292.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.21875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(315 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.3125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(337.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.40625s\" repeatCount=\"indefinite\" ><\/rect><\/svg><\/div><\/div>\n<!-- End [wppa type=\"photo\" photo=\"543\" align=\"center\"] \/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391 oc 1 29 queries in 25.7 ms. at 09:20. Max mem: 14.00 Mb. -->\n\n\n\n<h3 class=\"wp-block-heading\">Aufbau<\/h3>\n\n\n\n<p>Als Signaleingang habe ich GPIO27 gew\u00e4hlt &#8211; weil er bei meinem ESP32 direkt neben dem Masse-Pin liegt. Diesen Pin verbinde ich per 1k Widerstand mit dem 3.3V Pin (der interne PullUp Widerstand funktioniert <em>nicht<\/em>). <\/p>\n\n\n <div id=\"wppa-container-wrapper-2\" class=\"aligncenter wppa-container-wrapper \" style=\"width:100%;clear:both;display:block;margin-left:auto;margin-right:auto;padding:0;position:relative;\"><div id=\"wppa-container-2\" style=\"width:100%;\" class=\"wppa-container aligncenter wp-caption\"><div style=\"font-size:0;line-height:0\"><a data-id=\"A4xZwwPfxfZ6\" href=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/544.jpg\" data-lbtitle=\"20220817-204119-wt-Stromzaehler-0003.jpg&lt;br&gt;\" data-rel=\"wppa\" target=\"_self\" class=\"thumb-img\" id=\"a-544-2\" data-alt=\"20220817-204119-wt-Stromzaehler-0003.jpg\" style=\"cursor:wait;\" onclick=\"return false;\"><img decoding=\"async\" id=\"ph-544-2\" title=\"Vergr\u00f6\u00dfern\" style=\"width:100%;margin:0;padding:0;border:none;\" src=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/544.jpg?ver=1\" alt=\"20220817-204119-wt-Stromzaehler-0003.jpg\" class=\"size-medium wppa-sphoto\"><\/a><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-2\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"width:120px; height:120px; position:fixed; top:50%; margin-top:-60px; left:50%; margin-left:-60px; opacity:1; display:none; fill:#666666; background-color:transparent; border-radius:24px;\"><rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\" class=\"bk\"><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(0 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(22.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.09375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(45 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.1875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(67.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.28125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(90 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(112.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.46875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(135 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.5625s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(157.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.65625s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(180 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.75s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(202.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.84375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(225 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.9375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(247.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.03125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(270 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(292.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.21875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(315 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.3125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(337.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.40625s\" repeatCount=\"indefinite\" ><\/rect><\/svg><\/div><\/div>\n<!-- End [wppa type=\"photo\" photo=\"544\" align=\"center\"] \/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391 oc 2 18 queries in 21.5 ms. at 09:20. Max mem: 14.00 Mb. -->\n\n\n\n<p>Beim Fototransistor auf die richtige Polung achten: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Emitter (langes Bein) &#8211; auf Masse<\/li><li>Collector (kurzes Bein) &#8211; auf den Signaleingang. Das ist keine Fotodiode &#8211; von daher auf die Polung achten!<\/li><\/ul>\n\n\n\n<p>Zu beachten ist noch dass die LED bei dem bei mir verbauten Stromz\u00e4hler nur schwach leuchet &#8211; dh. der Fototransistor muss genau positioniert werden. Dabei hilft der 3D-gedruckte Halter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Einbau<\/h3>\n\n\n\n<p>Der Lesekopf wird mit mit den L\u00f6chern auf die Positionierungshilfen gesetzt, der Magnet haftet dann an einer Metallplatte um den Sensor herum. Anschliessen und fertig.<\/p>\n\n\n <div id=\"wppa-container-wrapper-3\" class=\"aligncenter wppa-container-wrapper \" style=\"width:100%;clear:both;display:block;margin-left:auto;margin-right:auto;padding:0;position:relative;\"><div id=\"wppa-container-3\" style=\"width:100%;\" class=\"wppa-container aligncenter wp-caption\"><div style=\"font-size:0;line-height:0\"><a data-id=\"o84ezvGznvGn\" href=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/542.jpg\" data-lbtitle=\"20220727-090327-wt-Stromzaehler-0001.jpg&lt;br&gt;\" data-rel=\"wppa\" target=\"_self\" class=\"thumb-img\" id=\"a-542-3\" data-alt=\"20220727-090327-wt-Stromzaehler-0001.jpg\" style=\"cursor:wait;\" onclick=\"return false;\"><img decoding=\"async\" id=\"ph-542-3\" title=\"Vergr\u00f6\u00dfern\" style=\"width:100%;margin:0;padding:0;border:none;\" src=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/542.jpg?ver=1\" alt=\"20220727-090327-wt-Stromzaehler-0001.jpg\" class=\"size-medium wppa-sphoto\"><\/a><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-3\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"width:120px; height:120px; position:fixed; top:50%; margin-top:-60px; left:50%; margin-left:-60px; opacity:1; display:none; fill:#666666; background-color:transparent; border-radius:24px;\"><rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\" class=\"bk\"><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(0 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(22.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.09375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(45 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.1875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(67.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.28125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(90 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(112.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.46875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(135 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.5625s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(157.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.65625s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(180 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.75s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(202.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.84375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(225 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.9375s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(247.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.03125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(270 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(292.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.21875s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(315 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.3125s\" repeatCount=\"indefinite\" ><\/rect><rect class=\"wppa-ajaxspin\" x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(337.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.40625s\" repeatCount=\"indefinite\" ><\/rect><\/svg><\/div><\/div>\n<!-- End [wppa type=\"photo\" photo=\"542\" align=\"center\"] \/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391 oc 3 18 queries in 11.3 ms. at 09:20. Max mem: 14.00 Mb. -->\n\n\n\n<h3 class=\"wp-block-heading\">Software<\/h3>\n\n\n\n<p>Da bei mir zuhause <a href=\"https:\/\/www.home-assistant.io\">Home Assistant<\/a> im Einsatz ist, bietet sich f\u00fcr den ESP32 <a href=\"https:\/\/esphome.io\">ESPHome<\/a> als Software an. Bei volkszaehler.org gibts noch mehr Software zur Auswahl &#8211; im Prinzip ist eine serielle Schnittstelle zu lesen und die Daten im Obis format zu dekodieren. ESPHome <a href=\"https:\/\/esphome.io\/components\/sml.html\">bringt entsprechende Funktionen schon mit<\/a>. Meine Konfiguration f\u00fcr ESPHome sieht so aus:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uart:\n  rx_pin: GPIO27\n  baud_rate: 9600\n\nsml:\n  id: mysml\n\nsensor:\n  - platform: sml\n    name: \"Total energy\"\n    sml_id: mysml\n    obis_code: \"1-0:1.8.0\"\n    unit_of_measurement: kWh\n    accuracy_decimals: 1\n    device_class: energy\n    state_class: total_increasing\n    filters:\n      - multiply: 0.0001\n  - platform: sml\n    name: \"Current power\"\n    sml_id: mysml\n    obis_code: \"1-0:16.7.0\"\n    unit_of_measurement: W\n    device_class: power\n    state_class: measurement\n    on_value:\n      then:\n        - switch.turn_on: blueled\n\nswitch:\n  - platform: gpio\n    pin: GPIO2\n    id: blueled\n    name: \"$uroom Status LED\"\n    restore_mode: ALWAYS_OFF\n    on_turn_on:\n    - delay: 500ms\n    - switch.turn_off: blueled   <\/code><\/pre>\n\n\n\n<p>Wie man sieht, liefert mein Z\u00e4hler nur zwei Werte (eigentlich liefert er vier, aber Seriennummer und Typbezeichnung sind nicht sehr interessant).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Update 2022-08-29: ESPHome<\/h4>\n\n\n\n<p>Ich wollte eine M\u00f6glichkeit haben am Sensor zu sehen ob g\u00fcltige Werte empfangen werden ohne immer den Laptop dabei zu haben. Daf\u00fcr nutze ich die kleine blaue LED auf dem ESP32, sobald ein g\u00fcltiger Wert empfangen wird blinkt sie kurz auf.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Update 2022-08-29: Me\u00dfwerte<\/h4>\n\n\n\n<p>Me\u00dfstellenbetreiber <a href=\"https:\/\/syna.de\">Syna<\/a> hat mir mitgeteilt dass der Z\u00e4hler nur einen reduzierten Datensatz ausgibt (siehe auch Config oben). Schade, aber nicht zu \u00e4ndern (ja, ich k\u00f6nnte einen anderen Me\u00dfstellenbetreiber beauftragen). Gr\u00fcnde haben sie leider nicht genannt.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Update 2022-10-01: Lesekopf<\/h4>\n\n\n\n<p>Nach ca. 3 Wochen bekam ich keine Daten mehr. Alles hin und her justiere half nichts. Zuerst dachte ich der Z\u00e4hler ist defekt, aber mit einer alten Digigalkamera konnte ich die Infrarot-LED im Sekundentakt blinken sehen. Also war wohl mein Setup mit dem Fototransistor auf einmal nicht mehr empfindlich genug. Im Fotovoltaik-Forum fand ich einen Hinweis auf einen Fertigen lesekopf, schnell <a href=\"https:\/\/www.ebay.de\/itm\/313525835802?mkcid=16&amp;mkevt=1&amp;mkrid=707-127634-2357-0&amp;ssspo=_zsyyv2er9e&amp;sssrc=2047675&amp;ssuid=4HO_5WUZT62&amp;widget_ver=artemis&amp;media=COPY\">via Ebay bestellt<\/a> und es tut wieder. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verarbeitung der Me\u00dfwerte<\/h3>\n\n\n\n<p>Ich nutze hier HomeAssistant und Grafana. Viel kann man mit den zwei Messwerten nat\u00fcrlich nicht visualisieren:<\/p>\n\n\n\r\n\t\t\t\t<div\r\n\t\t\t\t\tid=\"wppa-container-wrapper-4\"\r\n\t\t\t\t\tclass=\"alignleft wppa-container-wrapper \"\r\n\t\t\t\t\tstyle=\"clear:left; width:350px;float:left;margin-right:10px;padding:0;position:relative;\"\r\n\t\t\t\t\t>\r\n\t\t<div\r\n\t\t\tid=\"wppa-container-4\"\r\n\t\t\tstyle=\"width:100%;\"\r\n\t\t\tclass=\"wppa-container alignleft wp-caption\"\r\n\t\t\t><div style=\"font-size:0;line-height:0\"><img decoding=\"async\" id=\"ph-547-4\" title=\"Screenshot 2022-08-29 at 17.09.57.jpg\" style=\"width:100%;margin:0;padding:0;border:none;\" src=\"https:\/\/outpost.garf.de\/wordpress\/wp-content\/uploads\/wppa\/547.jpg?ver=1\" alt=\"Screenshot 2022-08-29 at 17.09.57.jpg\" class=\"size-medium wppa-xphoto\"><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-4\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"\n\t\t\t\twidth:120px;\n\t\t\t\theight:120px;\n\t\t\t\tposition:fixed;\n\t\t\t\ttop:50%;\n\t\t\t\tmargin-top:-60px;\n\t\t\t\tleft:50%;\n\t\t\t\tmargin-left:-60px;\n\t\t\t\topacity:1;\n\t\t\t\tdisplay:none;\n\t\t\t\tfill:#666666;\n\t\t\t\tbackground-color:transparent;\n\t\t\t\tborder-radius:24px;\"><rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\" class=\"bk\" ><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(0 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(22.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.09375s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(45 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.1875s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(67.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.28125s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(90 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.375s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(112.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.46875s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(135 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.5625s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(157.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.65625s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(180 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.75s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(202.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.84375s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(225 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"0.9375s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(247.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.03125s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(270 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.125s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(292.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.21875s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(315 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.3125s\" repeatCount=\"indefinite\"\/><\/rect><rect class=\"wppa-ajaxspin\"  x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"3\" ry=\"3\" transform=\"rotate(337.5 50 50) translate(0 -32)\"><animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1.5s\" begin=\"1.40625s\" repeatCount=\"indefinite\"\/><\/rect><\/svg><\/div><\/div>\n<!-- End [photo 547] \/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391 oc 4 17 queries in 10.6 ms. at 09:20. Max mem:  14.00 Mb.  -->","protected":false},"excerpt":{"rendered":"<p>Da es hier vor kurzem endlich moderne Stromz\u00e4hler gab und das Thema wahrscheinlich eher l\u00e4nderspezifisch ist, schreibe ich diesen Artikel zur Abwechslung auf Deutsch. Idee Die Idee stammt von volkszaehler.org, wobei deren L\u00f6sung nicht so ganz zu meiner Hausautomatisierung passt. Aber auch bei esphome.io gibt es alles an Software was man braucht. Material Der von [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1399,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"footnotes":""},"categories":[56],"tags":[318],"class_list":["post-1391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet-de","tag-iot"],"_links":{"self":[{"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=1391"}],"version-history":[{"count":21,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391\/revisions"}],"predecessor-version":[{"id":1423,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1391\/revisions\/1423"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/media\/1399"}],"wp:attachment":[{"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=1391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=1391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outpost.garf.de\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=1391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}