Difference between revisions of "IoT - TasmOTA"
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
*[https://tasmota.github.io/docs/#/Home Home] | *[https://tasmota.github.io/docs/#/Home Home] | ||
**[https://github.com/arendst/Tasmota github] | **[https://github.com/arendst/Tasmota github] | ||
− | *[http:// | + | *[http://ota.tasmota.com/tasmota/release/ Binaries] |
− | **[http:// | + | **[http://ota.tasmota.com/tasmota/ (Development Branch)] |
*[https://templates.blakadder.com/ Tasmota Device Templates Repository] | *[https://templates.blakadder.com/ Tasmota Device Templates Repository] | ||
Line 10: | Line 10: | ||
==Notes== | ==Notes== | ||
+ | |||
+ | ===Stability / Reliability Improvements=== | ||
+ | SetOption65 | ||
+ | |||
+ | Tasmota has a "[https://tasmota.github.io/docs/Device-Recovery/#fast-power-cycle-device-recovery Fast Power Cycle Device Recovery]" function. This is great if your power is 100% reliable & stable. If it's not, this is annoying as hell. | ||
+ | |||
+ | It basically "factory resets" the device when you have a power outage that's more than just an OFF...ON condition. | ||
+ | |||
+ | This function can be turned off by opening the console & sending <code>SetOption65 1</code> | ||
===How-Tos=== | ===How-Tos=== | ||
Line 19: | Line 28: | ||
''('''Adrian''' on the discord)'' | ''('''Adrian''' on the discord)'' | ||
− | There are several ways to achieve that in Tasmota. the easiest is:<syntaxhighlight> | + | There are several ways to achieve that in Tasmota. the easiest is: |
+ | <syntaxhighlight lang="INI-style config files"> | ||
rule1 1 | rule1 1 | ||
rule1 on power1#state do publish cmnd/otherswitch/power1 %value% endon | rule1 on power1#state do publish cmnd/otherswitch/power1 %value% endon | ||
Line 28: | Line 38: | ||
'''Note''': On this site, the standard format for TasmOTA MQTT is <code>TasmOTA/%topic%/%prefix%/</code> | '''Note''': On this site, the standard format for TasmOTA MQTT is <code>TasmOTA/%topic%/%prefix%/</code> | ||
− | so...<syntaxhighlight> | + | so... |
+ | <syntaxhighlight lang="INI-style config files"> | ||
rule1 1 | rule1 1 | ||
rule1 on power1#state do publish TasmOTA/D1-Mini-a/cmnd/power1 %value% endon | rule1 on power1#state do publish TasmOTA/D1-Mini-a/cmnd/power1 %value% endon | ||
Line 34: | Line 45: | ||
====Switch TasmOTA Web UI to "Dark Mode"==== | ====Switch TasmOTA Web UI to "Dark Mode"==== | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang="JSON"> |
cmnd/topic/webcolor {"WebColor":["#eaeaea","#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f","#ff5661","#008000", | cmnd/topic/webcolor {"WebColor":["#eaeaea","#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f","#ff5661","#008000", | ||
"#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#faffff","#999999", | "#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#faffff","#999999", | ||
"#eaeaea"]} | "#eaeaea"]} | ||
− | </syntaxhighlight>or... through MQTT:<syntaxhighlight> | + | </syntaxhighlight> |
+ | or... through MQTT: | ||
+ | <syntaxhighlight lang="JSON"> | ||
topic: cmnd/topic/webcolor | topic: cmnd/topic/webcolor | ||
payload: {"WebColor":"#eaeaea","#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f", | payload: {"WebColor":"#eaeaea","#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f", | ||
"#ff5661","#008000","#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f", | "#ff5661","#008000","#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f", | ||
"#faffff","#999999","#eaeaea"]} | "#faffff","#999999","#eaeaea"]} | ||
− | </syntaxhighlight>Working example:<syntaxhighlight> | + | </syntaxhighlight> |
+ | Working example: | ||
+ | <syntaxhighlight lang="JSON"> | ||
mosquitto_pub -h skynet -t TasmOTA/D1-Mini-a/cmnd/webcolor -m '{"WebColor":"#eaeaea",\ | mosquitto_pub -h skynet -t TasmOTA/D1-Mini-a/cmnd/webcolor -m '{"WebColor":"#eaeaea",\ | ||
"#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f","#ff5661","#008000","#faffff",\ | "#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f","#ff5661","#008000","#faffff",\ |
Latest revision as of 13:52, 30 January 2021
Contents
Links
Notes
Stability / Reliability Improvements
SetOption65
Tasmota has a "Fast Power Cycle Device Recovery" function. This is great if your power is 100% reliable & stable. If it's not, this is annoying as hell.
It basically "factory resets" the device when you have a power outage that's more than just an OFF...ON condition.
This function can be turned off by opening the console & sending SetOption65 1
How-Tos
Things that work accidentally
Apparently, you can get to the various UI pages from the captive portal WiFi setup page by opening a second browser window on your phone & typing their addresses directly. (i.e.: http://192.168.4.1/in or http://192.168.4.1/up etc...)
Control one TasmOTA from another:
(Adrian on the discord)
There are several ways to achieve that in Tasmota. the easiest is:
rule1 1
rule1 on power1#state do publish cmnd/otherswitch/power1 %value% endon
in both devices the switch will toggle the local relay and the relay action will toggle the remote one
This happens no matter HOW the toggle is initiated (physical, web, MQTT...).
Note: On this site, the standard format for TasmOTA MQTT is TasmOTA/%topic%/%prefix%/
so...
rule1 1
rule1 on power1#state do publish TasmOTA/D1-Mini-a/cmnd/power1 %value% endon
Switch TasmOTA Web UI to "Dark Mode"
cmnd/topic/webcolor {"WebColor":["#eaeaea","#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f","#ff5661","#008000",
"#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#faffff","#999999",
"#eaeaea"]}
or... through MQTT:
topic: cmnd/topic/webcolor
payload: {"WebColor":"#eaeaea","#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f",
"#ff5661","#008000","#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f",
"#faffff","#999999","#eaeaea"]}
Working example:
mosquitto_pub -h skynet -t TasmOTA/D1-Mini-a/cmnd/webcolor -m '{"WebColor":"#eaeaea",\
"#252525","#4f4f4f","#000000","#dddddd","#65c115","#1f1f1f","#ff5661","#008000","#faffff",\
"#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#faffff","#999999","#eaeaea"]}'