I have some questions around good practices when dealing with single firmware, multiple devices with different configs, and a factory reset button. Reading the MOS documentation on config I feel like I’m missing something.
I’d like my setup to have:
- Single firmware that I can deploy to multiple devices
- Some custom config per device like mdash device id, etc.
- Some user config that is changed per device like WiFi, update frequency, endpoints to hit etc
- Factory reset button that would keep custom device config, but wipe user config
Up until now I’ve only really had one device so I’ve used firmware with a conf8.json file that contains my mdash device ID and some other settings, and a bunch of parameters defined in my mos.yml that I’m pretty sure get written to conf9.json. The mos.yml setting would get changed if I flashed.
With the addition of second device I am using OTA update instead of flash to write new config without overwriting the stuff in conf9.json, but I need to recompile the firmware with a new conf8.json to match the device I want to OTA update.
The only idea I have that I’d like to test is having a file on each device that contains some unique info that is read at boot, but I haven’t tested yet it this would get wiped on boot or OTA update.
Any suggestions on how this should be done?