Package: decode-config
decode-configConvert, backup and restore configuration data of devices flashed withTasmota firmware.If you likedecode-configgive it a star or fork it and contribute:In comparison with theTasmotabuild-in "Backup Configuration" / "Restore Configuration" function thedecode-configtool:uses a human readable and editableJSON-format for backup/restorecan restore previously backed up and modified JSON-format filesis able to process any subsets of configuration datacan convert data from older Tasmota versions (from version v5.10.0) to a newer one and vice versais able to create Tasmota compatible command list for the most available commandsComparing backup files created bydecode-configand.dmpfiles created by Tasmota "Backup Configuration" / "Restore Configuration":Configurationdecode-config JSON fileTasmota *.dmp fileencryptedNoYesreadableYesNoeditableYesNobatch processingYesNoBackup/Restore subsetsYesNodecode-configis compatible with allTasmotaversions, starting from Tasmota v5.10.0 up to the current one.DevelopmentUsing the latest development version of decode-config is only necessary if you also use the latest development version of Tasmota.Table of contentsContentsDevelopmentTable of contentsRunning the programInstallationUsageBasicsTasmota sourceFormat JSON outputParameter fileSave backupRestore backupAuto file extensionsTest your parameterConsole outputsFilter by groupsUsage examplesUsing Tasmota binary configuration filesUsing JSON editable fileUse batch processingFile Formats.dmp format.json format.bin formatProgram parameter--full-helpParameter notesObsolete parametersGenerated Tasmota commandsProgram return codesRunning the programTo usedecode-config.pyyou can install it using Python environment and following theInstallationsection below.Alternatively you can download a ready-made binary fromReleasesto use it without installing Python.Installationdecode-config.pyneeds an installedPythonenvironment - (seePrerequisite).After you have installed your Python environment, there are two ways to install deocde-config:Installation using PyPipipinstalldecode-configThe program does not have a graphical user interface (GUI), you have to run it from your OS command line usingprogram arguments- seeUsagefor more details.Manual installationThis is only necessary if you want to rundecode-config.pyfromdevelopment branch. First install the required modules manuallypython-mpipinstall-rrequirements.txtAfter that you can use the Phython scriptdecode-config.pyas normal program:decode-config.pyPrerequisiteSincedecode-config.pyis a Python program, it requires an installedPythonenvironment.LinuxInstallPython 3.xand Pip:sudoapt-getinstallpython3python3-pipWindowsInstallPython 3.xas describedMacOSInstallPython 3.xas describedUsageFor an overview start the program without any parameter and you will get a short help:decode-config.pyThis prints a short help:usage: decode-config.py [-s <filename|host|url>] [-p <password>]
                        [--fulltopic <topic>] [--cafile <file>]
                        [--certfile <file>] [--keyfile <file>] [--insecure]
                        [--keepalive <sec>] [-i <restorefile>]
                        [-o <backupfile>] [-t json|bin|dmp] [-E] [-e] [-F]
                        [--json-indent <indent>] [--json-compact]
                        [--json-show-pw] [--cmnd-indent <indent>]
                        [--cmnd-groups] [--cmnd-sort]
                        [--cmnd-use-rule-concat] [--cmnd-use-backlog]
                        [-c <configfile>] [-S] [-T json|cmnd|command]
                        [-g <groupname> [<groupname> ...]] [-w] [--dry-run]
                        [-h] [-H] [-v] [-V]For advanced help rundecode-configwith parameter--full--helpor-H. This will print aProgram parameter.NoteIf you're missing older parameters, don't worry, they're still there (seeObsolete parameters).BasicsTo get a program result, pass at least aTasmota sourcefrom which you want to read the configuration data.Tasmota sourceThe Tasmota source determines where the configuration data should be loaded from and saved to.
