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.
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
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**
<li>This program is written in <ahref="https://en.wikipedia.org/wiki/Python_(programming_language">Python</a>) so you need to install a working python environment for your operating system.</li>
<p>Install <ahref="https://www.python.org/download/releases/2.7/">Python 2.7</a> then install dependencies. For PyCurl you need to <ahref="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>
<spanclass="hljs-comment">// run the command from the folder where you downloaded the file</span>
pip install configargparse
</code></pre><ul>
<li><ahref="https://github.com/arendst/Tasmota">Tasmota</a><ahref="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 <ahref="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>
<h2id="file-types">File Types</h2>
<p><em>decode-config.py</em> can handle the following backup file types:</p>
<h3id="-dmp-format">.dmp Format</h3>
<p>Configuration data as used by Tasmota "Backup/Restore Configuration" web interface.
This format is binary and encrypted.</p>
<h3id="-json-format">.json Format</h3>
<p>Configuration data in <ahref="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>
<h3id="-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 <ahref="https://github.com/arendst/Tasmota/blob/master/tasmota/settings.h">settings.h</a> in decrypted format.</p>
<h4id="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>
<h2id="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>
<h3id="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>
<p>To save the output as backup file use <code>--backup-file <filename></code>, you can use placeholder for Version, Friendlyname and Hostname:</p>
</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>
<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>
</code></pre><h3id="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>
<h4id="json-output">JSON output</h4>
<p>The default output format is <ahref="decode-config.md#-json-format">JSON</a>. You can force JSON output using the <code>--output-format json</code> parameter.</p>
<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>
</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>
<h3id="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 <ahref="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>
<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 <ahref="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>
</code></pre><h3id="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>
Backup/<spanclass="hljs-keyword">Restore</span> Tasmota configuration data. <spanclass="hljs-keyword">Args</span> that start with '--'
(eg. -f) can also be <spanclass="hljs-keyword">set</span><spanclass="hljs-keyword">in</span> a config <spanclass="hljs-keyword">file</span> (specified via -c). Config <spanclass="hljs-keyword">file</span>
<spanclass="hljs-keyword">syntax</span> allows: key=value, flag=true, stuff=[a,b,c] (<spanclass="hljs-keyword">for</span> details, see <spanclass="hljs-keyword">syntax</span> at
https:<spanclass="hljs-comment">//goo.gl/R74nmi). If an arg is specified in more than one place, then</span>
limit data processing to command groups (default <spanclass="hljs-keyword">no</span>
filter)
--ignore-warnings <spanclass="hljs-keyword">do</span> not <spanclass="hljs-keyword">exit</span><spanclass="hljs-keyword">on</span> warnings. Not recommended, used <spanclass="hljs-keyword">by</span> your
own responsibility!
Info:
Extra information
-<spanclass="hljs-keyword">h</span>, --<spanclass="hljs-keyword">help</span> show usage <spanclass="hljs-keyword">help</span> message and <spanclass="hljs-keyword">exit</span>
-<spanclass="hljs-keyword">H</span>, --full-<spanclass="hljs-keyword">help</span> show full <spanclass="hljs-keyword">help</span> message and <spanclass="hljs-keyword">exit</span>
-v, --verbose produce <spanclass="hljs-keyword">more</span> output <spanclass="hljs-keyword">about</span> what the <spanclass="hljs-keyword">program</span> does
-V, --<spanclass="hljs-keyword">version</span> show <spanclass="hljs-keyword">program</span>'s <spanclass="hljs-keyword">version</span> number and <spanclass="hljs-keyword">exit</span>
Either argument -<spanclass="hljs-keyword">d</span><host> or -f <filename> must be given.
</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>
<h2id="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>
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.
// 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.
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.