-
-
Notifications
You must be signed in to change notification settings - Fork 152
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 - store settings to cookie/docker image #38
Comments
Will think about it. It is not so straightforward. |
Some javascript should handle it no? Is there an easy way to upload the user_config_override.h? |
If you downloaded your |
Thank you; however, that completely defeats the purpose of your wonderful docker! :( |
That's true. Let me think about it. |
I think the best way to handle this would be to define a JSON structure that holds all the defined configuration data that you normally store in the state of the steps. What you could do is make a new step 1 called upload or something and allow the user to provide this JSON file (or skip to ignore it). The file can be read by the javascript and passed down as a prop into each step following and they can extract (if it exists) the config data for their step. IE: Wifi can look for the AP name and password data. This allows the user to provide a JSON, then just step through each step and adjust if desired, and then after the compile you could also provide a new JSON output with the final configuration object state data replicated. I would see this very useful to include very commonly used config data in my own file I just provide at the start, and maybe tweak a few parameters. Generating the initial file would be as simple as walking through the UI once and I can save it off. This also starts to make it possible to have someone create and maintain JSON configs for maybe common device types. The advantages to this type of setup is the docker container needs to store nothing new, it is all handled client side and is still relatively smooth operation from start to finish. Implementation wise this should be fairly straight forward as well, the uploader step just needs a callback into the parent for passing in new data, and you just need to define your JSON structure you want which I suspect would look very similar to your current steps (ie: theres a wifi section, features section, etc). Ideally this data structure matches what I assume you post back to the compiler service itself, meaning it would then also be possible to reuse your container by external services that want a way to compile a bunch of firmware files at once. For instance I would like to be able to compile a bunch of firmwares with some variables replaced and store them somewhere to use for OTA updates (where I rename the firmware for that specific device). This makes it easy to mass compile and deploy firmwares with all my config data built in whenever a major release happens or I need to test a version on a selection of devices. I am interested in learning about the current pieces and seeing what may be required to get something like this working, but from an initial look at everything I don't believe it should be too difficult. What are your thoughts on this @benzino77? |
To tell the truth I haven't think, one could use TasmoCompiler for mass compiling. When I was creating this tool I was thinking about home use cases where you have 10+ devices and you do not install them at the same time (just add devices to your home setup during your IOT world development). Every new device, you open TasmoCompiler GUI to prepare your custom bin file and you are doing it from time to time. I left this issue open since April, because I do think that it might be interesting to implement such functionality. I was thinking of it rather as challenge more then crucial feature. But... I realize that it is not as convenient as "upload your configuration", but for now it should/have to be enough - just The issue will be left open. |
I have developed a solution which is about 80% done, unfortunately this is my very first approach with Node.js and I am still learning. |
I would rather think of storing some information in localStorage.setItem('wifiSSID', 'myssid');
localStorage.setItem('wifiPass', 'mypassword');
localStorage.setItem('staticIP', true);
... Then every time you open TasmoCompiler in the browser it can check if there is a key in localStorage.getItem('wifiSSID', 'myssid');
localStorage.getItem('wifiPass', 'mypassword');
localStorage.getItem('staticIP', true);
... I use some by no mistake. I'm pretty sure that storing ALL settings will cause more problems than it can provide benefits. That is because features may change over time and be (especially between major version releases) incompatible between version of TasmoCompiler. On the other hand I'm pretty sure that storing WIFI config or static IP settings can be really, really handy. There has to be also implemented mechanism to wipe out those stored settings by providing "GUI element" for calling |
yeah agree. i thought it would be handy just to store the form values. But we would need some logic checking the validity of those. I'll have a look at the localStorage concept and will focus on the WIFI first. Is it in your opinion an issue to store sensitive data unencrypted? |
That is a good question. It will be plain text so someone with access to your browser (or browser data folder) could retrieve this information. Official documentation says that only the same origin can access data in |
Hi, I have an idea that might work and I think it should be relatively easy to implement. This way, home users have the option to update their devices more easily (instead of typing all the data, now you keep one user_config file…), but it's hard enough to stop a mass build. It should work easy with all possible solutions like gitpod, docker and so on. Any thoughts on this approach? |
Would be great if one could store the settings he/she entered into the web interface for quick use later.
thanks for a great app!
The text was updated successfully, but these errors were encountered: