Open tinuva opened 3 years ago
Yes, this is my original goal. It is a huge task though, as decode-config is extreemly python specific and just attempting to convert the structure of the decoder into another language has proven to take a lot more time than I currently have available.
I haven't looked into it at all, since I don't code python, or saw it the last time I looked. The feature I really wanted, and why decode-config wouldn't work for me in it's current state, is it doesn't extract the defaults, it just gives you a dump. I personally wanted to know what changes existed from default settings, not just a dump of everything to make the output meaningful.
Ok I get the porting from Python to PHP is an issue.
The defaults should mostly be the same for all devices right? When just flashed/tasmotized and haven't configured the device type or anything yet. The only thing you have to configure is wifi. So why not use that as a default dump, remove the wifi settings in the decoded version, and add it to your git repo. Then you can use that as an initial version to compare anything on a new backups.
I would kinda like to see the decoded version committed to a git repo per device, and then on each backup, it can compare changes in the decoded configs using git diff. That will make it very interesting to see how someone has changed their own device configs over time. Kinda like, Rancid for Cisco.
Started playing around with this a bit. I like the idea of having a git repo per device but we'd probably have to track each commit in the db or something.
Decode config is GPL 3.0 so it shouldn't be a problem to distribute it. https://github.com/tasmota/decode-config/blob/development/LICENSE
I basically have decode-config installed and I have a small wrapper for it. Currently hitting device directly instead of passing in the dmp.
<?php
// TODO: Look up ip based on id of device instead of blindly trusting querystring input.
header('Content-type: application/json; charset=utf-8');
if(!isset($_GET['ip'])) {
echo json_encode(array("errorMessage" => "Must provide an IP address"));
exit;
}
$output = shell_exec('decode-config.py --source '.$_GET['ip']);
echo "".$output;
Hi,
awesome app this.
Any chance you can include tasmota decode-config in the docker container?
Would be even better if one can view the decoded config in the web interface! So like, on backup, also decode the config and store that, then make it viewable on the webui.
Many thanks in advance!