[Feature] Spliting Hardware + Common settings from the config file

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

[Feature] Spliting Hardware + Common settings from the config file

#1 Post by soif » 05 Mar 2018, 09:17

Following @TD-er saying (from there)
My plan was also to add support for writing all stored structs to JSON and read them again from JSON.
I suggest to consider splitting the device configuration + hardware config from the whole config file, I mean:

- 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?
Last edited by soif on 05 Mar 2018, 16:07, edited 2 times in total.
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: [Feature] Spitting Hardware + Common settings from the config file

#2 Post by grovkillen » 05 Mar 2018, 10:15

Good idea. It's in the scoop of the future implementation of JSON REST API we've been talking about (on Slack).
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8749
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: [Feature] Spliting Hardware + Common settings from the config file

#3 Post by TD-er » 05 Mar 2018, 19:39

My idea was not to store it as JSON, but as a serialized binary, also supported by cereal.
But export/import as Json, so you can also fetch the config from a HTTP source and let configure it via http post.
Also this can be used to make a much more interactive web interface and even create one for more than one node.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 54 guests