Blogposts tagged tasmotaf.zz.dehttps://f.zz.de/tags/tasmota/f.zz.deikiwiki2022-09-14T08:50:41ZEasymeter: Building Tasmotahttps://f.zz.de/posts/202209141032.easymeter_building_tasmota/Florian Lohoff2022-09-14T08:50:41Z2022-09-14T08:32:04Z
<p>If you want to use Tasmota for parsing your SML output and sending it out to MQTT you
need to get tasmota from git, change some stuff, build it and flash it to your NodeMCU.</p>
<p>The easyiest way is to build tasmota with the espressif toolchain in a Docker container.
To create the docker container:</p>
<pre><code>git clone https://github.com/tasmota/docker-tasmota
cd docker-tasmota
docker build -t docker-tasmota .
</code></pre>
<p>Now you have a usable toolchain. Next step is to fetch tasmota and enable SML and fix the
immediate MQTT sendout to a different Topic:</p>
<pre><code>git clone git@github.com:arendst/Tasmota.git
cd Tasmota
git checkout -b build v12.1.1
curl https://github.com/flohoff/Tasmota/commit/c64dea980a5bdde75e4d1097c4c384bc08f49813.patch | patch -p1 -E
curl https://github.com/flohoff/Tasmota/commit/9669193390e64e926267f4af1aa8aed41617991b.patch | patch -p1 -E
</code></pre>
<p>And now we need to build Tasmota:</p>
<pre><code>mkdir platformiocache
docker run --rm -ti -v $PWD/platformiocache:/.platformio \
-v $PWD/Tasmota:/tasmota \
-u $UID:$GID \
docker-tasmota \
-e tasmota4M
</code></pre>
<p>And there is your tasmota NodeMCU binary in <strong>Tasmota/build_output/firmware/tasmota4M.bin</strong></p>
<p>In case you need to flash your NodeMCU by USB because you have a 1M flash version installed and cant do
"Over The Air" (OTA) upgrades - use <strong>esptool</strong> like this:</p>
<pre><code>esptool --port /dev/ttyUSB0 --baud 1000000 \
write_flash --flash_size=4MB \
-fm dio 0 \
Tasmota/build_output/firmware/tasmota4M.bin
</code></pre>
<p>And continue your normal setup by joining the Wifi the Tasmota opens.</p>
Tasmota SML Script for Easymeter Q3DA1002https://f.zz.de/posts/202209131510.tasmota_sml_script_for_easymeter_3da1002/Florian Lohoff2022-09-13T13:12:26Z2022-09-13T13:10:01Z
<p>It took me a while to get this going - Reading out the Smartmeter with a
NodeMCU but finally its there. So in case you have the same Smartmeter,
in this case the <strong>Easymeter Q3DA1002</strong> this is your Tasmota Script
for SML decoding.</p>
<p>I'll put up all the other stuff like OpenSCAD/STL files for the 3D printed
Case, and other descriptions the next days.</p>
<pre><code>>D
>B
=>sensor53 r
>M 1
+1,13,o,0,9600,SML
1,0-0:96.1.255*255(@#),Serienummer,,serial,0
1,1-0:96.5.5*255(@1,Status,,Status,0
1,1-0:21.7.255*255(@1,L1,W,L1,18
1,1-0:41.7.255*255(@1,L2,W,L2,18
1,1-0:61.7.255*255(@1,L3,W,L3,18
1,1-0:1.7.255*255(@1,P_in,W,P_in,18
1,1-0:1.8.0*255(@1,EC,kWh,EC,4
#
</code></pre>
Energieerfassunghttps://f.zz.de/posts/202010141341.energieerfassung/Florian Lohoff2020-10-14T11:48:00Z2020-10-14T11:41:49Z
<p>Nachdem ich ja eine Batterie an <a href="https://www.amazon.de/Gosund-Steckdosen-erforderlich-Stromverbrauch-Fernsteurung/dp/B085RFKVW4">GoSund SP111</a> <a href="https://www.tasmota.info/">Tasmotisiert</a>
habe, erfasse ich jetzt an diversen Stellen den Stromverbrauch.
Netterweise muss man dafür nicht mehr die dinger zerlegen und Löten
sondern das geht ganz elegant durch ausnutzen einer Sicherheitslücke.
Die C't hat dafür <a href="https://github.com/ct-Open-Source/tuya-convert">Tuya Convert</a> im github.</p>
<p>Nicht das ich unbedingt schalten wollen würde, aber für ~11€
ein WLAN Messgerät ist schon schick. Die GoSunds melden dann via
MQTT weiter und ein kleines script schiebt das alles in eine
InfluxDB die ich dann via Grafana visualisiere.</p>
<p>Jetzt fehlt noch die D1 Schnittstelle am Smartmeter und ich weiss auch
die kleinen verbrauchen die noch hier und da stehen - wie Ladegeräte
für die Zahnbürste oder die Alexas.</p>
<p><a href="https://f.zz.de/media/202010141341.energieerfassung.Lueftung_Grafana.png"><img src="https://f.zz.de/posts/202010141341.energieerfassung/320x-202010141341.energieerfassung.Lueftung_Grafana.png" width="320" height="123" class="img" /></a></p>