A source can be an offline file or an online Tasmota device accessed via HTTP or indirectly via MQTT.Use--sourceparameter to determine the configuration data source:Binary (*.dmp) file (Offline)Source is a Tasmota configuration file (having extension.dmp).Pass the filename direclty or encoded as afile-URL:decode-config--sourcetasmota-4281.dmp
decode-config-sfile://path/to/tasmota-4281.dmpHTTP connection (Online)Source is an online HTTP connection to a running Tasmota device. To use this source,decode-configmust have access to the network on which Tasmota is running,Tasmota Webserverrunning in admin mode (WebServer 2) is mandatory.Specify the hostname, IP o orhttp-urlof the Tasmota device.An optionally required HTTP password, username and different HTTP port of the device can be specified viaURLor separately via--username,--passwordand--portdecode-config--sourcetasmota-4281
decode-config-s192.168.10.92
decode-config--sourcehttp://tasmota-4281--passwordmyPaszxwo!z
decode-config--sourcehttp://admin:myPaszxwo!z@tasmota-4281:8000
decode-config--sourcehttp://admin:myPaszxwo!z@tasmota-4281/cs?An appended HTTP path (here "/cs?") is ignored.MQTT transission (Online)Source is a MQTT server and topic where an online Tasmota device is connected to. To use this source,decode-configdoes not need to have access to the same network that Tasmota is running on, it just needs access to the MQTT server that Tasmota also uses.MQTT connection parameterSpecify the hostname or IP of the MQTT server (possibly also specify username and password for the MQTT server) and the Tasmota MQTT topic. Thedecode-configconnection to MQTT server also allows SSL/TLS connection.The MQTT username and password must be encoded within the URL (the parameter--passwordcan not be used for that, it has a different function here).If the username/password combination for thedecode-configMQTT connection is different from the one used by Tasmota itself (Tasmota commandMQTTPassword), the Tasmota MQTT password must be specified via the--passwordparameter.The Tasmota topic can be specfied either within theURL pathcomponent or using optional--fulltopicparameter.The topic must be the full topic of the Tasmota device without any trailing command or result part. You can use any of the prefixed topic (cmnd,statorteletopic) or use the placeholder%prefix%for it, example%prefix%/tasmota-4281ortele/tasmota-4281are valid topicscmnd/tasmota-4281/POWERortele/tasmota-4281/STATEare invalid topics due to the trailing part.For SSL/TLS connection to MQTT server usemqtts://URL scheme.decode-config--sourcemqtts://mybroker.example.com/%prefx%/tasmota-4281
decode-config--sourcemqtts://mybroker.example.com:8883/tele/tasmota-4281
decode-config--sourcemqtts://mqttuser:myBrokerPaszxwo!z@mybroker.example.com--fulltopictele/tasmota-4281
decode-config--sourcemqtts://mqttuser:myBrokerPaszxwo!z@mybroker.example.com/tele/tasmota-4281--passwordmyTasmotaMQTTPaszxwo!zFor own certifications use the parameters--cafile,--certfileand--keyfile. To suppress certification verification use--insecure.For none SSL/TLS connection to MQTT server usemqtt://URL scheme.decode-config--sourcemqtt://mybroker.example.com/%prefx%/tasmota-4281
decode-config--sourcemqtt://mybroker.example.com:1883/tele/tasmota-4281
decode-config--sourcemqtt://mqttuser:myBrokerPaszxwo!z@mybroker.example.com--fulltopictele/tasmota-4281
decode-config--sourcemqtt://mqttuser:myBrokerPaszxwo!z@mybroker.example.com/tele/tasmota-4281--passwordmyTasmotaMQTTPaszxwo!zFormat JSON outputAll basic examples above will output a readable configuration inJSON-format, e.g.:{"altitude":112,"baudrate":115200,"blinkcount":10,"blinktime":10,..."ws_width":[1,3,5]}NoteThe json names (like"altitude"or"blinktime"are internal names from Tasmotassettings.hSTRUCTSettingsand are not the same as known from Tasmotaweb-console commands. However, since most variable names are self-describing, the functional meaning should be given in most cases.The default JSON output can be formatted for better reading using the--json-indent <n>parameter:decode-config--sourcetasmota-4281--password"myPaszxwo!z"--json-indent2This will print a pretty better readable format and the example above becomes:{"altitude":112,"baudrate":115200,"blinkcount":10,"blinktime":10,..."ws_width":[1,3,5]}Parameter fileBecause the number of parameters are growing, it would be difficult to enter all these parameters again and again. In that case it is best to use a configuration file that contains your standard parameters and which we then have to specify as the only additional parameter.Program parameterstarting with--(eg.--username) can be set into such a configuration file. Simply write each neccessary parameter including possible value without dashes into a text file. For a better identification of this file, extension.confis recommended:Writing all the previous used device parameter in a file, create the text filemy.confand insert:[source]
username = admin
password = myPaszxwo!z

