diff --git a/API.md b/API.md index 737b1b45b..354382cfc 100644 --- a/API.md +++ b/API.md @@ -2,7 +2,7 @@ # Basic API information -Tasmota can easily be extended by developers using provided function pointers as callback Ids. This document lists the available callback function Ids. See the wiki (https://github.com/arendst/Tasmota/wiki/Sensor-API) for more information. +Tasmota can easily be extended by developers using provided function pointers as callback Ids. This document lists the available callback function Ids. Read [Sensor API](https://tasmota.github.io/docs/#/Sensor-API) for more information. Callback availability can be checked by searching for either XdrvCall, XsnsCall, XdspCall, XnrgCall and XlgtCall. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1bda5243a..43cead24a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Everybody is welcome and invited to contribute to Tasmota Project by: * Testing newly released features and reporting issues. * Providing Pull Requests (Features, Proof of Concepts, Language files or Fixes) -* Contributing missing documentation for features and devices on our [Wiki](https://github.com/arendst/Tasmota/wiki/Contributing) +* Contributing missing documentation for features and devices in our [documentation](https://tasmota.github.io/docs/#/Contributing) This document describes rules that are in effect for this repository, meant for handling issues by contributors in the issue tracker and PRs. diff --git a/I2CDEVICES.md b/I2CDEVICES.md index 33e896110..73f4a9c6b 100644 --- a/I2CDEVICES.md +++ b/I2CDEVICES.md @@ -1,6 +1,4 @@ -Logo - -# Tasmota I2C devices +# I2C devices Tasmota supports several I2C devices but to use them they mostly need to be enabled at compile time to solve possible address conflicts. diff --git a/MODULES.md b/MODULES.md deleted file mode 100644 index 61d45e16e..000000000 --- a/MODULES.md +++ /dev/null @@ -1,78 +0,0 @@ -## Supported Modules - -The following hardware modules are supported. - -Module | Description -------------------|----------------------- -01 Sonoff Basic | Sonoff Basic Wifi Smart Switch -02 Sonoff RF | Sonoff RF Wifi Smart Switch with RF (434MHz) receiver -03 Sonoff SV | Sonoff SV Safe Voltage Wifi Smart Switch -04 Sonoff TH | Sonoff TH10/TH16 Wifi Smart Switch with Sensor connection -05 Sonoff Dual | Sonoff Dual Wifi Smart Switch -06 Sonoff Pow | Sonoff Pow Wifi Smart Switch with Energy Monitoring -07 Sonoff 4CH | Sonoff 4CH 4-gang Wifi Smart Switch -08 Sonoff S2X | Sonoff S20/S26 Wifi Smart Socket -09 Slampher | Sonoff Slampher Wifi Smart Light Bulb Socket with RF (434MHz) receiver -10 Sonoff Touch | Sonoff Touch Wifi Light Switch -11 Sonoff LED | Sonoff Led Wifi Led Pack (Retired) -12 1 Channel | 1 Channel Inching/Self Locking Wifi Switch 5V/12V -13 4 Channel | 4 Channel Inching/Self Locking Wifi Switch (Retired) -14 Motor C/AC | Motor Clockwise/Antoclockwise Wifi Switch (Retired) -15 ElectroDragon | Electrodragon Wifi IoT Board -16 EXS Relay(s) | Electronic Experience Store 1 or 2-gang Wifi Module -17 WiOn | WiOn Wifi Smart Socket -18 Generic | Any ESP8266/ESP8285 device like WeMos and NodeMCU -19 Sonoff Dev | Sonoff Dev Wifi Development Board -20 H801 | H801 Wifi RGBWW Led Controller -21 Sonoff SC | Sonoff SC Wifi Environmental Monitor -22 Sonoff BN-SZ | Sonoff BN-SZ01 Wifi Ceiling Led (Retired) -23 Sonoff 4CH Pro | Sonoff 4CH Pro 4-gang Wifi Smart Switch -24 Huafan SS | HuaFan Wifi Smart Socket -25 Sonoff Bridge | Sonoff RF (434MHz) transceive to Wifi Bridge -26 Sonoff B1 | Sonoff B1 Wifi RGBWW Led Bulb -27 AiLight | Ai-Thinker RGBW Led Bulb -28 Sonoff T1 1CH | Sonoff T1 1-gang Wifi Light Switch -29 Sonoff T1 2CH | Sonoff T1 2-gang Wifi Light Switch -30 Sonoff T1 3CH | Sonoff T1 3-gang Wifi Light Switch -31 Supla Espablo | 2-gang Wifi Module -32 Witty Cloud | Witty Cloud ESP8266 Wifi Development Board -33 Yunshan Relay | ESP8266 Wifi Network Relay Module -34 MagicHome | MagicHome, Flux-light and some Arilux LC10 RGB(W) Led Controller -35 Luani HVIO | Luani ESP8266 Wifi I/O Module -36 KMC 70011 | KMC Wifi Smart Socket with Energy Monitoring -37 Arilux LC01 | Arilux AL-LC01 RGB Led Controller -38 Arilux LC11 | Arilux AL-LC11 RGBWW Led Controller -39 Sonoff Dual R2 | Sonoff Dual R2 Wifi Smart Switch -40 Arilux LC06 | Arilux AL-LC06 RGB(WW) Led Controller -41 Sonoff S31 | Sonoff S31 Wifi Smart Socket with Energy Monitoring -42 Zengge WF017 | Zengge WF017 Wifi RGB(W) Led Controller -43 Sonoff Pow R2 | Sonoff Pow R2 Wifi Smart Switch with Energy Monitoring -44 Sonoff iFan02 | Sonoff iFan02 Wifi Smart Ceiling Fan with Light -45 BlitzWolf SHP | BlitzWolf BW-SHP2, BW-SHP6, HomeCube SP1, Gosund SP111, Teckin SP22 Wifi Smart Switch with Energy Monitoring -46 Shelly 1 | Shelly 1 Open Source Wifi Relay Module -47 Shelly 2 | Shelly 2 Wifi 2-gang Relay Module with Energy Monitoring -48 Xiaomi Philips | Xiaomi Philips Wifi WW Led Bulb -49 Neo Coolcam | Neo Coolcam Wifi Smart Socket -50 ESP Switch | ESP Switch 4-gang Wifi Switch with Leds -51 OBI Socket | OBI Wifi Smart Socket -52 Teckin | Teckin SP22 Wifi Smart Switch with Energy Monitoring -53 AplicWDP303075 | Aplic WDP 303075 CSL Wifi Smart Switch with Energy Monitoring -54 Tuya Dimmer | MIUO (and other Tuya based) Wifi Dimmer for Incandescent Lights and Led -55 Gosund SP1 v23 | Gosund SP1 v2.3 Wifi Smart Switch with Energy Monitoring -56 ARMTR Dimmer | ARMtronix Wifi dimmer for Incandescent Lights and Led -57 SK03 Outdoor | SK03 Outdoor Wifi Smart Switch with Energy Monitoring -58 PS-16-DZ | PS-16-DZ Wifi dimmer for Incandescent Lights and Led -59 Teckin US | Teckin SP20 and ZooZee SA102 Wifi Smart Switch with Energy Monitoring -60 Manzoku strip | Manzoku Wifi Smart Power Strip with four Relays -61 OBI Socket 2 | OBI 2 Wifi Smart Socket -62 YTF IR Bridge | YTF Infra Red Wifi Bridge -63 Digoo DG-SP202 | Digoo DG-SP202 Dual Wifi Smart Switch with Energy Monitoring -64 KA10 | Smanergy KA10 Wifi Smart Wall Switch with Energy Monitoring -65 Luminea ZX2820 | Luminea ZX2820 Wifi Smart Switch with Energy Monitoring -66 Mi Desk Lamp | Mi Desk Lamp with rotary switch and Wifi -67 SP10 | Tuya SP10 Wifi Smart Switch with Energy Monitoring -68 WAGA CHCZ02MB | WAGA life CHCZ02MB Wifi Smart Switch with Energy Monitoring -69 SYF05 | Sunyesmart SYF05 RGBWW Wifi Led Bulb -70 Sonoff L1 | Sonoff L1 light strip -71 Sonoff iFan03 | Sonoff iFan03 Wifi Smart Ceiling Fan with Light -72 EXS Dimmer | EXS Wifi Dimmer v4 diff --git a/README.md b/README.md index 30d8cd851..2cd0e172a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ In addition to the [release webpage](https://github.com/arendst/Tasmota/releases [![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://thehackbox.org/tasmota/) [![Build Status](https://img.shields.io/travis/arendst/Tasmota.svg)](https://travis-ci.org/arendst/Tasmota) -See [tasmota/_changelog.ino](tasmota/_changelog.ino) for detailed change information. +See [tasmota/CHANGELOG.md](tasmota/CHANGELOG.md) for detailed change information. Unless your Tasmota powered device exhibits a problem or you need to make use of a feature that is not available in the Tasmota version currently installed on your device, leave your device alone - it works so don't make unnecessary changes! If the release version (i.e., the master branch) exhibits unexpected behaviour for your device and configuration, you should upgrade to the latest development version instead to see if your problem is resolved as some bugs in previous releases or development builds may already have been resolved. @@ -42,10 +42,10 @@ We don't take any responsibility nor liability for using this software nor for t ## Note -Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using [Templates](https://github.com/arendst/Tasmota/wiki/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) create your own [Template](https://github.com/arendst/Tasmota/wiki/Templates#creating-your-template-). +Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using [Templates](https://tasmota.github.io/docs/#/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) create your own [Template](https://tasmota.github.io/docs/#/Templates?id=creating-your-template). ## Quick Install -Download one of the released binaries from https://github.com/arendst/Tasmota/releases and flash it to your hardware as [documented in the wiki](https://github.com/arendst/Tasmota/wiki/Flashing). +Download one of the released binaries from https://github.com/arendst/Tasmota/releases and flash it to your hardware [using our installation guide](https://tasmota.github.io/docs/#/installation/). ## Important User Compilation Information If you want to compile Tasmota yourself keep in mind the following: @@ -56,11 +56,11 @@ If you want to compile Tasmota yourself keep in mind the following: ## Configuration Information -Please refer to the installation and configuration articles in the [wiki](https://github.com/arendst/Tasmota/wiki). +Please refer to the installation and configuration articles in our [documentation](https://tasmota.github.io/docs). ## Migration Information -See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migration-path) for instructions how to migrate to a major version. Pay attention to the following version breaks due to dynamic settings updates: +See [wiki migration path](https://tasmota.github.io/docs/#/Upgrading?id=migration-path) for instructions how to migrate to a major version. Pay attention to the following version breaks due to dynamic settings updates: 1. Migrate to **Sonoff-Tasmota 3.9.x** 2. Migrate to **Sonoff-Tasmota 4.x** @@ -74,8 +74,8 @@ See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migr For a database of supported devices see [Tasmota Device Templates Repository](https://blakadder.github.io/templates) -See [Wiki](https://github.com/arendst/Tasmota/wiki) for use instructions and how-to's.
-See [Community](https://groups.google.com/d/forum/sonoffusers) for forum.
+See [Wiki](https://tasmota.github.io/docs) for use instructions and how-to's. +See [Community](https://groups.google.com/d/forum/sonoffusers) for forum. Visit [Discord Chat](https://discord.gg/Ks2Kzd4) for discussions and troubleshooting. ## Contribute @@ -84,7 +84,7 @@ You can contribute to Tasmota by - providing Pull Requests (Features, Proof of Concepts, Language files or Fixes) - testing new released features and report issues - donating to acquire hardware for testing and implementing or out of gratitude -- contributing missing documentation for features and devices on our [Wiki](https://github.com/arendst/Tasmota/wiki) +- contributing missing [documentation](https://tasmota.github.io/docs) for features and devices [![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://paypal.me/tasmota) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 129adf4fb..d98a239f2 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -6,7 +6,7 @@ ## Migration Information -See [wiki migration path](https://github.com/arendst/Tasmota/wiki/Upgrading#migration-path) for instructions how to migrate to a major version. Pay attention to the following version breaks due to dynamic settings updates: +See [migration path](https://tasmota.github.io/docs/#/Upgrading?id=migration-path) for instructions how to migrate to a major version. Pay attention to the following version breaks due to dynamic settings updates: 1. Migrate to **Sonoff-Tasmota 3.9.x** 2. Migrate to **Sonoff-Tasmota 4.x** @@ -22,7 +22,7 @@ Although it might still compile on previous Core versions all support will be re ## Support of TLS -To save resources when TLS is enabled mDNS needs to be disabled. In addition to TLS using fingerprints now also user supplied CA certs and AWS IoT is supported. See full documentation on https://github.com/arendst/Tasmota/wiki/AWS-IoT +To save resources when TLS is enabled mDNS needs to be disabled. In addition to TLS using fingerprints now also user supplied CA certs and AWS IoT is supported. Read [full documentation](https://tasmota.github.io/docs/#/AWS-IoT) ## Initial configuration tools @@ -30,7 +30,82 @@ For initial configuration this release supports Webserver based **WifiManager** ## Supported Modules -Supported [hardware modules.](MODULES.md) +The following hardware modules are supported. + +Module | Description +------------------|----------------------- +01 Sonoff Basic | Sonoff Basic Wifi Smart Switch +02 Sonoff RF | Sonoff RF Wifi Smart Switch with RF (434MHz) receiver +03 Sonoff SV | Sonoff SV Safe Voltage Wifi Smart Switch +04 Sonoff TH | Sonoff TH10/TH16 Wifi Smart Switch with Sensor connection +05 Sonoff Dual | Sonoff Dual Wifi Smart Switch +06 Sonoff Pow | Sonoff Pow Wifi Smart Switch with Energy Monitoring +07 Sonoff 4CH | Sonoff 4CH 4-gang Wifi Smart Switch +08 Sonoff S2X | Sonoff S20/S26 Wifi Smart Socket +09 Slampher | Sonoff Slampher Wifi Smart Light Bulb Socket with RF (434MHz) receiver +10 Sonoff Touch | Sonoff Touch Wifi Light Switch +11 Sonoff LED | Sonoff Led Wifi Led Pack (Retired) +12 1 Channel | 1 Channel Inching/Self Locking Wifi Switch 5V/12V +13 4 Channel | 4 Channel Inching/Self Locking Wifi Switch (Retired) +14 Motor C/AC | Motor Clockwise/Antoclockwise Wifi Switch (Retired) +15 ElectroDragon | Electrodragon Wifi IoT Board +16 EXS Relay(s) | Electronic Experience Store 1 or 2-gang Wifi Module +17 WiOn | WiOn Wifi Smart Socket +18 Generic | Any ESP8266/ESP8285 device like WeMos and NodeMCU +19 Sonoff Dev | Sonoff Dev Wifi Development Board +20 H801 | H801 Wifi RGBWW Led Controller +21 Sonoff SC | Sonoff SC Wifi Environmental Monitor +22 Sonoff BN-SZ | Sonoff BN-SZ01 Wifi Ceiling Led (Retired) +23 Sonoff 4CH Pro | Sonoff 4CH Pro 4-gang Wifi Smart Switch +24 Huafan SS | HuaFan Wifi Smart Socket +25 Sonoff Bridge | Sonoff RF (434MHz) transceive to Wifi Bridge +26 Sonoff B1 | Sonoff B1 Wifi RGBWW Led Bulb +27 AiLight | Ai-Thinker RGBW Led Bulb +28 Sonoff T1 1CH | Sonoff T1 1-gang Wifi Light Switch +29 Sonoff T1 2CH | Sonoff T1 2-gang Wifi Light Switch +30 Sonoff T1 3CH | Sonoff T1 3-gang Wifi Light Switch +31 Supla Espablo | 2-gang Wifi Module +32 Witty Cloud | Witty Cloud ESP8266 Wifi Development Board +33 Yunshan Relay | ESP8266 Wifi Network Relay Module +34 MagicHome | MagicHome, Flux-light and some Arilux LC10 RGB(W) Led Controller +35 Luani HVIO | Luani ESP8266 Wifi I/O Module +36 KMC 70011 | KMC Wifi Smart Socket with Energy Monitoring +37 Arilux LC01 | Arilux AL-LC01 RGB Led Controller +38 Arilux LC11 | Arilux AL-LC11 RGBWW Led Controller +39 Sonoff Dual R2 | Sonoff Dual R2 Wifi Smart Switch +40 Arilux LC06 | Arilux AL-LC06 RGB(WW) Led Controller +41 Sonoff S31 | Sonoff S31 Wifi Smart Socket with Energy Monitoring +42 Zengge WF017 | Zengge WF017 Wifi RGB(W) Led Controller +43 Sonoff Pow R2 | Sonoff Pow R2 Wifi Smart Switch with Energy Monitoring +44 Sonoff iFan02 | Sonoff iFan02 Wifi Smart Ceiling Fan with Light +45 BlitzWolf SHP | BlitzWolf BW-SHP2, BW-SHP6, HomeCube SP1, Gosund SP111, Teckin SP22 Wifi Smart Switch with Energy Monitoring +46 Shelly 1 | Shelly 1 Open Source Wifi Relay Module +47 Shelly 2 | Shelly 2 Wifi 2-gang Relay Module with Energy Monitoring +48 Xiaomi Philips | Xiaomi Philips Wifi WW Led Bulb +49 Neo Coolcam | Neo Coolcam Wifi Smart Socket +50 ESP Switch | ESP Switch 4-gang Wifi Switch with Leds +51 OBI Socket | OBI Wifi Smart Socket +52 Teckin | Teckin SP22 Wifi Smart Switch with Energy Monitoring +53 AplicWDP303075 | Aplic WDP 303075 CSL Wifi Smart Switch with Energy Monitoring +54 Tuya Dimmer | MIUO (and other Tuya based) Wifi Dimmer for Incandescent Lights and Led +55 Gosund SP1 v23 | Gosund SP1 v2.3 Wifi Smart Switch with Energy Monitoring +56 ARMTR Dimmer | ARMtronix Wifi dimmer for Incandescent Lights and Led +57 SK03 Outdoor | SK03 Outdoor Wifi Smart Switch with Energy Monitoring +58 PS-16-DZ | PS-16-DZ Wifi dimmer for Incandescent Lights and Led +59 Teckin US | Teckin SP20 and ZooZee SA102 Wifi Smart Switch with Energy Monitoring +60 Manzoku strip | Manzoku Wifi Smart Power Strip with four Relays +61 OBI Socket 2 | OBI 2 Wifi Smart Socket +62 YTF IR Bridge | YTF Infra Red Wifi Bridge +63 Digoo DG-SP202 | Digoo DG-SP202 Dual Wifi Smart Switch with Energy Monitoring +64 KA10 | Smanergy KA10 Wifi Smart Wall Switch with Energy Monitoring +65 Luminea ZX2820 | Luminea ZX2820 Wifi Smart Switch with Energy Monitoring +66 Mi Desk Lamp | Mi Desk Lamp with rotary switch and Wifi +67 SP10 | Tuya SP10 Wifi Smart Switch with Energy Monitoring +68 WAGA CHCZ02MB | WAGA life CHCZ02MB Wifi Smart Switch with Energy Monitoring +69 SYF05 | Sunyesmart SYF05 RGBWW Wifi Led Bulb +70 Sonoff L1 | Sonoff L1 light strip +71 Sonoff iFan03 | Sonoff iFan03 Wifi Smart Ceiling Fan with Light +72 EXS Dimmer | EXS Wifi Dimmer v4 Over 500 additional devices are supported using [templates](TEMPLATES.md). diff --git a/SUPPORT.md b/SUPPORT.md index e9e4821c9..1d837db05 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,4 +1,4 @@ - +Logo # Support diff --git a/tools/decode-config.html b/tools/decode-config.html deleted file mode 100644 index 721e7638a..000000000 --- a/tools/decode-config.html +++ /dev/null @@ -1,375 +0,0 @@ -

decode-config.py

-

decode-config.py is able to backup and restore Tasmota configuration.

-

In comparison with the Tasmota build-in "Backup/Restore Configuration" function decode-config.py

- -

Comparing backup files created by decode-config.py and *.dmp files created by Tasmota "Backup/Restore Configuration":

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 decode-config.py
*.json file
Tasmota
*.dmp file
EncryptedNoYes
ReadableYesNo
Simply editableYesNo
Simply batch processingYesNo
-

decode-config.py is compatible with Tasmota version from v5.10.0 up to now.

-

Content

- -

Prerequisite

- -

Linux

-
sudo apt-get install python python-pip libcurl4-openssl-dev libssl-dev
-
pip install pycurl configargparse
-

Windows 10

-

Install Python 2.7 then install dependencies. For PyCurl you need to download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl for Windows 10 64bit.

-
pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl configargparse
-// run the command from the folder where you downloaded the file
-
-pip install configargparse
-
-

File Types

-

decode-config.py can handle the following backup file types:

-

.dmp Format

-

Configuration data as used by Tasmota "Backup/Restore Configuration" web interface. -This format is binary and encrypted.

-

.json Format

-

Configuration data in JSON-format. -This format is decrypted, human readable and editable and can also be used for the --restore-file parameter. -This file will be created by decode-config.py using the --backup-file with --backup-type json parameter, this is the default.

-

.bin Format

-

Configuration data in binary format. -This format is binary decryptet, editable (e.g. using a hex editor) and can also be used for --restore-file command. -It will be created by decode-config.py using --backup-file with --backup-type bin. -Note: -The .bin file contains the same information as the original .dmp file from Tasmota "Backup/Restore Configuration" but it is decrpted and 4 byte longer than an original (it is a prefix header at the beginning). .bin file data starting at address 4 contains the same as the struct SYSCFG from Tasmota settings.h in decrypted format.

-

File extensions

-

You don't need to append exensions for your file name as decode-config.py uses auto extension as default. The extension will be choose based on file contents and --backup-type parameter. -If you do not want using auto extensions use the --no-extension parameter.

-

Usage

-

After download don't forget to set the executable flag under linux with chmod +x decode-config.py or call the program using python decode-config.py....

-

Basics

-

At least pass a source where you want to read the configuration data from using -f <filename> or -d <host>:

-

The source can be either

- -

Example:

-
decode-config.py -d tasmota-4281
-

will output a human readable configuration in JSON-format:

-
{
-  "altitude": 112,
-  "baudrate": 115200,
-  "blinkcount": 10,
-  "blinktime": 10,
-...
-  "ws_width": [
-    1,
-    3,
-    5
-  ]
-}
-

Save backup file

-

To save the output as backup file use --backup-file <filename>, you can use placeholder for Version, Friendlyname and Hostname:

-
decode-config.py -d tasmota-4281 --backup-file Config_@f_@v
-

If you have setup a WebPassword within Tasmota, use

-
decode-config.py -d tasmota-4281 -p <yourpassword> --backup-file Config_@f_@v
-

will create a file like Config_Tasmota_6.4.0.json (the part Tasmota and 6.4.0 will choosen related to your device configuration). Because the default backup file format is JSON, you can read and change it with any raw text editor.

-

Restore backup file

-

Reading back a saved (and possible changed) backup file use the --restore-file <filename> parameter. This will read the (changed) configuration data from this file and send it back to the source device or filename.

-

To restore the previously save backup file Config_Tasmota_6.2.1.json to device tasmota-4281 use:

-
decode-config.py -d tasmota-4281 --restore-file Config_Tasmota_6.2.1.json
-

with password set by WebPassword:

-
decode-config.py -d tasmota-4281 -p <yourpassword> --restore-file Config_Tasmota_6.2.1.json
-

Output to screen

-

To force screen output use the --output parameter.

-

Output to screen is default enabled when calling the program with a source parameter (-f or -d) but without any backup or restore parameter.

-

JSON output

-

The default output format is JSON. You can force JSON output using the --output-format json parameter.

-

Example:

-
decode-config.py -d tasmota-4281 -c my.conf -x Wifi --output-format json
-
-{
-  ...
-  "hostname": "%s-%04d",
-  "ip_address": [
-    "0.0.0.0",
-    "192.168.12.1",
-    "255.255.255.0",
-    "192.168.12.1"
-  ],
-  "ntp_server": [
-    "ntp.localnet.home",
-    "ntp2.localnet.home",
-    "192.168.12.1"
-  ],
-  "sta_active": 0,
-  "sta_config": 5,
-  "sta_pwd": [
-    "myWlAnPaszxwo!z",
-    "myWlAnPaszxwo!z2"
-  ],
-  "sta_ssid": [
-    "wlan.1",
-    "my-wlan"
-  ],
-  "web_password": "myPaszxwo!z",
-  "webserver": 2
-  ...
-}
-

Note: JSON output always contains all configuration data like the backup file except you are using --group arg.

-

Tasmota command output

-

decode-config.py is able to translate the configuration data to (most all) Tasmota commands. To output your configuration as Tasmota commands use --output-format cmnd or --output-format command.

-

Example:

-
decode-config.py -d tasmota-4281 -c my.conf -g Wifi --output-format cmnd
-
-# Wifi:
-  AP 0
-  Hostname %s-%04d
-  IPAddress1 0.0.0.0
-  IPAddress2 192.168.12.1
-  IPAddress3 255.255.255.0
-  IPAddress4 192.168.12.1
-  NtpServer1 ntp.localnet.home
-  NtpServer2 ntp2.localnet.home
-  NtpServer3 192.168.12.1
-  Password1 myWlAnPaszxwo!z
-  Password2 myWlAnPaszxwo!z2
-  SSId1 wlan.1
-  SSId2 wlan.1
-  WebPassword myPaszxwo!z
-  WebServer 2
-  WifiConfig 5
-

Note: A few very specific module commands like MPC230xx, KNX and some Display commands are not supported. These are still available by JSON output.

-

Filter data

-

The huge number of Tasmota configuration data can be overstrained and confusing, so the most of the configuration data are grouped into categories.

-

With decode-config.py the following categories are available: Display, Domoticz, Internal, KNX, Led, Logging, MCP230xx, MQTT, Main, Management, Pow, Sensor, Serial, SetOption, RF, System, Timers, Wifi

-

These are similary to the categories on https://github.com/arendst/Tasmota/wiki/Commands.

-

To filter outputs to a subset of groups use the -g or --group arg concatenating the grooup you want, e. g.

-
decode-config.py -d tasmota-4281 -c my.conf --output-format cmnd --group Main MQTT Management Wifi
-

Configuration file

-

Each argument that start with -- (eg. --file) can also be set in a config file (specified via -c). Config file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at https://pypi.org/project/ConfigArgParse).

-

If an argument is specified in more than one place, then commandline values override config file values which override defaults. This is usefull if you always use the same argument or a basic set of arguments.

-

The http authentication credentials --username and --password is predestinated to store it in a file instead using it on your command line as argument:

-

e.g. my.conf:

-
[source]
-username = admin
-password = myPaszxwo!z
-

To make a backup file from example above you can now pass the config file instead using the password on command line:

-
decode-config.py -d tasmota-4281 -c my.conf --backup-file Config_@f_@v
-

More program arguments

-

For better reading each short written arg (minus sign -) has a corresponding long version (two minus signs --), eg. --device for -d or --file for -f (note: not even all -- arg has a corresponding - one).

-

A short list of possible program args is displayed using -h or --help.

-

For advanced help use -H or --full-help:

-
usage: decode-config.py [-f <filename>] [-d <host>] [-P <port>]
-                        [-u <username>] [-p <password>] [-i <filename>]
-                        [-o <filename>] [-t json|bin|dmp] [-E] [-e] [-F]
-                        [--json-indent <indent>] [--json-compact]
-                        [--json-hide-pw] [--json-show-pw]
-                        [--cmnd-indent <indent>] [--cmnd-groups]
-                        [--cmnd-nogroups] [--cmnd-sort] [--cmnd-unsort]
-                        [-c <filename>] [-S] [-T json|cmnd|command]
-                        [-g {Control,Devices,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi} [{Control,Devices,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi} ...]]
-                        [--ignore-warnings] [-h] [-H] [-v] [-V]
-
-Backup/Restore Tasmota configuration data. Args that start with '--'
-(eg. -f) can also be set in a config file (specified via -c). Config file
-syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at
-https://goo.gl/R74nmi). If an arg is specified in more than one place, then
-commandline values override config file values which override defaults.
-
-Source:
-  Read/Write Tasmota configuration from/to
-
-  -f, --file, --tasmota-file <filename>
-                        file to retrieve/write Tasmota configuration from/to
-                        (default: None)'
-  -d, --device, --host <host>
-                        hostname or IP address to retrieve/send Tasmota
-                        configuration from/to (default: None)
-  -P, --port <port>     TCP/IP port number to use for the host connection
-                        (default: 80)
-  -u, --username <username>
-                        host HTTP access username (default: admin)
-  -p, --password <password>
-                        host HTTP access password (default: None)
-
-Backup/Restore:
-  Backup & restore specification
-
-  -i, --restore-file <filename>
-                        file to restore configuration from (default: None).
-                        Replacements: @v=firmware version from config,
-                        @f=device friendly name from config, @h=device
-                        hostname from config, @H=device hostname from device
-                        (-d arg only)
-  -o, --backup-file <filename>
-                        file to backup configuration to (default: None).
-                        Replacements: @v=firmware version from config,
-                        @f=device friendly name from config, @h=device
-                        hostname from config, @H=device hostname from device
-                        (-d arg only)
-  -t, --backup-type json|bin|dmp
-                        backup filetype (default: 'json')
-  -E, --extension       append filetype extension for -i and -o filename
-                        (default)
-  -e, --no-extension    do not append filetype extension, use -i and -o
-                        filename as passed
-  -F, --force-restore   force restore even configuration is identical
-
-JSON output:
-  JSON format specification
-
-  --json-indent <indent>
-                        pretty-printed JSON output using indent level
-                        (default: 'None'). -1 disables indent.
-  --json-compact        compact JSON output by eliminate whitespace
-  --json-hide-pw        hide passwords
-  --json-show-pw, --json-unhide-pw
-                        unhide passwords (default)
-
-Tasmota command output:
-  Tasmota command output format specification
-
-  --cmnd-indent <indent>
-                        Tasmota command grouping indent level (default: '2').
-                        0 disables indent
-  --cmnd-groups         group Tasmota commands (default)
-  --cmnd-nogroups       leave Tasmota commands ungrouped
-  --cmnd-sort           sort Tasmota commands (default)
-  --cmnd-unsort         leave Tasmota commands unsorted
-
-Common:
-  Optional arguments
-
-  -c, --config <filename>
-                        program config file - can be used to set default
-                        command args (default: None)
-  -S, --output          display output regardsless of backup/restore usage
-                        (default do not output on backup or restore usage)
-  -T, --output-format json|cmnd|command
-                        display output format (default: 'json')
-  -g, --group {Control,Devices,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi}
-                        limit data processing to command groups (default no
-                        filter)
-  --ignore-warnings     do not exit on warnings. Not recommended, used by your
-                        own responsibility!
-
-Info:
-  Extra information
-
-  -h, --help            show usage help message and exit
-  -H, --full-help       show full help message and exit
-  -v, --verbose         produce more output about what the program does
-  -V, --version         show program's version number and exit
-
-Either argument -d <host> or -f <filename> must be given.
-

Program parameter notes

-

decode-config.py

-

Examples

-

The most of the examples are for linux command line. Under Windows call the program using python decode-config.py ....

-

Config file

-

Note: The example contains .ini style sections [...]. Sections are always treated as comment and serves as clarity only. -For further details of config file syntax see https://pypi.org/project/ConfigArgParse.

-

my.conf

-
[Source]
-username = admin
-password = myPaszxwo!z
-
-[JSON]
-json-indent 2
-

Using Tasmota binary configuration files

-
    -
  1. Restore a Tasmota configuration file

    -

    decode-config.py -c my.conf -d tasmota --restore-file Config_Tasmota_6.2.1.dmp

    -
  2. -
  3. Backup device using Tasmota configuration compatible format

    -

    a) use file extension to choice the file format

    -

    decode-config.py -c my.conf -d tasmota --backup-file Config_@f_@v.dmp

    -

    b) use args to choice the file format

    -

    decode-config.py -c my.conf -d tasmota --backup-type dmp --backup-file Config_@f_@v

    -
  4. -
