for multi relay units like Sonoff dual
+ * Add retain option to Power/Light status controlled by command PowerRetain On|Off (#126)
+
+### 2.1.2 20161204
+ * Add support for second wifi AP (#73)
+ * Update command WifiConfig
+ * Fix possible WifiManager hang
+
+### 2.1.1a 20161203
+ * Fix scan for wifi networks if WeMo is enabled
+ * Fix syslog setting using web page
+
+### 2.1.1 20161202
+ * Add support for ElectroDragon second relay and button (only toggle with optional ButtonTopic) (#110)
+
+### 2.1.0 20161202
+ * Add optional EXPERIMENTAL TLS to MQTT (#49)
+ * Fix MQTT payload handling (#111)
+ * Optimzed WeMo code
+
+### 2.0.21a 20161201
+ * Fix WeMo PowerPlug emulation
+
+### 2.0.21 20161130
+ * Add Belkin WeMo PowerPlug emulation enabled with USE_WEMO_EMULATION in user_config.h (Heiko Krupp) (#105, #109)
+
+### 2.0.20 20161130
+ * Relax MQTTClient naming but only allows hexadecimal uppercase numbers (#107)
+ * Add I2C support with command I2CScan
+ * Add I2C sensor driver for HTU21 as alternate sensor using TH10/16 connectors (Heiko Krupp) (#105)
+ * Add I2C sensor driver for BMP085/BMP180/BMP280/BME280 as alternate sensor using TH10/16 connectors
+
+### 2.0.19a 20161127
+ * Add support for ButtonTopic and ButtonRetain to wall switch function
+ * Add pullup to SWITCH_PIN and command SwitchMode to syntax
+
+### 2.0.18 20161126
+ * Add SUB_PREFIX multi level support allowing 'cmnd' or 'cmnd/level2/level3'
+ * Add wall switch function to GPIO14 and command SwitchMode (Alex Scott) (#103)
+
+### 2.0.17 20161123
+ * Calibrate HLWPCAL from 12345 to 12530
+ * Add alternative sensor driver DHT2 using Adafruit DHT library
+ * Add define MESSAGE_FORMAT to user_config.h
+ * Throttle console messages
+ * Shorten JSON messages
+ * Fix possible Panic
+ * Fix User mode webserver security
+
+### 2.0.16 20161118
+ * Add alternative sensor driver DS18x20 using OneWire library (#95)
+ * Change sensor MQTT message from tele/sonoff/TEMPERATURE to tele/sonoff/DHT/TEMPERATURE or
+ * tele/sonoff/DS18B20/TEMPERATURE or tele/sonoff/DS18x20/1/TEMPERATURE
+ * Add sensors to root webpage and auto refresh every 4 seconds (#92)
+ * Add optional JSON messageformat to all telemetry data
+ * Enforce minimum TelePeriod to be 10 seconds
+ * Fix Energy Yesterday reset after restart
+ * Add Energy Today restore after controlled restart
+
+### 2.0.15 20161116
+ * Change TODAY_POWER and PERIOD_POWER to TODAY_ENERGY and PERIOD_ENERGY
+ * Fix serial regression
+ * Fix syslog hangs when loghost is unavailable
+
+### 2.0.14 20161115
+ * Add HLW threshold delay
+ * Fix HLW intermittent current deviation
+ * Fix button functionality during wificonfig
+ * Add CRC check to DS18B20 sensor (#88)
+
+### 2.0.13 20161113
+ * Add additional upload error code descriptions
+ * Add PlatformIO support (#80)
+
+### 2.0.12 20161113
+ * Fix Serial and Web response regression when no MQTT connection available
+ * Fix Sonoff Dual power telemetric data for second relay
+ * Removed MQTT password from Information web page
+ * Hide MQTT password from Configure MQTT web page
+
+### 2.0.11 20161111
+ * Rewrite button and web toggle code
+ * Fix NTP sync
+ * Add HLW calibration commands HLWPCAL, HLWUCAL and HLWICAL (need define USE_POWERCALIBRATION)
+ * Fix power threshold tests
+
+### 2.0.10 20161109
+ * Add additional Domoticz define (#63)
+ * Add defines MQTT_STATUS_ON and MQTT_STATUS_OFF in user_config.h to select status On/Off string
+ * Fix status response differences (#65)
+ * Fix divide by zero exception (#70)
+ * Fix syslog loop exception
+
+### 2.0.9 20161108
+ * clarify MODULE in user_config.h
+ * Fix hlw false values
+
+### 2.0.8 20161108
+ * Add initial status after power on
+ * Seperate driver files
+ * Fix hlw code and calibrate Pow
+ * Move user config defines to user_config.h (#61)
+
+### 2.0.7 20161030
+ * Make Ticker mandatory
+ * Add Domoticz support (Increase MQTT_MAX_PACKET_SIZE to 400) (#54)
+ * Add command MessageFormat 0|1 to select either legacy or JSON output
+
+### 2.0.6 20161024
+ * Add Sonoff Pow power factor
+ * Initial support for up to four relays using iTEAD PSB (4Channel)
+ * - Currently only supports one button (All buttons behave the same)
+ * - Use command MODEL 4 to select four relay option
+ * (After first power on it will support 2 relays like Sonoff Dual)
+ * Fix ledstate
+ * Add command Status 9 to display Sonoff Pow thresholds
+ * Add commands PowerLow, PowerHigh, VoltageLow, VoltageHigh, CurrentLow and CurrentHigh for use
+ * with Sonoff Pow thresholds
+
+### 2.0.5 20161018
+ * Add updates to user_config.h - moved SEND_TELEMETRY_DS18B20 and SEND_TELEMETRY_DHT to module area.
+ * As Sonoff TH10/16 does not have the logic installed for GPIO04 You'll have to select ONE of both
+ * Add Sonoff Pow support (experimental until Pow tested)
+ * Add command Status 8 to display Sonoff Pow energy values
+ * Add command MqttUnits On|Off to add units to values
+ * Change web main page header character size
+ * Change On/Off to ON/OFF status messages to satisfy openHAB
+ * Change TEMP to TEMPERATURE and HUM to HUMIDITY
+
+### 2.0.4 20161009
+ * Add MQTT_BUTTON_RETAIN, SAVE_DATA and SAVE_STATE defines to user_config.h (#35)
+ * Update ButtonRetain to remove retained message(s) from broker when turned off
+ * Add Retain for second relay on Sonoff Dual
+ * Provide power status messages with device topic index if requested
+
+### 2.0.3 20161008
+ * Update wifi initialization
+ * Add command BUTTONRETAIN for optional MQTT retain on button press (#35)
+ * Add command SAVESTATE to disable power state save. May be used with MQTT retain
+
+### 2.0.2 20161006
+ * Fix wifi issue 2186
+
+### 2.0.1 20161002
+ * Fix button press
+
+### 2.0.0 20161002
+ * Update Sonoff TH10/16 sensor pins (My TH10 only has GPIO14 connected)
+ * Add full support for Sonoff dual
+
+### 1.0.35 20160929
+ * Add more lines to console
+ * Add timeout and disable MQTT on web upload
+ * Add command SAVEDATA to control parameter save (for flash wear afficionados) (#30)
+
+### 1.0.34 20160926
+ * Fix button press six and seven
+ * Add more information to webserver
+
+### 1.0.33 20160915
+ * Better WPS error message
+ * Separate webserver code from support.ino into webserver.ino
+ * Fix webserver User by removing unwanted restart option
+
+### 1.0.32 20160913
+ * Add Wifi Protected Setup (WPS) as third option for initial config
+ * Add command WIFICONFIG replacing deprecated command SMARTCONFIG
+ * Add option WIFICONFIG 3 to start WPSconfig
+ * Add option WIFICONFIG 0 to start saved Wifi config tool (WPSconfig, Smartconfig or Wifimanager)
+ * Change button behaviour - See Wiki
+
+### 1.0.31 20160907
+ * Fix DS18B20 misread if teleperiod = 2
+ * Tuned sensor code
+ * Updated prefered ElectroDragon connection to Relay 1 and Button 1
+ * Moved SONOFF and ELECTRO_DRAGON port config to user_config.h
+
+### 1.0.30 20160902
+ * Fix command TELEPERIOD 0
+ * Add ESP- tag to UDP log message for easy rsyslogd filtering
+ * Add ElectroDragon (Relay 2 only) functionality. Select with #define MODULE ELECTRO_DRAGON
+ * Add ? as null message alternative
+ * Add DHT temperature and humidity telemetry support. Enable with #define SEND_TELEMETRY_DHT
+ * Add DS18B20 temperature telemetry support. Enable with #define SEND_TELEMETRY_DS18B20
+ * Restrict HOSTNAME, MQTTCLIENT, TOPIC and BUTTONTOPIC in topic mode only
+
+### 1.0.29 20160831
+ * Allow UPGRADE, OTAURL, RESTART, RESET, MQTTHOST, MQTTPORT, MQTTUSER, MQTTPASSWORD and WEBSERVER also in group mode
+
+### 1.0.28 20160831
+ * Add webserver state to status 5
+ * Add optional PUB_PREFIX2 (tele) for telemetry usage
+ * Add command TELEPERIOD
+ * Fix syntax message
+ * Change memory status display
+
+### 1.0.27 20160831
+ * Add sketch flash size
+ * Add console to webserver
+ * Add command weblog
+ * Change WifiManager web pages to minimal
+ * Change display default hostname and MQTT client id in webserver
+ * Change HTTP command interface to http://sonoff-1234/cm?cmnd=light 2
+ * Change HEARTBEAT to UPTIME
+
+### 1.0.26 20160829
+ * Add define USE_WEBSERVER to disable web server code in source
+ * Add file upload as alternative for ota upload to webserver
+ * Add information to webserver
+ * Add command hostname
+ * Add command logport
+ * Change HTTP command interface to http://sonoff-1234/cmd?cmnd=light 2
+ * Change button behaviour with regards to Smartconfig and OTA upload. See README.md
+ * Enforce default hostname to either "%s-%04d" or user defined without any %
+ * Enforce default mqtt client id to either "DVES_%06X" or user defined without any %
+
+### 1.0.25 20160822
+ * Remove config system halts to keep ota available
+
+### 1.0.24 20160821
+ * Add test for MQTT_SUBTOPIC
+ * Change log range to LOG_LEVEL_ALL
+ * Change MQTT introduction messages
+ * Moved MQTT_MAX_PACKET_SIZE warning message to introduction messages
+
+### 1.0.23 20160821
+ * Add option USE_SPIFFS to move config from flash to spiffs
+ * Add webserver with options 0 (off), 1 (user) and 2 (admin)
+ * Add HTTP command interface (http://sonoff-1234/c?cmnd=light 2)
+ * Add wifimanager countdown counter
+ * Add command line webpage
+ * Add relay control to wifimanager
+ * Add restart option 99 to force restart
+ * Fix wifi hostname
+ * Fix NETBIOS hostname problem by reducing default hostname length
+ * Fix possible exception if WIFI_HOSTNAME is changed
+ * Fix upgrade messages
+ * Reduce memory use by redesigning config routines
+ * Split syntax message
+ * Rename define SERIAL_IO to USE_SERIAL
+
+### 1.0.22 20160814
+ * Add all MQTT parameters for configuration
+ * Add wifimanager to configure Wifi and MQTT via web server
+ * Change NTP time handling
+ * Fix Smartconfig parameter buffer overflow
+ * Fix PlatformIO warnings
+
+### 1.0.21 20160808
+ * Remove semaphore as subscription flooding (more than 15 subscriptions per second) is managed by SDK (LmacRxBlk:1)
+ * Add optional RTC interrupt (define USE_TICKER) to keep RTC synced during subscription flooding
+ * Remove heartbeatflag
+
+### 1.0.20 20160805
+ * Add semaphore to handle out of memory when too many subscriptions requested
+ * Use Daylight Saving (DST) parameters from user_config.h when timezone = 99
+ * Add status 7 option displaying RTC information
+ * Add ledstate to status 0
+### 1.0.19 20160803
+ * Fix possible MQTT_CLIENT_ID induced Exception(28)
+
+### 1.0.18 20160803
+ * Moved Cfg_Default
+ * Fix negative data handling
+ * Remove MQTT information from status 1 and add labels to status 1
+ * Add mac address to status 5
+ * Add MQTT ClientId, UserId and Password to status 6
+
+### 1.0.17 20160731
+ * Better variable range checking
+ * Change ambiguous connection messages
+ * Add timestamp to serial message
+
+### 1.0.16 20160729
+ * Moved wifi, rtc, syslog and config to support.ino
+ * Fixed button action when buttontopic is used. Introduced with 1.0.15
+ * Better buffer overflow checks (strlcpy)
+
+### 1.0.15 20160728
+ * Removed pubsubclient config changes from sonoff.ino as it doesn't work
+ * reapply MQTT_MAX_PACKET_SIZE 256 and MQTT_KEEPALIVE 120 to PubSubClient.h
+ * Add status 0 option displaying all status messages
+ * Change MQTT_MAX_PACKET_SIZE from 1024 to 256
+ * Add buffer overflow checks (snprintf and strncpy)
+ * Implemented common string sizes
+
+### 1.0.14 20160722
+ * Seperate user config from sonoff.ino to user_config.h (pucebaboon)
+ * Change defaults from sidnas2 to domus1
+ * Add MQTT status message as status 6 (pucebaboon)
+ * Add status type to message (pucebaboon)
+ * Add pubsubclient config changes to sonoff.ino (pucebaboon)
+
+### 1.0.13 20160702
+ * Add Ledstate 1 option to show power state on led
+
+### 1.0.12 20160529
+ * Allow disable of button topic using "0"
+
+### 1.0.11 20160524
+ * Provide button response if MQTT connection lost
+
+### 1.0.10 20160520
+ * Add optional button topic to assist external MQTT clients
+ * Change version notation
+ * Reset default values
+
+### 1.0.9 20160503
+ * Add more blinks
+ * Add reset 2 option erasing flash
+ * Add status 5 option displaying network info
+ * Add syslog check for Wifi connection
+ * Resize MqttPublish log array
+ * Change Wifi smartconfig active from 100 to 60 seconds
+ * Update Wifi initialization
+
+### 1.0.8 20160430
+ * Remove use of Wifi config data from SDK
+ * Add status 3 (syslog info) and status 4 (flash info)
+ * Add restart option to button (5 quick presses)
+
+### 1.0.7 20160420
+ * Add UDP syslog support
+ * Change HOST command to MQTTHOST command
+ * Add commands SYSLOG, SERIALLOG and LOGHOST
+ * Change hostname to lower case to distinguise between open-sdk version
+ * Add support for ESP-12F used in my modified wkaku power socket switch
+ * Fix timezone command
+ * Add RTC month names for future use
+ * Modify button code
+ * Remove initialization errors by better use of MQTT loop
+
+### 1.0.6 20160406
+ * Removed Wifi AP mode (#1)
+ * Add test for Arduino IDE version >= 1.6.8
+ * Fix RTC time sync code
+
+### 1.0.5 20160310
+ * Initial public release
+ * Show debug info by selecting option from IDE Tools Debug port: Serial
diff --git a/tools/decode-config.html b/tools/decode-config.html
deleted file mode 100644
index 721e7638a..000000000
--- a/tools/decode-config.html
+++ /dev/null
@@ -1,375 +0,0 @@
-decode-config.py
-decode-config.py is able to backup and restore Tasmota configuration.
-In comparison with the Tasmota build-in "Backup/Restore Configuration" function decode-config.py
-
-- uses human readable and editable JSON-format for backup/restore,
-- can restore previously backup and changed JSON-format files,
-- is able to create Tasmota compatible command list with related config parameter
-
-Comparing backup files created by decode-config.py and *.dmp files created by Tasmota "Backup/Restore Configuration":
-
-
-
- |
-decode-config.py *.json file |
-Tasmota *.dmp file |
-
-
-
-
-Encrypted |
-No |
-Yes |
-
-
-Readable |
-Yes |
-No |
-
-
-Simply editable |
-Yes |
-No |
-
-
-Simply batch processing |
-Yes |
-No |
-
-
-
-decode-config.py is compatible with Tasmota version from v5.10.0 up to now.
-Content
-
-Prerequisite
-
-- This program is written in Python) so you need to install a working python environment for your operating system.
-
-Linux
-sudo apt-get install python python-pip libcurl4-openssl-dev libssl-dev
-
pip install pycurl configargparse
-
Windows 10
-Install Python 2.7 then install dependencies. For PyCurl you need to download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl for Windows 10 64bit.
-pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl configargparse
-
-
-pip install configargparse
-
-- Tasmota Firmware 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). 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
-decode-config.py can handle the following backup file types:
-
-Configuration data as used by Tasmota "Backup/Restore Configuration" web interface.
-This format is binary and encrypted.
-
-Configuration data in JSON-format.
-This format is decrypted, human readable and editable and can also be used for the --restore-file
parameter.
-This file will be created by decode-config.py using the --backup-file
with --backup-type json
parameter, this is the default.
-
-Configuration data in binary format.
-This format is binary decryptet, editable (e.g. using a hex editor) and can also be used for --restore-file
command.
-It will be created by decode-config.py using --backup-file
with --backup-type bin
.
-Note:
-The .bin file contains the same information as the original .dmp file from Tasmota "Backup/Restore Configuration" but it is decrpted and 4 byte longer than an original (it is a prefix header at the beginning). .bin file data starting at address 4 contains the same as the struct SYSCFG from Tasmota settings.h in decrypted format.
-File extensions
-You don't need to append exensions for your file name as decode-config.py uses auto extension as default. The extension will be choose based on file contents and --backup-type
parameter.
-If you do not want using auto extensions use the --no-extension
parameter.
-Usage
-After download don't forget to set the executable flag under linux with chmod +x decode-config.py
or call the program using python decode-config.py...
.
-Basics
-At least pass a source where you want to read the configuration data from using -f <filename>
or -d <host>
:
-The source can be either
-
-- a Tasmota device hostname or IP using the
-d <host>
parameter
-- a Tasmota
*.dmp
configuration file using -f <filename>
parameter
-
-Example:
-decode-config.py -d tasmota-4281
-
will output a human readable configuration in JSON-format:
-{
- "altitude": 112,
- "baudrate": 115200,
- "blinkcount": 10,
- "blinktime": 10,
-...
- "ws_width": [
- 1,
- 3,
- 5
- ]
-}
-
Save backup file
-To save the output as backup file use --backup-file <filename>
, you can use placeholder for Version, Friendlyname and Hostname:
-decode-config.py -d tasmota-4281 --backup-file Config_@f_@v
-
If you have setup a WebPassword within Tasmota, use
-decode-config.py -d tasmota-4281 -p <yourpassword> --backup-file Config_@f_@v
-
will create a file like Config_Tasmota_6.4.0.json
(the part Tasmota
and 6.4.0
will choosen related to your device configuration). Because the default backup file format is JSON, you can read and change it with any raw text editor.
-Restore backup file
-Reading back a saved (and possible changed) backup file use the --restore-file <filename>
parameter. This will read the (changed) configuration data from this file and send it back to the source device or filename.
-To restore the previously save backup file Config_Tasmota_6.2.1.json
to device tasmota-4281
use:
-decode-config.py -d tasmota-4281 --restore-file Config_Tasmota_6.2.1.json
-
with password set by WebPassword:
-decode-config.py -d tasmota-4281 -p <yourpassword> --restore-file Config_Tasmota_6.2.1.json
-
Output to screen
-To force screen output use the --output
parameter.
-Output to screen is default enabled when calling the program with a source parameter (-f or -d) but without any backup or restore parameter.
-JSON output
-The default output format is JSON. You can force JSON output using the --output-format json
parameter.
-Example:
-decode-config.py -d tasmota-4281 -c my.conf -x Wifi --output-format json
-
-{
- ...
- "hostname": "%s-%04d",
- "ip_address": [
- "0.0.0.0",
- "192.168.12.1",
- "255.255.255.0",
- "192.168.12.1"
- ],
- "ntp_server": [
- "ntp.localnet.home",
- "ntp2.localnet.home",
- "192.168.12.1"
- ],
- "sta_active": 0,
- "sta_config": 5,
- "sta_pwd": [
- "myWlAnPaszxwo!z",
- "myWlAnPaszxwo!z2"
- ],
- "sta_ssid": [
- "wlan.1",
- "my-wlan"
- ],
- "web_password": "myPaszxwo!z",
- "webserver": 2
- ...
-}
-
Note: JSON output always contains all configuration data like the backup file except you are using --group
arg.
-Tasmota command output
-decode-config.py is able to translate the configuration data to (most all) Tasmota commands. To output your configuration as Tasmota commands use --output-format cmnd
or --output-format command
.
-Example:
-decode-config.py -d tasmota-4281 -c my.conf -g Wifi --output-format cmnd
-
-# Wifi:
- AP 0
- Hostname %s-%04d
- IPAddress1 0.0.0.0
- IPAddress2 192.168.12.1
- IPAddress3 255.255.255.0
- IPAddress4 192.168.12.1
- NtpServer1 ntp.localnet.home
- NtpServer2 ntp2.localnet.home
- NtpServer3 192.168.12.1
- Password1 myWlAnPaszxwo!z
- Password2 myWlAnPaszxwo!z2
- SSId1 wlan.1
- SSId2 wlan.1
- WebPassword myPaszxwo!z
- WebServer 2
- WifiConfig 5
-
Note: A few very specific module commands like MPC230xx, KNX and some Display commands are not supported. These are still available by JSON output.
-Filter data
-The huge number of Tasmota configuration data can be overstrained and confusing, so the most of the configuration data are grouped into categories.
-With decode-config.py the following categories are available: Display
, Domoticz
, Internal
, KNX
, Led
, Logging
, MCP230xx
, MQTT
, Main
, Management
, Pow
, Sensor
, Serial
, SetOption
, RF
, System
, Timers
, Wifi
-These are similary to the categories on https://github.com/arendst/Tasmota/wiki/Commands.
-To filter outputs to a subset of groups use the -g
or --group
arg concatenating the grooup you want, e. g.
-decode-config.py -d tasmota-4281 -c my.conf --output-format cmnd --group Main MQTT Management Wifi
-
Configuration file
-Each argument that start with --
(eg. --file
) can also be set in a config file (specified via -c). Config file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at https://pypi.org/project/ConfigArgParse).
-If an argument is specified in more than one place, then commandline values override config file values which override defaults. This is usefull if you always use the same argument or a basic set of arguments.
-The http authentication credentials --username
and --password
is predestinated to store it in a file instead using it on your command line as argument:
-e.g. my.conf:
-[source]
-username = admin
-password = myPaszxwo!z
-
To make a backup file from example above you can now pass the config file instead using the password on command line:
-decode-config.py -d tasmota-4281 -c my.conf --backup-file Config_@f_@v
-
More program arguments
-For better reading each short written arg (minus sign -
) has a corresponding long version (two minus signs --
), eg. --device
for -d
or --file
for -f
(note: not even all --
arg has a corresponding -
one).
-A short list of possible program args is displayed using -h
or --help
.
-For advanced help use -H
or --full-help
:
-usage: decode-config.py [-f <filename>] [-d <host>] [-P <port>]
- [-u <username>] [-p <password>] [-i <filename>]
- [-o <filename>] [-t json|bin|dmp] [-E] [-e] [-F]
- [--json-indent <indent>] [--json-compact]
- [--json-hide-pw] [--json-show-pw]
- [--cmnd-indent <indent>] [--cmnd-groups]
- [--cmnd-nogroups] [--cmnd-sort] [--cmnd-unsort]
- [-c <filename>] [-S] [-T json|cmnd|command]
- [-g {Control,Devices,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi} [{Control,Devices,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi} ...]]
- [--ignore-warnings] [-h] [-H] [-v] [-V]
-
-Backup/Restore Tasmota configuration data. Args that start with '--'
-(eg. -f) can also be set in a config file (specified via -c). Config file
-syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at
-https:
-commandline values override config file values which override defaults.
-
-Source:
- Read/Write Tasmota configuration from/to
-
- -f, --file, --tasmota-file <filename>
- file to retrieve/write Tasmota configuration from/to
- (default: None)'
- -d, --device, --host <host>
- hostname or IP address to retrieve/send Tasmota
- configuration from/to (default: None)
- -P, --port <port> TCP/IP port number to use for the host connection
- (default: 80)
- -u, --username <username>
- host HTTP access username (default: admin)
- -p, --password <password>
- host HTTP access password (default: None)
-
-Backup/Restore:
- Backup & restore specification
-
- -i, --restore-file <filename>
- file to restore configuration from (default: None).
- Replacements: @v=firmware version from config,
- @f=device friendly name from config, @h=device
- hostname from config, @H=device hostname from device
- (-d arg only)
- -o, --backup-file <filename>
- file to backup configuration to (default: None).
- Replacements: @v=firmware version from config,
- @f=device friendly name from config, @h=device
- hostname from config, @H=device hostname from device
- (-d arg only)
- -t, --backup-type json|bin|dmp
- backup filetype (default: 'json')
- -E, --extension append filetype extension for -i and -o filename
- (default)
- -e, --no-extension do not append filetype extension, use -i and -o
- filename as passed
- -F, --force-restore force restore even configuration is identical
-
-JSON output:
- JSON format specification
-
- --json-indent <indent>
- pretty-printed JSON output using indent level
- (default: 'None'). -1 disables indent.
- --json-compact compact JSON output by eliminate whitespace
- --json-hide-pw hide passwords
- --json-show-pw, --json-unhide-pw
- unhide passwords (default)
-
-Tasmota command output:
- Tasmota command output format specification
-
- --cmnd-indent <indent>
- Tasmota command grouping indent level (default: '2').
- 0 disables indent
- --cmnd-groups group Tasmota commands (default)
- --cmnd-nogroups leave Tasmota commands ungrouped
- --cmnd-sort sort Tasmota commands (default)
- --cmnd-unsort leave Tasmota commands unsorted
-
-Common:
- Optional arguments
-
- -c, --config <filename>
- program config file - can be used to set default
- command args (default: None)
- -S, --output display output regardsless of backup/restore usage
- (default do not output on backup or restore usage)
- -T, --output-format json|cmnd|command
- display output format (default: 'json')
- -g, --group {Control,Devices,Display,Domoticz,Internal,Knx,Light,Management,Mqtt,Power,Rf,Rules,Sensor,Serial,Setoption,Shutter,System,Timer,Wifi}
- limit data processing to command groups (default no
- filter)
- --ignore-warnings do not exit on warnings. Not recommended, used by your
- own responsibility!
-
-Info:
- Extra information
-
- -h, --help show usage help message and exit
- -H, --full-help show full help message and exit
- -v, --verbose produce more output about what the program does
- -V, --version show program's version number and exit
-
-Either argument -d <host> or -f <filename> must be given.
-
Program parameter notes
-decode-config.py
-Examples
-The most of the examples are for linux command line. Under Windows call the program using python decode-config.py ...
.
-Config file
-Note: The example contains .ini style sections [...]
. Sections are always treated as comment and serves as clarity only.
-For further details of config file syntax see https://pypi.org/project/ConfigArgParse.
-my.conf
-[Source]
-username = admin
-password = myPaszxwo!z
-
-[JSON]
-json-indent 2
-
Using Tasmota binary configuration files
-
-Restore a Tasmota configuration file
- decode-config.py -c my.conf -d tasmota --restore-file Config_Tasmota_6.2.1.dmp
-
-Backup device using Tasmota configuration compatible format
-a) use file extension to choice the file format
- decode-config.py -c my.conf -d tasmota --backup-file Config_@f_@v.dmp
-b) use args to choice the file format
- decode-config.py -c my.conf -d tasmota --backup-type dmp --backup-file Config_@f_@v
-
-
-Use batch processing
-for device in tasmota1 tasmota2 tasmota3; do ./decode-config.py -c my.conf -d $device -o Config_@f_@v
-
or under windows
-for device in (tasmota1 tasmota2 tasmota3) do python decode-config.py -c my.conf -d %device -o Config_@f_@v
-
will produce JSON configuration files for host tasmota1, tasmota2 and tasmota3 using friendly name and Tasmota firmware version for backup filenames.
-Notes
-Some general notes:
-
-- Filename replacement macros @h and @H:
-- @h
-The @h replacement macro uses the hostname configured with the Tasomta Wifi
Hostname <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. --file <filename>
as source).
-To prevent having a useless % in your filename, @h will not replaced by configuration data hostname if this contains '%' characters.
-- @H
-If you want to use the network hostname within your filename, use the @H replacement macro instead - but be aware this will only replaced if you are using a network device as source (
-d
, --device
, --host
); it will not work when using a file as source (-f
, --file
)
-
-
-
diff --git a/tools/decode-config.md b/tools/decode-config.md
index add80549a..4097638fa 100644
--- a/tools/decode-config.md
+++ b/tools/decode-config.md
@@ -55,14 +55,14 @@ pip install pycurl configargparse
Install [Python 2.7](https://www.python.org/download/releases/2.7/) then install dependencies. For PyCurl you need to [download pycurl‑7.43.0.3‑cp27‑cp27m‑win_amd64.whl](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl) for Windows 10 64bit.
```
-pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl configargparse
+pip install pycurl-7.43.0.3-cp27-cp27m-win_amd64.whl
// run the command from the folder where you downloaded the file
pip install configargparse
```
* [Tasmota](https://github.com/arendst/Tasmota) [Firmware](https://github.com/arendst/Tasmota/releases) with Web-Server enabled:
- * To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command [WebServer 2](https://github.com/arendst/Tasmota/wiki/Commands#wifi)). This is the Tasmota default.
+ * To backup or restore configurations from or to a Tasmota device you need a firmare with enabled web-server in admin mode (command [WebServer 2](https://tasmota.github.io/docs/#/Commands#wifi)). This is the Tasmota default.
* If using your own compiled firmware be aware to enable the web-server (`#define USE_WEBSERVER` and `#define WEB_SERVER 2`).
## File Types
@@ -213,7 +213,7 @@ The huge number of Tasmota configuration data can be overstrained and confusing,
With _decode-config.py_ the following categories are available: `Display`, `Domoticz`, `Internal`, `KNX`, `Led`, `Logging`, `MCP230xx`, `MQTT`, `Main`, `Management`, `Pow`, `Sensor`, `Serial`, `SetOption`, `RF`, `System`, `Timers`, `Wifi`
-These are similary to the categories on [https://github.com/arendst/Tasmota/wiki/Commands](Tasmota Command Wiki).
+These are similary to the categories on [https://tasmota.github.io/docs/#/Commands](Tasmota Command Wiki).
To filter outputs to a subset of groups use the `-g` or `--group` arg concatenating the grooup you want, e. g.