[JSON]
json-indent 2HintGroup names enclosed in square brackets [ ], like[source]in the example, are optional and ignored - you can use them to increase readability.Now we can use it with-cparameter:decode-config-cmy.conf-stasmota-4281NoteFor further of parameter file syntax seehttps://pypi.org/project/ConfigArgParse).If parameters are specified in more than one place (parameter file and command line), the commandline parameters will overrule the file parameters. This is usefull if you use a basic set of parameters and want to change parameter once without the need to edit your configuration file:decode-config-cmy.conf-stasmota-4281--json-indent4Here JSON will be output with indent of 4 spaces instead of the2set frommy.conf-Save backupTo save data from a device or*.dmpfile into a backup file, use--backup-file <filename>.Backup filename macrosYou can use the following placeholders within filenames:@vis replaced byTasmota Version(backup & restore filenames)@dis replaced byDevicename(backup & restore filenames)@fis replaced by firstFriendlyname1(backup & restore filenames)@his replaced by theHostnamefrom configuration data (backup & restore filenames)Note: This is the static hostname which is configured by the commandHostname, for real hostname from a device use macro the@H)@His replaced by the live device hostname  (only for http sources, backup & restore filenames)Note: This can be different to the configured hostname as this can contain also macros).source@Fis replaced by the filename of MQTT request (only for MQTT sources, backup filenames only).This is usually the filename that Tasmota uses when saving the configuration in the WebUI.Example:decode-config-cmy.conf-stasmota-4281--backup-fileConfig_@d_@vThis will create a file likeConfig_Tasmota_13.4.json(the partTasmotaand13.4will choosen related to your device configuration).Save multiple backup at onceThe--backup-fileparameter can be specified multiple times to create different backup with different names and/or different formats at once:decode-config-cmy.conf-stasmota-4281-oConfig_@d_@v-oBackup_@H.json-oBackup_@H.dmpcreates three backup files:Config_Tasmota_13.4.jsonusing JSON formatBackup_tasmota-4281.jsonusing JSON formatBackup_tasmota-4281.dmpusing Tasmota configuration file formatRestore backupReading back a previously saved backup file, use the--restore-file <filename>parameter.To restore the previously save backup fileConfig_Tasmota_13.4.jsonto devicetasmota-4281use:decode-config-cmy.conf-stasmota-4281--restore-fileConfig_Tasmota_13.4Restore operation also allows placeholders@v,@d,@f,@hor@Hlike in backup filenames so we can use the same naming as for the backup process:decode-config-cmy.conf-stasmota-4281--restore-fileConfig_@d_@vNotePlaceholders used in restore filenames only work as long as the underlying data of the device has not changed between backup and restore, sincedecode-configfirst read them from the config file or the device to replace it.Restore subset of dataIf you use the default JSON format for backup files you can also use files containing a subset of configuration data only.Example: You want to change the data for location (altitude, latitude, longitude) only, create a JSON filelocation.jsonwith the content{"altitude":0,"latitude":48.85836,"longitude":2.294442}Set this location for a device:decode-config-cmy.conf-stasmota-4281-ilocationHintKeep the JSON-format valid e.g. when cutting unnecessary content from a given JSON backup file, consider to remove the last comma on same indent level:Invalid JSON (useless comma in line 3:...2.294442,):{
"latitude": 48.85836,
"longitude": 2.294442,
}valid JSON:{
"latitude": 48.85836,
"longitude": 2.294442
}Using subsets of data JSON files are powerfull possibilitiy to create various personal standard configuration files that are identical for all your Tasmota devices and that you can then reuse for newly configure Tasmotas.Auto file extensionsFile extensions are selected based on the file content and / or the--backup-typeparameter. You don't need to add extensions to your file:If you omit the file extensions, one of.dmp,.binor.jsonis used depending on the selected backup typeIf you omit the--backup-typeparameter and the selected file name has one of the standard extensions.dmp,.binor.json, the backup type is set based on the extension.If you use your own extensions, deactivate the automatic extension using the--no-extensionparameter and use the optional--backup-typeparameter if neccessary.Examples:decode-config --source tasmota-4281 --backup-file tasmota-4281.binis identical withdecode-config --source tasmota-4281 --backup-type bin --backup-file tasmota-4281In both cases the backup filetasmota-4281.binis created.decode-config --source tasmota-4281 --restore-file tasmota-4281.jsonis identical withdecode-config --source tasmota-4281 --restore-file tasmota-4281In both cases the backup filetasmota-4281.jsonwill tried to restore (remember--backup-type jsonis the default)whereasdecode-config --source tasmota-4281 --no-extension --restore-file tasmota-4281will fail iftasmota-4281does not exist anddecode-config --source tasmota-4281 --no-extension --backup-file tasmota-4281will create a json backup file namedtasmota-4281(without the extension).Test your parameterTo test your parameter append--dry-run:decode-config-stasmota-4281-ibackupfile--dry-runThis runs the complete process but prevent writing any changes to a device or file.Console outputsOutput to the console screen is the default when calling the program without any backup or restore parameter.Screen output is suppressed when using backup or restore parameter. In that case you can force screen output with--output.The console screen output supports two formats:JSON:This is identical with the backup/restorejson file Formatbut printed on screen standard output.Tasmota command:This outputs the most (but not all!) configuration data as Tasmotaweb-console commands.JSON formatThe default console output format isJSON(optional you can force JSON backup format using--output-format json).Example:decode-config-cmy.conf-stasmota-4281--groupWifiwill output data like{..."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...}This also allows direct processing on the command line, e.g. to display allntp_serveronlydecode-config-cmy.conf-stasmota-4281|jq'.ntp_server'outputs["ntp.localnet.home","ntp2.localnet.home","192.168.12.1"]HintJSON output contains all configuration data as default. Tofilterthe JSON output by functional groups, use the-gor--groupparameter.Tasmota web command formatdecode-configis able to translate the configuration data to (most all) Tasmota web commands. To output your configuration as Tasmota commands use--output-format command(or the short form-T cmnd).Example:decode-config-cmy.conf-stasmota-4281--groupWifi--output-formatcmnd# 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 my-wlan
  WebPassword myPaszxwo!z
  WebServer 2
  WifiConfig 5NoteA very few specific commands areunsupported. These are commands from device-specific groups which are very dependent on the Tasmota program code whose implementation is very complex to keep in sync on Tasmota code changes - see alsoGenerated Tasmota commands.Use of 'Backlog' for Tasmota commandsBecause individual Tasmota commands such asSetOption,WebColoretc. are often repeat themselves and might want to be used together, commands of the same name can be summarized using the TasmotaBacklogcommand. Thedecode-configparameter--cmnd-use-backlogenables the use of TasmotaBacklog.With the use of--cmnd-use-backlogour example configuration# 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 my-wlan
  WebPassword myPaszxwo!z
  WebServer 2
  WifiConfig 5becomes to# Wifi:
  AP 0
  Hostname %s-%04d
  Backlog IPAddress1 0.0.0.0;IPAddress2 192.168.12.1;IPAddress3 255.255.255.0;IPAddress4 192.168.12.1
  Backlog NtpServer1 ntp.localnet.home;NtpServer2 ntp2.localnet.home;NtpServer3 192.168.12.1
  Backlog Password1 myWlAnPaszxwo!z;Password2 myWlAnPaszxwo!z2
  Backlog SSId1 wlan.1;SSId2 my-wlan
  WebPassword myPaszxwo!z
  WebServer 2
  WifiConfig 5--cmnd-use-backloggets really interesting forSetOptionxx,WebSensorxx,Sensorxx,Memxx,Gpioxxand more...Filter by groupsThe huge number of Tasmota configuration data can be overstrained and confusing, so the most of the configuration data are grouped into categories.The following groups are available:Control,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi,ZigbeeThese are similary to the categories onTasmota Command Documentation.To filter outputs to a subset of groups, use the-gor--groupparameter, concatenating the groups you want, e. g.decode-config-stasmota-4281-cmy.conf--output-formatcmnd--groupMainMQTTManagementWifiFiltering by groups affects the entire output, regardless of whether screen output or backup file.Usage examplesUsing Tasmota binary configuration filesThese examples use an online Tasmota device accessed over HTTP. The hostname of the Tasmota device istasmota-2f5d44-4281Backup an online Tasmota device via HTTP into a Tasmota configuration fileUse args to choice the file formatdecode-config-cmy.conf-stasmota-2f5d44-4281--backup-typedmp--backup-fileConfig_@d_@vUse file extension to choice the file formatdecode-config-cmy.conf-stasmota-2f5d44-4281--backup-fileConfig_@d_@v.dmpRestore a Tasmota configuration file to an online Tasmota device via HTTPdecode-config-cmy.conf-shttp://tasmota-2f5d44-4281--restore-fileConfig_@d_@v.dmpUsing JSON editable fileThese examples use an online Tasmota device that is accessed indirectly via MQTT.In these examples, the MQTT server parameters are the same as those used by Tasmota itself:MQTT Server:mybroker.example.comMQTT Username:mqttuserMQTT Password:myBrokerPaszxwo!zTasmota topic:tele/tasmota_2F5D44Backup an online Tasmota device via MQTT into a JSON fileUse an unencrypted MQTT connectionMQTT server uses a non default port 42110decode-config-smqtt://mqttuser:myBrokerPaszxwo!z@mybroker.example.com:42110/tele/tasmota_2F5D44--backup-fileConfig_2f5d44-4281.jsonUse SSL/TLS MQTT connectionLimit the configuration data to the groupsControl,ManagementandSetOptiondecode-config-smqtts://mqttuser:myBrokerPaszxwo!z@mybroker.example.com--fulltopictele/tasmota_2F5D44--backup-fileConfig_2f5d44-4281.json-gControlManagementSetOptionRestore a JSON file to an online Tasmota device via MQTTdecode-config-smqtts://mqttuser:myBrokerPaszxwo!z@mybroker.example.com/tele/tasmota_2F5D44--restore-fileConfig_2f5d44-4281.jsonUse batch processingLinuxfordeviceintasmota1tasmota2tasmota3;do./decode-config-cmy.conf-s$device-oConfig_@d_@v;doneunder Windowsfordevicein(tasmota1 tasmota2 tasmota3)dodecode-config -c my.conf -s %device -o Config_@d_@vwill produce JSON configuration files for host tasmota1, tasmota2 and tasmota3 using friendly name and Tasmota firmware version for backup filenames.File Formatsdecode-confighandles the following three file formats for backup and restore:.dmp formatThis is the original format used by Tasmota (created via the Tasmota web interface "Configuration" / "Backup Configuration" and can be read in with "Configuration" / "Restore Configuration". The format is binary encrypted.This file format can be created bydecode-configusing the backup function (--backup-file <filename>) with the additional parameter--backup-type dmp..json formatThis format uses theJSONnotation and contains the complete configuration data in plain text, human readable and editable.The .json format can be created bydecode-configusing the backup function (--backup-file <filename>) (for better identification you can append the optional parameter--backup-type json, but that's optional as json is the default backup format).In contrast to the other two binary formats.dmpand.bin, this type of format also allows thepartial modificationof configurations.NoteThe keys used within the JSON file are based on the variable names of Tasmota source code insettings.hso they do not have the same naming as known for Tasmota web commands. However, since the variable names are self-explanatory, there should be no difficulties in assigning the functionality of the variables..bin formatThis format is binary with the same structure as the.dmpformat. The differences to .dmp are:.bin is decrypted.bin has 4 additional bytes at the end of the fileThe .bin format can be created bydecode-configusing the backup function (--backup-file <filename>) with the additional parameter--backup-type bin.This format is actually only used to view the configuration data directly in binary form without conversion.It is hardly possible to change the binary data, since a checksum is formed over the data and this would have to be calculated and adjusted in case of any change.Program parameterFor better reading each short written parameter using a single dash-has a corresponding long version with two dashes--, eg.--sourcefor-s.Note: Not even all double dash--parameter has a corresponding single dash one-but each single dash variant has a double dash equivalent.A short list of possible program args is displayed using-hor--help.--full-helpFor advanced help use parameter-Hor--full-help.usage: decode-config.py [-s <filename|host|url>] [-p <password>]
                        [--fulltopic <topic>] [--cafile <file>]
                        [--certfile <file>] [--keyfile <file>] [--insecure]
                        [--keepalive <sec>] [-i <restorefile>]
                        [-o <backupfile>] [-t json|bin|dmp] [-E] [-e] [-F]
                        [--json-indent <indent>] [--json-compact]
                        [--json-show-pw] [--cmnd-indent <indent>]
                        [--cmnd-groups] [--cmnd-sort]
                        [--cmnd-use-rule-concat] [--cmnd-use-backlog]
                        [-c <configfile>] [-S] [-T json|cmnd|command]
                        [-g <groupname> [<groupname> ...]] [-w] [--dry-run]
                        [-h] [-H] [-v] [-V]

