Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Include tasmota decode-config in the docker container #52

Open
tinuva opened this issue Apr 14, 2021 · 3 comments
Open

Comments

@tinuva
Copy link

tinuva commented Apr 14, 2021

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!

@patrickdk77
Copy link
Collaborator

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.

@tinuva
Copy link
Author

tinuva commented Apr 16, 2021

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.

@mkaatman
Copy link
Contributor

mkaatman commented Oct 20, 2022

tasmocompare

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants