{"id":7643,"date":"2021-04-14T22:55:21","date_gmt":"2021-04-14T20:55:21","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=7643"},"modified":"2021-05-03T18:06:45","modified_gmt":"2021-05-03T16:06:45","slug":"tasmota-my-faqs","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/tasmota-my-faqs\/","title":{"rendered":"Tasmota: My FAQs"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_7643 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_7643')){$('.twoclick_social_bookmarks_post_7643').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Tasmota%3A%20My%20FAQs\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Athese%20are%20my%20FAQs%20for%20Tasmota%3A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/tasmota-my-faqs\\\/\",\"post_id\":7643,\"post_title_referrer_track\":\"Tasmota%3A+My+FAQs\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>these are my FAQs for Tasmota:<br \/>\n<!--more--><br \/>\nQ: What is a component Switch1n?<br \/>\nA: See <a href=\"https:\/\/tasmota.github.io\/docs\/Components\/\" rel=\"noopener\" target=\"_blank\">Component <\/a>list <\/p>\n<p>Q: Can I let an output blink?<br \/>\nA: Yes, set the blinkinterval in 100msec steps the blinkcount (how often) -> For example relay 1<br \/>\nBlinkTime1 10<br \/>\nBlinkCount 20<br \/>\npower1 3<\/p>\n<p>Q: Can I set an output only for a specific (pulse) time?<br \/>\nA: 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 &#8211; 100 -> For example set relay 2 to 12 sec (Pulsetime parameter + 100) :<br \/>\npulsetime 112<br \/>\npower on<\/p>\n<p>Q: Can I define a Name for a Button\/Switch ?<br \/>\nA: Yes use the webbutton command. Example:<br \/>\nwebbutton1 Light<\/p>\n<p>Q: How to setup a PWM output?<br \/>\nA: See this <a href=\"https:\/\/michlstechblog.info\/blog\/tasmota-setup-a-pwm-with-1024bit\/\" rel=\"noopener\" target=\"_blank\">post<\/a><\/p>\n<p>Q: How to build Tasmota?<br \/>\nA: See my <a href=\"https:\/\/michlstechblog.info\/blog\/tasmota-build-your-own-tasmota-firmware\/\" rel=\"noopener\" target=\"_blank\">post<\/a><\/p>\n<p>Q: How to flash Tasmota by esptool<br \/>\nA: described in this <a href=\"https:\/\/michlstechblog.info\/blog\/sonoff-th10-16-flashing-tasmota-and-setup-temperature-measurement\/\" rel=\"noopener\" target=\"_blank\">post<\/a><\/p>\n<p>Q: Are there some Rule examples?<br \/>\nA: Here are some examples<br \/>\nThis rule writes the onchange the width PWM1 to a attached display<\/p>\n<pre>\r\n<code>\r\nrule1 on PWM#PWM1 do displaytext [x0y0]PWM1: %value%  endon\r\n<\/code>\r\n<\/pre>\n<p>Show, enable or disable a rule<\/p>\n<pre>\r\n<code>\r\nrule1\r\nrule1 1\r\nrule1 0\r\n<\/code>\r\n<\/pre>\n<p>This rule acts on the change of the temperature of a SI7021 sensor.<br \/>\nI used the var1 to detect the change, if I would use <code>ON SI7021#Temperature DO <\/code> then each time a value is read from SI7021 a publish would send to the MQTT broker.<br \/>\nWhen var1 was changed and is lower then 9 power\/relay is set to on.<br \/>\nWhen var1 was changed and greater equal then 11 power\/relay is set to off.<\/p>\n<pre>\r\n<code>\r\nrule1 ON SI7021#Temperature != %var1% DO BACKLOG var1 %value%; publish switches\/tele\/tasmota_D7DCFE\/test %value%; ENDON \r\nON var1#state DO if (var1<9) POWER on; ENDIF ENDON  \r\nON var1#state DO if (var1>=11) POWER off; ENDIF ENDON\r\n<\/code>\r\n<\/pre>\n<p>Q: Does Tasmota supports a REST api?<br \/>\nA: No. But you can use GET <a href=\"https:\/\/tasmota.github.io\/docs\/Commands\/#with-web-requests\" rel=\"noopener\" target=\"_blank\">webrequests<\/a><br \/>\nFor example:<br \/>\n<code><br \/>\nhttp:\/\/myTasmotaIP\/cm?cmnd=Displaytext%20Test%20Test<br \/>\n<\/code><br \/>\nImportend 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.<br \/>\nAn example. The command is <code>Displaytext This is a Test!<\/code><br \/>\nPowershell:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&#x5B;Reflection.Assembly]::LoadWithPartialName(&quot;System.Web&quot;)\r\n&#x5B;System.Uri]::EscapeDataString(&quot;Displaytext This is a Test!&quot;)\r\nDisplaytext%20This%20is%20a%20Test!\r\n<\/pre>\n<p>Python:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom urllib.parse import quote\r\nquote(&quot;Displaytext This is a Test!&quot;)\r\n'Displaytext%20This%20is%20a%20Test%21'\r\n<\/pre>\n<p>Javascript:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nencodeURI(Displaytext This is a Test!&quot;);\r\n<\/pre>\n<p>Q: Can I manage my Tasmota devices centrally?<br \/>\nA: Yes, a Windows Program Tasmota <a href=\"https:\/\/github.com\/jziolkowski\/tdm\" rel=\"noopener\" target=\"_blank\">Device Manager<\/a> exists<\/p>\n<p>Q: Can I subscribe MQTT topics to use it in rules<br \/>\nA: Yes, but <a href=\"https:\/\/tasmota.github.io\/docs\/Subscribe-%26-Unsubscribe\/\" rel=\"noopener\" target=\"_blank\">subscribing<\/a> topics is not included in precompiled binaries. The firmware must compiled by yourself and SUPPORT_MQTT_EVENT must set.<\/p>\n<pre><code>\r\nrule2 ON mqtt#connected DO Subscribe TempVar, devices\/tele\/myTasmota\/SENSOR, SI7021.Temperature ENDON\r\nON Event#TempVar do Displaytext Temperatur: %value% endon\r\n<\/code><\/pre>\n<p>Q: Is the esp32 module supported<br \/>\nA: Yes, but is in <a href=\"https:\/\/tasmota.github.io\/docs\/ESP32\/\" rel=\"noopener\" target=\"_blank\">beta status<\/a>. The link contains the description on how to built it.<\/p>\n<p>Q: Can I display var,mem, .. in the WebUi<br \/>\nA: Yes, but the fimware must compiled with USE_SCRIPT and USE_SCRIPT_WEB_DISPLAY<br \/>\nTo be continued&#8230;<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, these are my FAQs for Tasmota:<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1580],"tags":[1584,1472],"class_list":["post-7643","post","type-post","status-publish","format-standard","hentry","category-tasmota-devices","tag-faq","tag-tasmota"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=7643"}],"version-history":[{"count":19,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7643\/revisions"}],"predecessor-version":[{"id":7687,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7643\/revisions\/7687"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=7643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=7643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=7643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}