I suggest to consider splitting the device configuration + hardware config from the whole config file, I mean:My plan was also to add support for writing all stored structs to JSON and read them again from JSON.
- There are a few settings that need to be different on each node, mainly : Name, Unit Number, IP address. These should go into a separate file/JSON. ie node_config.json or even not backuped at all
- There are obviously some setting that are common to ALL your nodes , ie Network mask, GW, filtering, DST settings, LogServer, etc..., these should goes into a separate general_config.json
- There are hardware settings that are specific to each node, like all GPIO assignments, I2C settings, Device used and their parameters. These settings while being specific for a device, could be shared by SOME of your devices (ie you have multiple temperature node, or multiple Sonoff Touch for example). These settings could also be shared between forums, or may be stored in a preset/examples folder in a/the github repo. For all of these reasons, these setting should go into a separate hardware_config.json file. And if possible all rules should be included in this file (while maybe keeping the ability to store/load them separately)
Any thoughts?