Backup/Restore Tasmota configuration data.

Source:
  Read/Write Tasmota configuration from/to

  -s, --source <filename|host|url>
                        source used for the Tasmota configuration (default:
                        None). Specify source type, path, file, user,
                        password, hostname, port and topic at once as an
                        URL. The URL must be in the form 'scheme://[usernam
                        e[:password]@]host[:port][/topic]|pathfile'where
                        scheme is 'file' for a tasmota binary config file,
                        'http' for a Tasmota HTTP web connection and
                        'mqtt(s)' for Tasmota MQTT transport ('mqtts' uses
                        a TLS connection to MQTT server)
  -p, --password <password>
                        Web server password on HTTP source (set by Tasmota
                        'WebPassword' command), MQTT server password in
                        MQTT source (set by Tasmota 'MqttPassword' command)
                        (default: None)

MQTT:
  MQTT transport settings

  --fulltopic <topic>   Optional MQTT transport fulltopic used for
                        accessing Tasmota device (default: )
  --cafile <file>       Enables SSL/TLS connection: path to a or filename
                        of the Certificate Authority certificate files that
                        are to be treated as trusted by this client
                        (default None)
  --certfile <file>     Enables SSL/TLS connection: filename of a PEM
                        encoded client certificate file (default None)
  --keyfile <file>      Enables SSL/TLS connection: filename of a PEM
                        encoded client private key file (default None)
  --insecure            suppress verification of the MQTT server hostname
                        in the server certificate (default False)
  --keepalive <sec>     keepalive timeout for the client (default 60)

