OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Import and Export settings via api › Reply To: Import and Export settings via api
Ray
From firmware 2.1.9, the original nvm.dat has been split into individual data files (integer options, string options, programs, station data etc.). This makes it possible to expand each separately without being constrained into a single file. Previously nvm.dat is designed to match the exact format of ATmega1284’s EEPROM, which is only 4K in size. So every time we want to expand something, like the number of programs, some other data size has to reduce to make room for this. Now they are all in their own files stored in SD card or flash memory, so it’s no longer constrained by the 4K size.
At the moment, the best way is to export configurations from time to time. If you use script, you can simply export configurations by issuing a:
http://x.x.x.x/ja?pw=yyy
where x.x.x.x is your controller’s IP address, yyy is the MD5 checsum of your password. This will return all settings in one json, and that’s essentially what the UI does.
Then use the UI to import — there is currently no API support for importing all configurations at once, but the UI will read the file (i.e. the output of /ja) and parse it into individual commands (/co, /cp, /cn etc.) and send those to the controller. In the future I agree that we can add an API, something like /ca to allow importing all settings through one command.