-

Use batch processing

-
for device in tasmota1 tasmota2 tasmota3; do ./decode-config.py -c my.conf -d $device -o Config_@f_@v
-

or under windows

-
for device in (tasmota1 tasmota2 tasmota3) do python decode-config.py -c my.conf -d %device -o Config_@f_@v
-

will produce JSON configuration files for host tasmota1, tasmota2 and tasmota3 using friendly name and Tasmota firmware version for backup filenames.

-

Notes

-

Some general notes:

- diff --git a/tools/decode-config.md b/tools/decode-config.md index add80549a..4097638fa 100644 --- a/tools/decode-config.md +++ b/tools/decode-config.md @@ -55,14 +55,14 @@ pip install pycurl configargparse Install [Python 2.7](https://www.python.org/download/releases/2.7/) then install dependencies. For PyCurl you need to [download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl) for Windows 10 64bit. ``` -pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl configargparse +pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl // run the command from the folder where you downloaded the file pip install configargparse ``` * [Tasmota](https://github.com/arendst/Tasmota) [Firmware](https://github.com/arendst/Tasmota/releases) with Web-Server enabled: - * To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command [WebServer 2](https://github.com/arendst/Tasmota/wiki/Commands#wifi)). This is the Tasmota default. + * To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command [WebServer 2](https://tasmota.github.io/docs/#/Commands#wifi)). This is the Tasmota default. * If using your own compiled firmware be aware to enable the web-server (`#define USE_WEBSERVER` and `#define WEB_SERVER 2`). ## File Types @@ -213,7 +213,7 @@ The huge number of Tasmota configuration data can be overstrained and confusing, With _decode-config.py_ the following categories are available: `Display`, `Domoticz`, `Internal`, `KNX`, `Led`, `Logging`, `MCP230xx`, `MQTT`, `Main`, `Management`, `Pow`, `Sensor`, `Serial`, `SetOption`, `RF`, `System`, `Timers`, `Wifi` -These are similary to the categories on [https://github.com/arendst/Tasmota/wiki/Commands](Tasmota Command Wiki). +These are similary to the categories on [https://tasmota.github.io/docs/#/Commands](Tasmota Command Wiki). To filter outputs to a subset of groups use the `-g` or `--group` arg concatenating the grooup you want, e. g.