Backup/Restore:
  Backup & restore specification

  -i, --restore-file <restorefile>
                        file to restore configuration from (default: None).
                        Replacements: @v=firmware version from config,
                        @d=devicename, @f=friendlyname1, @h=hostname from
                        config, @H=device hostname (http source only)
  -o, --backup-file <backupfile>
                        file to backup configuration to, can be specified
                        multiple times (default: None). Replacements:
                        @v=firmware version from config, @d=devicename,
                        @f=friendlyname1, @h=hostname from config,
                        @H=device hostname (http source only),
                        @F=configuration filename from MQTT request (mqtt
                        source 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. To revert an option, insert "dont" or "no"
  after "json", e.g. --json-no-indent, --json-dont-show-pw

  --json-indent <indent>
                        pretty-printed JSON output using indent level
                        (default: 'None'). -1 disables indent.
  --json-compact        compact JSON output by eliminate whitespace
  --json-show-pw        unhide passwords (default)

Tasmota command output:
  Tasmota command output format specification. To revert an option,
  insert "dont" or "no" after "cmnd", e.g. --cmnd-no-indent, --cmnd-dont-
  sort

  --cmnd-indent <indent>
                        Tasmota command grouping indent level (default:
                        '2'). 0 disables indent
  --cmnd-groups         group Tasmota commands (default)
  --cmnd-sort           sort Tasmota commands (default)
  --cmnd-use-rule-concat
                        use rule concatenation with + for Tasmota 'Rule'
                        command
  --cmnd-use-backlog    use 'Backlog' for Tasmota commands as much as
                        possible

Common:
  Optional arguments

  -c, --config <configfile>
                        program config file - can be used to set default
                        command parameters (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 <groupname>
                        limit data processing to command groups ['Control',
                        'Display', 'Domoticz', 'Hdmi', 'Internal', 'Knx',
                        'Light', 'Management', 'Mqtt', 'Power', 'Rf',
                        'Rules', 'Sensor', 'Serial', 'Setoption',
                        'Settings', 'Shutter', 'System', 'Telegram',
                        'Timer', 'Wifi', 'Zigbee'] (default no filter)
  -w, --ignore-warnings
                        do not exit on warnings. Not recommended, used by
                        your own responsibility!
  --dry-run             test program without changing configuration data on
                        device or file

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 version (and config version if
                        --source is given) and exit

The arguments -s <filename|host|url> must be given.

Args that start with '--' (eg. -s) 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.NoteIf you miss parameters here that are already in use, don't worry, they are still there.For details seeObsolete parametersParameter notesFilename replacement macros@hand@H:@hThe@hreplacement macro uses the hostname configured with the Tasomta WifiHostname <host>command (defaults to%s-%04d). It will not use the network hostname of your device because this is not available when working with files only (e.g.--source <filename>as source).
To prevent having an useless % in your filename,@hwill not replaced by hostname if this contains '%' characters.@HIf you want to use the network hostname within your filename, use the@Hreplacement macro instead - but be aware this will only replaced if you are using a network device as source (<hostname>,<ip>,<url>); it will not work when using a file as source (<filename>)Obsolete parametersThe parameters listed here continue to work and are supported, but are no longer listed in the parameter list:Obsolete source parametersThe following source selection parameters are completely replaced by a single used-sor--sourceparameter; use-sor--sourcewith ahttp-url:-f,--file,--tasmota-file,tasmotafile<filename>file used for the Tasmota configuration (default: None)'-d,--device,--host<host|url>hostname, IP-address or url used for the Tasmota configuration (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)Obsolete JSON formating parameters--json-unhide-pwsame as--json-show-pw--json-hide-pwsame as--json-dont-show-pw--json-sortsorts JSON output (this is the default)--json-unsortprevents JSON sortingGenerated Tasmota commandsDetailsbelow shows the Tasmota command generated bydecode-config:SupportedThese commands will be generated using parameter--output-format cmnd.Ad hocThese Tasmota commands are used for immediate action and do not change settings - so these cannot be created.UnsupportedThese Tasmota commands are unsupported and not implemented indecode-configGroupSupportedAd hocUnsupportedControlBlinkCountBacklogBlinkTimeBuzzerButtonDebounceFanSpeedDevGroupNameLedPowerDevGroupShareDevGroupTieInterlockLedMaskLedPwmMode<x>LedPwmOnLedPwmOffLedStatePower<x>PowerOnStatePulseTime<x>SwitchDebounceSwitchMode<x>Webbutton<x>WCAEC2WCAECDSP2WCAECValue2WCAELevel2WCAGCGain2WCAWB2WCAWBGain2WCBPC2WCBrightness2WCClock2WCColorbar2WCContrast2WCDCW2WCFeature2WCFlip2WCGainCeiling2WCGammaCorrect2WCLensCorrect2WCMirror2WCResolution2WCRtsp2WCSAuth2WCSaturation2WCSpecialEffect2WCStream2WCWBMode2WCWPC2ManagementDeepSleepTimeDelayDeviceNameGpiosEmulationI2CscanFriendlyName<x>ModulesGpio<x>ResetI2CDriver<x>RestartIfxStateIfxBucketStatusIfxHostUpgradeIfxPasswordUploadIfxPortSSPMLog2IfxUserSSPEnergy2IfxRPSSPHistory2IfxPeriodSSPScan2IfxSensorSSPIamHere2L1MusicSyncLogHostLogPortModuleModule2MqttLogNtpServer<x>OtaUrlPwm<x>PwmFrequencyPwmRangeRtcNtpserverSaveDataSerialLogSleepSSPMDisplay2SysLogTemplateTimeTimeSTDTimeDSTTimezoneTouchThres2TuyaMCUTuyaTempSetResWebLogWebTimeWiFiCORSAPDnsTimeoutPing<x>Ethernet2WebSendEthAddress2PublishEthClockMode2Publish2EthType2EthIPAddress2EthSubnetmask2EthGateway2EthDNSServer2EthDNSServer22HostnameIPAddress<x>Password<x>RgxAddressRgxNAPTRgxPasswordRgxSsidRgxStateRgxSubnetSsid<x>WebColor<x>WebPasswordWebRefreshWebSensor<x>WebServerWifiWifiConfigWifiPowerMQTTButtonRetainSubscribeButtonTopicUnsubscribeFullTopicGroupTopic<x>InfoRetainMqttClientMqttFingerprintMqttHostMqttKeepAliveMqttPasswordMqttPortMqttRetryMqttUserMqttTimeoutMqttWifiTimeoutPowerRetainPrefix<x>SensorRetainStateRetainStateText<x>StatusRetainSwitchRetainSwitchTopicTelePeriodTopicRulesCalcResAdd<x>Mem<x>EventRule<x>Mult<x>ScriptRuleTimer<x>Scale<x>Sub<x>Var<x>TelegramTmStateTimerLatitudeLongitudeTimersTimer<x>SensorAltitudeBh1750MTime<x>AdcParamAmpResGlobalHumAS3935AutoNFGlobalTempAS3935AutoDisturberSensor27AS3935AutoNFMaxSensor50AS3935MQTTEventSensor52AS3935NFTimeSensor53AS3935NoIrqEventSensor601AS3935DistTimeAS3935SetMinStageBh1750Resolution<x>Counter<x>CounterDebounceCounterDebounceLowCounterDebounceHighCounterType<x>HumOffsetHumResPressResOT_FlagsOT_Save_SetpointsOT_TBoilerOT_TWaterSensor13Sensor15Sensor18Sensor20Sensor29Sensor34Sensor40Sensor54Sensor68Sensor96Shift595DeviceCountSpeedUnitTempResTempOffsetVoltResWattResWeightResWiper<x>PowerAmpResCurrentSetCurrentCalFrequencySetCurrentHighModuleAddressCurrentLowPowerSetEnergyResStatus8EnergyTodayStatus9EnergyTotalVoltageSetEnergyYesterdayFreqResMaxPowerMaxPowerHoldMaxPowerWindowPowerCalPowerDeltaPowerHighPowerLowTariff<x>VoltageCalVoltageHighVoltageLowVoltResWattResUsfUsfFTPUsfTypeUsfSizeUsfFreeUsfDeleteUsfRenameUsfRunUsfServeLightDimmerRangeChannel<x>Color<x>DimmerStepCTDimmerFadeCTRangeLedTableHsbColorPixelsLed<x>PWMDimmerPWMsPaletteRGBWWTableWhiteRotationVirtualCTSchemeShdLeadingEdgeShdWarmupBrightnessShdWarmupTimeSpeedStepPixelsWakeupWakeupDurationZCDimmerSetRFRfProtocolRfRawRfCodeRfTimeOutRfHighRfHostRfKey<x>RfLowRfSyncIRIRsend<x>IRhvacSetOptionSetOption<x>SerialBaudrateSerialSend<x>ModbusBaudrateSSerialSend<x>ModbusSerialConfigTCPStartSBaudrateTuyaSend<x>SerialConfigSerialDelimiterSSerialConfigSSerialSend9TCPBaudrateTCPConfigDomoticzDomoticzIdx<x>DomoticzKeyIdx<x>DomoticzSensorIdx<x>DomoticzSwitchIdx<x>DomoticzUpdateTimerKNXKNX_ENABLEDKnxTx_Cmnd<x>KNX_PAKNX_ENHANCEDKnxTx_Val<x>KNX_GA<x>KNX_CB<x>DisplayDisplayAddressDisplayDisplayDimmerDisplayTextDisplayILIModeDisplayInvertDisplayModeDisplayModelDisplayRefreshDisplaySizeDisplayTypeDisplayRotateDisplayColsDisplayRowsDisplayFontDisplayWidthDisplayHeightShutterShutterButton<x>ShutterClose<x>ShutterCalibration<x>ShutterFrequency<x>ShutterCloseDuration<x>ShutterOpen<x>ShutterEnableEndStopTime<x>ShutterSetClose<x>ShutterInvert<x>ShutterStop<x>ShutterInvertWebButtons<x>ShutterStopClose<x>ShutterLock<x>ShutterStopOpen<x>ShutterMode<x>ShutterStopPosition<x>ShutterMotorDelay<x>ShutterStopToggle<x>ShutterMotorStopShutterStopToggleDir<x>ShutterOpenDuration<x>ShutterToggle<x>ShutterPosition<x>ShutterToggleDir<x>ShutterPWMRange<x>ShutterRelay<x>ShutterSetHalfway<x>ShutterTiltConfig<x>TelegramTmChatIdTmPollTmStateTmSendTmTokenZigbeeBatteryPercentageZbBindZbConfigZbForgetZbLightZbNameZbPermitJoinZbPingZbSendZbStatus<x>ZbUnbindBluetooth- all -Stepper Motors- all -MP3 Player- all -HdmiHdmiAddrHdmiTypeNotes1Sensor60 13sets the latitude/longitude, useLatitudeandLogitudecommand instead.2ESP32 onlyProgram return codesdecode-configreturns the following codes:0- successful:The process has successful finished1= restore skipped:Unchanged data, restore not executed2= program argument error:Wrong program parameter used (data source missing)3= file not found4= data size mismatch:The data size read from source does not match the excpected size5= data CRC error:The read data contains wrong CRC6= unsupported configuration version:The source data contains data from an unsupported (Sonoff-)Tasmota version7= configuration file read error:There was an error during read of configuration source file8= JSON file decoding error:There was an error within the read JSON file9= restore file data error:Error occured by writing new binary data10= device data download error:Source device connected but configuration data could not be downloaded (WebServer missing, disabled)11= device data upload error:Source device connected but configuration data could not be uploaded (WebServer missing, disabled, connection lost...)12= invalid configuration data:The configuration data source contains invalid basic data (wrong platform id...)20= python module missing:A neccessary python library module is missing21= internal error:An unexpected internal error occured22= HTTP connection error:Source device HTTP connection lost or unavailable23= MQTT connection error:MQTT server connection error24...= python library exit code:An unexpected internal library error occured4xx/5xx= HTTP errors