Tasmota: My FAQs


these are my FAQs for Tasmota:

Q: What is a component Switch1n?
A: See Component list

Q: How to setup a PWM output?
A: See this post

Q: How to build Tasmota?
A: See my post

Q: How to flash Tasmota by esptool
A: described in this post

Q: Are there some Rule examples?
A: Here are some examples
This rule writes the onchange the width PWM1 to a attached display

rule1 on PWM#PWM1 do displaytext [x0y0]PWM1: %value%  endon

Show, enable or disable a rule

rule1 1
rule1 0

This rule acts on the change of the temperature of a SI7021 sensor.
I used the var1 to detect the change, if I would use ON SI7021#Temperature DO then each time a value is read from SI7021 a publish would send to the MQTT broker.
When var1 was changed and is lower then 9 power/relay is set to on.
When var1 was changed and greater equal then 11 power/relay is set to off.

rule1 ON SI7021#Temperature != %var1% DO BACKLOG var1 %value%; publish switches/tele/tasmota_D7DCFE/test %value%; ENDON 
ON var1#state DO if (var1<9) POWER on; ENDIF ENDON  
ON var1#state DO if (var1>=11) POWER off; ENDIF ENDON

Q: Does Tasmota supports a REST api?
A: No. But you can use GET webrequests
For example:


Importend is to encode the url in HTML format when special characters or spaces must/are used. This can be simply done by powershell or python.
An example. The command is Displaytext This is a Test!

[System.Uri]::EscapeDataString("Displaytext This is a Test!")


from urllib.parse import quote
quote("Displaytext This is a Test!")


encodeURI(Displaytext This is a Test!");

Q: Can I manage my Tasmota devices centrally?
A: Yes, a Windows Program Tasmota Device Manager exists

Q: Can I subscribe MQTT topics to use it in rules
A: Yes, but subscribing topics is not included in precompiled binaries. The firmware must compiled by yourself and SUPPORT_MQTT_EVENT must set.

rule2 ON mqtt#connected DO Subscribe TempVar, devices/tele/myTasmota/SENSOR, SI7021.Temperature ENDON
ON Event#TempVar do Displaytext Temperatur: %value% endon

Q: Is the esp32 module supported
A: Yes, but is in beta status. The link contains the description on how to built it.
To be continued…


Advertisment to support michlstechblog.info

Tasmota: Setup a PWM with 1024Bit


short post today. It shows howto configure a GPIO Pin as PWM with a width of 1024Bits. Note the restrictions when using IO Ports.

Configure GPIO 14 to PWM 1.

Continue reading Tasmota: Setup a PWM with 1024Bit

Tasmota: Connect a lcdproc/LCDd compatible HD44780 i2c Display


I already owned a HD44780 I2C Display, which is compatible to LCDd/lcdproc, and want to get this running with Tasmota.

Problem: The LCD 2004 or LCD 1602 Display, for which the Tasmota LCD driver was written, uses a different wiring between the i2c expander (PCF8574) and the HD44780 Display.
Continue reading Tasmota: Connect a lcdproc/LCDd compatible HD44780 i2c Display

Linux: Set systemd target (init/runlevel level) at grub command line


if you temporary don’t want to boot to a graphical login manager you can, at the grub command line, tell the systemd-target the system should boot to.

Continue reading Linux: Set systemd target (init/runlevel level) at grub command line

Linux: Enable i2c kernel tracing


when you want to see whats happened on the i2c bus on an raspberry pi you can enable tracing with debugfs.

Get root and mount debugfs. This is usually already mounted in raspbian

michael@debdev ~ # sudo su
root@debdev ~ # mount -t debugfs none /sys/kernel/debug

Continue reading Linux: Enable i2c kernel tracing

My Knowledgebase for things about Linux, Windows, VMware, Electronic and so on…