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

Update config over the air #240

Open
sjefferson99 opened this issue Oct 9, 2024 · 1 comment
Open

Update config over the air #240

sjefferson99 opened this issue Oct 9, 2024 · 1 comment
Assignees
Labels
🔮 enhancement New feature or request 👁 smib-hid SMIBHID related code

Comments

@sjefferson99
Copy link
Member

Have a web page show the config values and allow you to update them.
New config would be written out to config file and reinit/restart to apply.

@sjefferson99 sjefferson99 added 🔮 enhancement New feature or request 👁 smib-hid SMIBHID related code labels Oct 9, 2024
@sjefferson99 sjefferson99 self-assigned this Oct 9, 2024
@sjefferson99
Copy link
Member Author

sjefferson99 commented Oct 13, 2024

I think it's possible to parse a human readable config.py file and output it as equally readable after updates, but it seems much simpler to use json.dump(config_dict, filename, indent = 4) to make it fairly human readable for hacking and dev, but very python readable and rely on a config web page for truly human readable non-coders to interact.

This will require:

  • Refactoring the config file into JSON (including the config checker as this will be crucial for OTA changes to config and firmware) - Logged issue Refactor SMIBHID config.py into config.json #250
  • Writing some config import/export methods in the config manager module - Also on Refactor SMIBHID config.py into config.json #250
  • Loading the config values into a module called config or refactoring every module that uses config.py
  • Configure a web server - Done on Add a webserver to smibhid for admin purposes #248
  • Writing a basic web UI that shows all config values and allows updating and saving (can expand into type checking and fancy widgets for incrementing numbers etc. and displaying which entries need a reset to apply).
  • Call check config before applying to improve the odds of surviving a config change
  • Write out config changes to the config.json file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 enhancement New feature or request 👁 smib-hid SMIBHID related code
Projects
None yet
Development

No branches or pull requests

1 participant