Tasmota: My FAQs


these are my FAQs for Tasmota:

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

Q: Can I let an output blink?
A: Yes, set the blinkinterval in 100msec steps the blinkcount (how often) -> For example relay 1
BlinkTime1 10
BlinkCount 20
power1 3

Q: Can I set an output only for a specific (pulse) time?
A: Yes, set the pulsetime for the specific relay and it would be only switch on for that time. Note the pulsetime number <= 111 are 0.1sec steps, pulsetime numbers > 111 are 1sec steps – 100 -> For example set relay 2 to 12 sec (Pulsetime parameter + 100) :
pulsetime 112
power on

Q: Can I define a Name for a Button/Switch ?
A: Yes use the webbutton command. Example:
webbutton1 Light

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.

Q: Can I display var,mem, .. in the WebUi
A: Yes, but the fimware must compiled with USE_SCRIPT and USE_SCRIPT_WEB_DISPLAY
To be continued…


Advertisment to support michlstechblog.info

One thought on “Tasmota: My FAQs”

  1. I dont see where to post a new question but here is my question:
    In Tamota rule1 I want to set a Var or Mem to various values based on the state of power1 power2 and power3 etc. Then in rule3 I want to do a WebSend whenever the value of the variable changes. So the first part of The WebSend is the ip and API detals etc. and the command to set, then I need to have the value of the Var, and then finish with the oAuth detals etc. It needs to end up with no spaces before and after the Var value. So far I have found no way for Tasmota to substitute in the value of Var rather than the word Var. Do you have any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.