arjenhiemstra / ithowifi

Itho wifi add-on module (ESP32 wifi to itho I2C protocol)
GNU General Public License v3.0
181 stars 32 forks source link

export itho settings as json file #181

Open sanderkob opened 1 year ago

sanderkob commented 1 year ago

Ref. issue https://github.com/arjenhiemstra/ithowifi/issues/63 When the button Download IthoSettings.json is pressed on the tho settings webpage, the webserver in task_web is triggered (/getithosettings). This calls the function handleIthosettingsDownload(), where the Json array sumJson is called from getIthoSettingsBackupJSONPlus. This array is then serialized and sent to the file IthoSettings.json (in the file system), a text file containing the settings in json format. Then a download link is generated and the file is truncated for next use. Download IthoSettings.json can only be operated after retrieval of settings (Retrieve settings button). If desired the downloaded text file can be converted to a pdf table via https://wtools.io/convert-json-to-pdf. This is a clean PR to replace PR #180

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

arjenhiemstra commented 8 months ago

Thanks (finally!). It took some time before I could look at this very much wanted feature! In the end I choose to implement the idea a bit differently using only javascript and a browser based cache (localStorage) to achieve the same result. The extra bonus is that reloading the settings page is now also instant. See 2.7.0-beta1 for how this is implemented. Love to hear your feedback!