Closed oakwhiz closed 3 years ago
regardless of the fact that the command output is insufficient for a complete configuration, what is a default config?
Since decode-config has no way of finding out what the default configuration of a Tasmota device is (maybe you mean what a Reset 1
does, I don't know), a difference cannot be determined automatically by accessing the Tasmota configuration data. Tasmota only allows querying and writing of the current binary encrypted configuration data, not more.
Apart from that, it is not recommended to use the output of -T cmnd
|-T command
as a complete configuration setup, as it is incomplete. The output of the Tasmota commands is intended to quickly convert conscious subsets of settings into Tasmota commands. It must be clear to the user that this is not complete and that the configuration of a Tasmota device using this way is incomplete.
I therefore recommend using the JSON format od decode-config as the basis for an initial setup.
You have to decide for yourselve and for your device(s) what a default configuration is, as this can be very different due to the use of USE_CONFIG_OVERRIDE, among other things.
I recommend then to create a default.json
, then with the help of external tools like git diff
the differences can be displayed:
git diff --no-index default.json current.json
I do not intend to implement such function processes in decode-config, which are helpful in themselves. That must be reserved for external tools and processes. decode-config should only remain the interface for this.
decode-config only serves to convert the unreadable Tasmota binary format into readable and vice versa.
Is your feature request related to a problem? Please describe.
decode-config -T command
is helpful but it shows every single command supported by the device, which makes it difficult to find portions that are relevant.Describe the solution you'd like
Describe alternatives you've considered
diff
tool to locate differencesAdditional context