mirror of https://github.com/arendst/Tasmota.git
docs refactored and links to docs updated
This commit is contained in:
parent
2b7baece56
commit
02aba62c57
2
API.md
2
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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# 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.
|
||||
|
||||
|
|
78
MODULES.md
78
MODULES.md
|
@ -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
|
16
README.md
16
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.<br />
|
||||
See [Community](https://groups.google.com/d/forum/sonoffusers) for forum.<br />
|
||||
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)
|
||||
|
||||
|
|
|
@ -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).
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" style="margin:5px;float:right;height:76"></img>
|
||||
<img src="/tools/logo/TASMOTA_FullLogo_Vector.svg" alt="Logo" align="right" height="76"/>
|
||||
|
||||
# Support
|
||||
|
||||
|
|
|
@ -1,375 +0,0 @@
|
|||
<h1 id="decode-config-py">decode-config.py</h1>
|
||||
<p><em>decode-config.py</em> is able to backup and restore Tasmota configuration.</p>
|
||||
<p>In comparison with the Tasmota build-in "Backup/Restore Configuration" function <em>decode-config.py</em></p>
|
||||
<ul>
|
||||
<li>uses human readable and editable <a href="http://www.json.org/">JSON</a>-format for backup/restore,</li>
|
||||
<li>can restore previously backup and changed <a href="http://www.json.org/">JSON</a>-format files,</li>
|
||||
<li>is able to create Tasmota compatible command list with related config parameter</li>
|
||||
</ul>
|
||||
<p>Comparing backup files created by <em>decode-config.py</em> and *.dmp files created by Tasmota "Backup/Restore Configuration":</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th style="text-align:center">decode-config.py<br />*.json file</th>
|
||||
<th style="text-align:center">Tasmota<br />*.dmp file</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Encrypted</td>
|
||||
<td style="text-align:center">No</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Readable</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
<td style="text-align:center">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Simply editable</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
<td style="text-align:center">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Simply batch processing</td>
|
||||
<td style="text-align:center">Yes</td>
|
||||
<td style="text-align:center">No</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><em>decode-config.py</em> is compatible with Tasmota version from v5.10.0 up to now.</p>
|
||||
<h1 id="content">Content</h1>
|
||||
<ul>
|
||||
<li><a href="decode-config.md#prerequisite">Prerequisite</a></li>
|
||||
<li><a href="decode-config.md#file-types">File Types</a><ul>
|
||||
<li><a href="decode-config.md#-dmp-format">.dmp File Format</a></li>
|
||||
<li><a href="decode-config.md#-json-format">.json File Format</a></li>
|
||||
<li><a href="decode-config.md#-bin-format">.bin File Format</a><ul>
|
||||
<li><a href="decode-config.md#file-extensions">File extensions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="decode-config.md#usage">Usage</a><ul>
|
||||
<li><a href="decode-config.md#basics">Basics</a></li>
|
||||
<li><a href="decode-config.md#save-backup-file">Save backup file</a></li>
|
||||
<li><a href="decode-config.md#restore-backup-file">Restore backup file</a></li>
|
||||
<li><a href="decode-config.md#output-to-screen">Output to screen</a><ul>
|
||||
<li><a href="decode-config.md#json-output">JSON output</a></li>
|
||||
<li><a href="decode-config.md#tasmota-command-output">Tasmota command output</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="decode-config.md#filter-data">Filter data</a></li>
|
||||
<li><a href="decode-config.md#configuration-file">Configuration file</a></li>
|
||||
<li><a href="decode-config.md#more-program-arguments">More program arguments</a></li>
|
||||
<li><a href="decode-config.md#examples">Examples</a><ul>
|
||||
<li><a href="decode-config.md#config-file">Config file</a></li>
|
||||
<li><a href="decode-config.md#using-tasmota-binary-configuration-files">Using Tasmota binary configuration files</a></li>
|
||||
<li><a href="decode-config.md#use-batch-processing">Use batch processing</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="decode-config.md#notes">Notes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="prerequisite">Prerequisite</h2>
|
||||
<ul>
|
||||
<li>This program is written in <a href="https://en.wikipedia.org/wiki/Python_(programming_language">Python</a>) so you need to install a working python environment for your operating system.</li>
|
||||
</ul>
|
||||
<h3 id="linux">Linux</h3>
|
||||
<pre><code>sudo apt-<span class="hljs-built_in">get</span> install python python-pip libcurl4-openssl-<span class="hljs-built_in">dev</span> libssl-<span class="hljs-built_in">dev</span>
|
||||
</code></pre><pre><code>pip <span class="hljs-keyword">install</span> pycurl configargparse
|
||||
</code></pre><h3 id="windows-10">Windows 10</h3>
|
||||
<p>Install <a href="https://www.python.org/download/releases/2.7/">Python 2.7</a> then install dependencies. For PyCurl you need to <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl">download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl</a> for Windows 10 64bit.</p>
|
||||
<pre><code>pip install pycurl<span class="hljs-number">-7.43</span><span class="hljs-number">.0</span><span class="hljs-number">.3</span>-cp27-cp27m-win_amd64.whl configargparse
|
||||
<span class="hljs-comment">// run the command from the folder where you downloaded the file</span>
|
||||
|
||||
pip install configargparse
|
||||
</code></pre><ul>
|
||||
<li><a href="https://github.com/arendst/Tasmota">Tasmota</a> <a href="https://github.com/arendst/Tasmota/releases">Firmware</a> with Web-Server enabled:<ul>
|
||||
<li>To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command <a href="https://github.com/arendst/Tasmota/wiki/Commands#wifi">WebServer 2</a>). This is the Tasmota default.</li>
|
||||
<li>If using your own compiled firmware be aware to enable the web-server (<code>#define USE_WEBSERVER</code> and <code>#define WEB_SERVER 2</code>).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="file-types">File Types</h2>
|
||||
<p><em>decode-config.py</em> can handle the following backup file types:</p>
|
||||
<h3 id="-dmp-format">.dmp Format</h3>
|
||||
<p>Configuration data as used by Tasmota "Backup/Restore Configuration" web interface.
|
||||
This format is binary and encrypted.</p>
|
||||
<h3 id="-json-format">.json Format</h3>
|
||||
<p>Configuration data in <a href="http://www.json.org/">JSON</a>-format.
|
||||
This format is decrypted, human readable and editable and can also be used for the <code>--restore-file</code> parameter.
|
||||
This file will be created by <em>decode-config.py</em> using the <code>--backup-file</code> with <code>--backup-type json</code> parameter, this is the default.</p>
|
||||
<h3 id="-bin-format">.bin Format</h3>
|
||||
<p>Configuration data in binary format.
|
||||
This format is binary decryptet, editable (e.g. using a hex editor) and can also be used for <code>--restore-file</code> command.
|
||||
It will be created by <em>decode-config.py</em> using <code>--backup-file</code> with <code>--backup-type bin</code>.
|
||||
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 <strong>struct SYSCFG</strong> from Tasmota <a href="https://github.com/arendst/Tasmota/blob/master/tasmota/settings.h">settings.h</a> in decrypted format.</p>
|
||||
<h4 id="file-extensions">File extensions</h4>
|
||||
<p>You don't need to append exensions for your file name as <em>decode-config.py</em> uses auto extension as default. The extension will be choose based on file contents and <code>--backup-type</code> parameter.
|
||||
If you do not want using auto extensions use the <code>--no-extension</code> parameter.</p>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<p>After download don't forget to set the executable flag under linux with <code>chmod +x decode-config.py</code> or call the program using <code>python decode-config.py...</code>.</p>
|
||||
<h3 id="basics">Basics</h3>
|
||||
<p>At least pass a source where you want to read the configuration data from using <code>-f <filename></code> or <code>-d <host></code>:</p>
|
||||
<p>The source can be either</p>
|
||||
<ul>
|
||||
<li>a Tasmota device hostname or IP using the <code>-d <host></code> parameter</li>
|
||||
<li>a Tasmota <code>*.dmp</code> configuration file using <code>-f <filename></code> parameter</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<pre><code>decode-config<span class="hljs-selector-class">.py</span> -d tasmota-<span class="hljs-number">4281</span>
|
||||
</code></pre><p>will output a human readable configuration in <a href="http://www.json.org/">JSON</a>-format:</p>
|
||||
<pre><code>{
|
||||
<span class="hljs-string">"altitude"</span>: <span class="hljs-number">112</span>,
|
||||
<span class="hljs-string">"baudrate"</span>: <span class="hljs-number">115200</span>,
|
||||
<span class="hljs-string">"blinkcount"</span>: <span class="hljs-number">10</span>,
|
||||
<span class="hljs-string">"blinktime"</span>: <span class="hljs-number">10</span>,
|
||||
...
|
||||
<span class="hljs-string">"ws_width"</span>: [
|
||||
<span class="hljs-number">1</span>,
|
||||
<span class="hljs-number">3</span>,
|
||||
<span class="hljs-number">5</span>
|
||||
]
|
||||
}
|
||||
</code></pre><h3 id="save-backup-file">Save backup file</h3>
|
||||
<p>To save the output as backup file use <code>--backup-file <filename></code>, you can use placeholder for Version, Friendlyname and Hostname:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">--backup-file</span> <span class="hljs-selector-tag">Config_</span>@<span class="hljs-keyword">f_</span>@<span class="hljs-keyword">v</span>
|
||||
</code></pre><p>If you have setup a WebPassword within Tasmota, use</p>
|
||||
<pre><code>decode-config<span class="hljs-selector-class">.py</span> -d tasmota-<span class="hljs-number">4281</span> -<span class="hljs-selector-tag">p</span> <yourpassword> --backup-file Config_@f_@v
|
||||
</code></pre><p>will create a file like <code>Config_Tasmota_6.4.0.json</code> (the part <code>Tasmota</code> and <code>6.4.0</code> 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.</p>
|
||||
<h3 id="restore-backup-file">Restore backup file</h3>
|
||||
<p>Reading back a saved (and possible changed) backup file use the <code>--restore-file <filename></code> parameter. This will read the (changed) configuration data from this file and send it back to the source device or filename.</p>
|
||||
<p>To restore the previously save backup file <code>Config_Tasmota_6.2.1.json</code> to device <code>tasmota-4281</code> use:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">--restore-file</span> <span class="hljs-selector-tag">Config_Tasmota_6</span><span class="hljs-selector-class">.2</span><span class="hljs-selector-class">.1</span><span class="hljs-selector-class">.json</span>
|
||||
</code></pre><p>with password set by WebPassword:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">-p</span> <<span class="hljs-selector-tag">yourpassword</span>> <span class="hljs-selector-tag">--restore-file</span> <span class="hljs-selector-tag">Config_Tasmota_6</span><span class="hljs-selector-class">.2</span><span class="hljs-selector-class">.1</span><span class="hljs-selector-class">.json</span>
|
||||
</code></pre><h3 id="output-to-screen">Output to screen</h3>
|
||||
<p>To force screen output use the <code>--output</code> parameter.</p>
|
||||
<p>Output to screen is default enabled when calling the program with a source parameter (-f or -d) but without any backup or restore parameter.</p>
|
||||
<h4 id="json-output">JSON output</h4>
|
||||
<p>The default output format is <a href="decode-config.md#-json-format">JSON</a>. You can force JSON output using the <code>--output-format json</code> parameter.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>decode-config.py -d tasmota<span class="hljs-number">-4281</span> -c my.conf -x <span class="hljs-symbol">Wifi</span> --output-format json
|
||||
|
||||
{
|
||||
...
|
||||
<span class="hljs-string">"hostname"</span>: <span class="hljs-string">"%s-%04d"</span>,
|
||||
<span class="hljs-string">"ip_address"</span>: [
|
||||
<span class="hljs-string">"0.0.0.0"</span>,
|
||||
<span class="hljs-string">"192.168.12.1"</span>,
|
||||
<span class="hljs-string">"255.255.255.0"</span>,
|
||||
<span class="hljs-string">"192.168.12.1"</span>
|
||||
],
|
||||
<span class="hljs-string">"ntp_server"</span>: [
|
||||
<span class="hljs-string">"ntp.localnet.home"</span>,
|
||||
<span class="hljs-string">"ntp2.localnet.home"</span>,
|
||||
<span class="hljs-string">"192.168.12.1"</span>
|
||||
],
|
||||
<span class="hljs-string">"sta_active"</span>: <span class="hljs-number">0</span>,
|
||||
<span class="hljs-string">"sta_config"</span>: <span class="hljs-number">5</span>,
|
||||
<span class="hljs-string">"sta_pwd"</span>: [
|
||||
<span class="hljs-string">"myWlAnPaszxwo!z"</span>,
|
||||
<span class="hljs-string">"myWlAnPaszxwo!z2"</span>
|
||||
],
|
||||
<span class="hljs-string">"sta_ssid"</span>: [
|
||||
<span class="hljs-string">"wlan.1"</span>,
|
||||
<span class="hljs-string">"my-wlan"</span>
|
||||
],
|
||||
<span class="hljs-string">"web_password"</span>: <span class="hljs-string">"myPaszxwo!z"</span>,
|
||||
<span class="hljs-string">"webserver"</span>: <span class="hljs-number">2</span>
|
||||
...
|
||||
}
|
||||
</code></pre><p>Note: JSON output always contains all configuration data like the backup file except you are using <code>--group</code> arg.</p>
|
||||
<h4 id="tasmota-command-output">Tasmota command output</h4>
|
||||
<p><em>decode-config.py</em> is able to translate the configuration data to (most all) Tasmota commands. To output your configuration as Tasmota commands use <code>--output-format cmnd</code> or <code>--output-format command</code>.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">-c</span> <span class="hljs-selector-tag">my</span><span class="hljs-selector-class">.conf</span> <span class="hljs-selector-tag">-g</span> <span class="hljs-selector-tag">Wifi</span> <span class="hljs-selector-tag">--output-format</span> <span class="hljs-selector-tag">cmnd</span>
|
||||
|
||||
# <span class="hljs-selector-tag">Wifi</span>:
|
||||
<span class="hljs-selector-tag">AP</span> 0
|
||||
<span class="hljs-selector-tag">Hostname</span> %<span class="hljs-selector-tag">s-</span>%04<span class="hljs-selector-tag">d</span>
|
||||
<span class="hljs-selector-tag">IPAddress1</span> 0<span class="hljs-selector-class">.0</span><span class="hljs-selector-class">.0</span><span class="hljs-selector-class">.0</span>
|
||||
<span class="hljs-selector-tag">IPAddress2</span> 192<span class="hljs-selector-class">.168</span><span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">IPAddress3</span> 255<span class="hljs-selector-class">.255</span><span class="hljs-selector-class">.255</span><span class="hljs-selector-class">.0</span>
|
||||
<span class="hljs-selector-tag">IPAddress4</span> 192<span class="hljs-selector-class">.168</span><span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">NtpServer1</span> <span class="hljs-selector-tag">ntp</span><span class="hljs-selector-class">.localnet</span><span class="hljs-selector-class">.home</span>
|
||||
<span class="hljs-selector-tag">NtpServer2</span> <span class="hljs-selector-tag">ntp2</span><span class="hljs-selector-class">.localnet</span><span class="hljs-selector-class">.home</span>
|
||||
<span class="hljs-selector-tag">NtpServer3</span> 192<span class="hljs-selector-class">.168</span><span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">Password1</span> <span class="hljs-selector-tag">myWlAnPaszxwo</span>!<span class="hljs-selector-tag">z</span>
|
||||
<span class="hljs-selector-tag">Password2</span> <span class="hljs-selector-tag">myWlAnPaszxwo</span>!<span class="hljs-selector-tag">z2</span>
|
||||
<span class="hljs-selector-tag">SSId1</span> <span class="hljs-selector-tag">wlan</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">SSId2</span> <span class="hljs-selector-tag">wlan</span><span class="hljs-selector-class">.1</span>
|
||||
<span class="hljs-selector-tag">WebPassword</span> <span class="hljs-selector-tag">myPaszxwo</span>!<span class="hljs-selector-tag">z</span>
|
||||
<span class="hljs-selector-tag">WebServer</span> 2
|
||||
<span class="hljs-selector-tag">WifiConfig</span> 5
|
||||
</code></pre><p>Note: A few very specific module commands like MPC230xx, KNX and some Display commands are not supported. These are still available by JSON output.</p>
|
||||
<h3 id="filter-data">Filter data</h3>
|
||||
<p>The huge number of Tasmota configuration data can be overstrained and confusing, so the most of the configuration data are grouped into categories.</p>
|
||||
<p>With <em>decode-config.py</em> the following categories are available: <code>Display</code>, <code>Domoticz</code>, <code>Internal</code>, <code>KNX</code>, <code>Led</code>, <code>Logging</code>, <code>MCP230xx</code>, <code>MQTT</code>, <code>Main</code>, <code>Management</code>, <code>Pow</code>, <code>Sensor</code>, <code>Serial</code>, <code>SetOption</code>, <code>RF</code>, <code>System</code>, <code>Timers</code>, <code>Wifi</code></p>
|
||||
<p>These are similary to the categories on <a href="Tasmota Command Wiki">https://github.com/arendst/Tasmota/wiki/Commands</a>.</p>
|
||||
<p>To filter outputs to a subset of groups use the <code>-g</code> or <code>--group</code> arg concatenating the grooup you want, e. g.</p>
|
||||
<pre><code>decode-config<span class="hljs-selector-class">.py</span> -d tasmota-<span class="hljs-number">4281</span> -c my<span class="hljs-selector-class">.conf</span> --output-format cmnd --group Main MQTT Management Wifi
|
||||
</code></pre><h3 id="configuration-file">Configuration file</h3>
|
||||
<p>Each argument that start with <code>--</code> (eg. <code>--file</code>) 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 <a href="https://pypi.org/project/ConfigArgParse/">https://pypi.org/project/ConfigArgParse</a>).</p>
|
||||
<p>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.</p>
|
||||
<p>The http authentication credentials <code>--username</code> and <code>--password</code> is predestinated to store it in a file instead using it on your command line as argument:</p>
|
||||
<p>e.g. my.conf:</p>
|
||||
<pre><code><span class="hljs-section">[source]</span>
|
||||
<span class="hljs-attr">username</span> = admin
|
||||
<span class="hljs-attr">password</span> = myPaszxwo!z
|
||||
</code></pre><p>To make a backup file from example above you can now pass the config file instead using the password on command line:</p>
|
||||
<pre><code><span class="hljs-selector-tag">decode-config</span><span class="hljs-selector-class">.py</span> <span class="hljs-selector-tag">-d</span> <span class="hljs-selector-tag">tasmota-4281</span> <span class="hljs-selector-tag">-c</span> <span class="hljs-selector-tag">my</span><span class="hljs-selector-class">.conf</span> <span class="hljs-selector-tag">--backup-file</span> <span class="hljs-selector-tag">Config_</span>@<span class="hljs-keyword">f_</span>@<span class="hljs-keyword">v</span>
|
||||
</code></pre><h3 id="more-program-arguments">More program arguments</h3>
|
||||
<p>For better reading each short written arg (minus sign <code>-</code>) has a corresponding long version (two minus signs <code>--</code>), eg. <code>--device</code> for <code>-d</code> or <code>--file</code> for <code>-f</code> (note: not even all <code>--</code> arg has a corresponding <code>-</code> one).</p>
|
||||
<p>A short list of possible program args is displayed using <code>-h</code> or <code>--help</code>.</p>
|
||||
<p>For advanced help use <code>-H</code> or <code>--full-help</code>:</p>
|
||||
<pre><code>usage: <span class="hljs-keyword">decode</span>-config.py [-f <filename>] [-<span class="hljs-keyword">d</span> <host>] [-P <port>]
|
||||
[-<span class="hljs-keyword">u</span> <username>] [-p <password>] [-i <filename>]
|
||||
[-o <filename>] [-t json|bin|dmp] [-<span class="hljs-keyword">E</span>] [-<span class="hljs-keyword">e</span>] [-F]
|
||||
[--json-indent <indent>] [--json-compact]
|
||||
[--json-hide-pw] [--json-show-pw]
|
||||
[--cmnd-indent <indent>] [--cmnd-groups]
|
||||
[--cmnd-nogroups] [--cmnd-<span class="hljs-keyword">sort</span>] [--cmnd-unsort]
|
||||
[-c <filename>] [-S] [-T json|cmnd|command]
|
||||
[-<span class="hljs-keyword">g</span> {Control,Devices,<span class="hljs-keyword">Display</span>,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,<span class="hljs-keyword">Timer</span>,Wifi} [{Control,Devices,<span class="hljs-keyword">Display</span>,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,<span class="hljs-keyword">Timer</span>,Wifi} ...]]
|
||||
[--ignore-warnings] [-<span class="hljs-keyword">h</span>] [-<span class="hljs-keyword">H</span>] [-v] [-V]
|
||||
|
||||
Backup/<span class="hljs-keyword">Restore</span> Tasmota configuration data. <span class="hljs-keyword">Args</span> that start with '--'
|
||||
(eg. -f) can also be <span class="hljs-keyword">set</span> <span class="hljs-keyword">in</span> a config <span class="hljs-keyword">file</span> (specified via -c). Config <span class="hljs-keyword">file</span>
|
||||
<span class="hljs-keyword">syntax</span> allows: key=value, flag=true, stuff=[a,b,c] (<span class="hljs-keyword">for</span> details, see <span class="hljs-keyword">syntax</span> at
|
||||
https:<span class="hljs-comment">//goo.gl/R74nmi). If an arg is specified in more than one place, then</span>
|
||||
commandline values override config <span class="hljs-keyword">file</span> values <span class="hljs-keyword">which</span> override defaults.
|
||||
|
||||
Source:
|
||||
<span class="hljs-keyword">Read</span>/Write Tasmota configuration from/to
|
||||
|
||||
-f, --<span class="hljs-keyword">file</span>, --tasmota-<span class="hljs-keyword">file</span> <filename>
|
||||
<span class="hljs-keyword">file</span> to retrieve/write Tasmota configuration from/to
|
||||
(default: None)'
|
||||
-<span class="hljs-keyword">d</span>, --device, --host <host>
|
||||
hostname or IP address to retrieve/send Tasmota
|
||||
configuration from/to (default: None)
|
||||
-P, --port <port> TCP/IP port number to <span class="hljs-keyword">use</span> <span class="hljs-keyword">for</span> the host connection
|
||||
(default: 80)
|
||||
-<span class="hljs-keyword">u</span>, --username <username>
|
||||
host HTTP access username (default: admin)
|
||||
-p, --password <password>
|
||||
host HTTP access password (default: None)
|
||||
|
||||
Backup/<span class="hljs-keyword">Restore</span>:
|
||||
Backup & <span class="hljs-keyword">restore</span> specification
|
||||
|
||||
-i, --<span class="hljs-keyword">restore</span>-<span class="hljs-keyword">file</span> <filename>
|
||||
<span class="hljs-keyword">file</span> to <span class="hljs-keyword">restore</span> configuration from (default: None).
|
||||
Replacements: @v=firmware <span class="hljs-keyword">version</span> from config,
|
||||
@f=device friendly name from config, @<span class="hljs-keyword">h</span>=device
|
||||
hostname from config, @<span class="hljs-keyword">H</span>=device hostname from device
|
||||
(-<span class="hljs-keyword">d</span> arg only)
|
||||
-o, --backup-<span class="hljs-keyword">file</span> <filename>
|
||||
<span class="hljs-keyword">file</span> to backup configuration to (default: None).
|
||||
Replacements: @v=firmware <span class="hljs-keyword">version</span> from config,
|
||||
@f=device friendly name from config, @<span class="hljs-keyword">h</span>=device
|
||||
hostname from config, @<span class="hljs-keyword">H</span>=device hostname from device
|
||||
(-<span class="hljs-keyword">d</span> arg only)
|
||||
-t, --backup-<span class="hljs-keyword">type</span> json|bin|dmp
|
||||
backup filetype (default: 'json')
|
||||
-<span class="hljs-keyword">E</span>, --extension <span class="hljs-keyword">append</span> filetype extension <span class="hljs-keyword">for</span> -i and -o filename
|
||||
(default)
|
||||
-<span class="hljs-keyword">e</span>, --<span class="hljs-keyword">no</span>-extension <span class="hljs-keyword">do</span> not <span class="hljs-keyword">append</span> filetype extension, <span class="hljs-keyword">use</span> -i and -o
|
||||
filename <span class="hljs-keyword">as</span> passed
|
||||
-F, --force-<span class="hljs-keyword">restore</span> force <span class="hljs-keyword">restore</span> even configuration is identical
|
||||
|
||||
JSON output:
|
||||
JSON <span class="hljs-keyword">format</span> specification
|
||||
|
||||
--json-indent <indent>
|
||||
pretty-printed JSON output using indent level
|
||||
(default: 'None'). -1 disables indent.
|
||||
--json-compact compact JSON output <span class="hljs-keyword">by</span> eliminate whitespace
|
||||
--json-hide-pw hide passwords
|
||||
--json-show-pw, --json-unhide-pw
|
||||
unhide passwords (default)
|
||||
|
||||
Tasmota command output:
|
||||
Tasmota command output <span class="hljs-keyword">format</span> 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-<span class="hljs-keyword">sort</span> <span class="hljs-keyword">sort</span> Tasmota commands (default)
|
||||
--cmnd-unsort leave Tasmota commands unsorted
|
||||
|
||||
Common:
|
||||
Optional arguments
|
||||
|
||||
-c, --config <filename>
|
||||
<span class="hljs-keyword">program</span> config <span class="hljs-keyword">file</span> - can be used to <span class="hljs-keyword">set</span> default
|
||||
command <span class="hljs-keyword">args</span> (default: None)
|
||||
-S, --output <span class="hljs-keyword">display</span> output regardsless of backup/<span class="hljs-keyword">restore</span> usage
|
||||
(default <span class="hljs-keyword">do</span> not output <span class="hljs-keyword">on</span> backup or <span class="hljs-keyword">restore</span> usage)
|
||||
-T, --output-<span class="hljs-keyword">format</span> json|cmnd|command
|
||||
<span class="hljs-keyword">display</span> output <span class="hljs-keyword">format</span> (default: 'json')
|
||||
-<span class="hljs-keyword">g</span>, --group {Control,Devices,<span class="hljs-keyword">Display</span>,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,<span class="hljs-keyword">Timer</span>,Wifi}
|
||||
limit data processing to command groups (default <span class="hljs-keyword">no</span>
|
||||
filter)
|
||||
--ignore-warnings <span class="hljs-keyword">do</span> not <span class="hljs-keyword">exit</span> <span class="hljs-keyword">on</span> warnings. Not recommended, used <span class="hljs-keyword">by</span> your
|
||||
own responsibility!
|
||||
|
||||
Info:
|
||||
Extra information
|
||||
|
||||
-<span class="hljs-keyword">h</span>, --<span class="hljs-keyword">help</span> show usage <span class="hljs-keyword">help</span> message and <span class="hljs-keyword">exit</span>
|
||||
-<span class="hljs-keyword">H</span>, --full-<span class="hljs-keyword">help</span> show full <span class="hljs-keyword">help</span> message and <span class="hljs-keyword">exit</span>
|
||||
-v, --verbose produce <span class="hljs-keyword">more</span> output <span class="hljs-keyword">about</span> what the <span class="hljs-keyword">program</span> does
|
||||
-V, --<span class="hljs-keyword">version</span> show <span class="hljs-keyword">program</span>'s <span class="hljs-keyword">version</span> number and <span class="hljs-keyword">exit</span>
|
||||
|
||||
Either argument -<span class="hljs-keyword">d</span> <host> or -f <filename> must be given.
|
||||
</code></pre><h3 id="program-parameter-notes">Program parameter notes</h3>
|
||||
<p><em>decode-config.py</em></p>
|
||||
<h3 id="examples">Examples</h3>
|
||||
<p>The most of the examples are for linux command line. Under Windows call the program using <code>python decode-config.py ...</code>.</p>
|
||||
<h4 id="config-file">Config file</h4>
|
||||
<p>Note: The example contains .ini style sections <code>[...]</code>. Sections are always treated as comment and serves as clarity only.
|
||||
For further details of config file syntax see <a href="https://pypi.org/project/ConfigArgParse/">https://pypi.org/project/ConfigArgParse</a>.</p>
|
||||
<p><em>my.conf</em></p>
|
||||
<pre><code><span class="hljs-string">[Source]</span>
|
||||
username = admin
|
||||
password = myPaszxwo!z
|
||||
|
||||
<span class="hljs-string">[JSON]</span>
|
||||
json-indent <span class="hljs-number">2</span>
|
||||
</code></pre><h4 id="using-tasmota-binary-configuration-files">Using Tasmota binary configuration files</h4>
|
||||
<ol>
|
||||
<li><p>Restore a Tasmota configuration file</p>
|
||||
<p> <code>decode-config.py -c my.conf -d tasmota --restore-file Config_Tasmota_6.2.1.dmp</code></p>
|
||||
</li>
|
||||
<li><p>Backup device using Tasmota configuration compatible format</p>
|
||||
<p>a) use file extension to choice the file format</p>
|
||||
<p> <code>decode-config.py -c my.conf -d tasmota --backup-file Config_@f_@v.dmp</code></p>
|
||||
<p>b) use args to choice the file format</p>
|
||||
<p> <code>decode-config.py -c my.conf -d tasmota --backup-type dmp --backup-file Config_@f_@v</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
<h4 id="use-batch-processing">Use batch processing</h4>
|
||||
<pre><code><span class="hljs-keyword">for</span> device <span class="hljs-keyword">in</span> tasmota1 tasmota2 tasmota3; <span class="hljs-keyword">do</span> ./decode-config.py -c my.conf -d <span class="hljs-variable">$device</span> -o Config<span class="hljs-number">_</span><span class="hljs-variable">@f_</span><span class="hljs-variable">@v</span>
|
||||
</code></pre><p>or under windows</p>
|
||||
<pre><code><span class="hljs-keyword">for</span> device <span class="hljs-keyword">in</span> (tasmota1 tasmota2 tasmota3) <span class="hljs-keyword">do</span> <span class="hljs-keyword">python</span> decode-config.py -c my.conf -d %device -o Config_@f_@v
|
||||
</code></pre><p>will produce JSON configuration files for host tasmota1, tasmota2 and tasmota3 using friendly name and Tasmota firmware version for backup filenames.</p>
|
||||
<h2 id="notes">Notes</h2>
|
||||
<p>Some general notes:</p>
|
||||
<ul>
|
||||
<li>Filename replacement macros <strong>@h</strong> and <strong>@H</strong>:<ul>
|
||||
<li><strong>@h</strong>
|
||||
The <strong>@h</strong> replacement macro uses the hostname configured with the Tasomta Wifi <code>Hostname <host></code> command (defaults to <code>%s-%04d</code>). It will not use the network hostname of your device because this is not available when working with files only (e.g. <code>--file <filename></code> as source).
|
||||
To prevent having a useless % in your filename, <strong>@h</strong> will not replaced by configuration data hostname if this contains '%' characters.</li>
|
||||
<li><strong>@H</strong>
|
||||
If you want to use the network hostname within your filename, use the <strong>@H</strong> replacement macro instead - but be aware this will only replaced if you are using a network device as source (<code>-d</code>, <code>--device</code>, <code>--host</code>); it will not work when using a file as source (<code>-f</code>, <code>--file</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue