I am wondering how to read a configuration dataset for a device and to know when it has been successfully used to set an EEPROM based struct with settings.
I have tried to use a key "VER" which is initially set to 1 and then have the device update this to 0 once it has read the configuration settings.
If I set VER to 0 like this
void setValueDone()
{
Variant data;
Log.info("setValueDone");
data.set("VER",0);
cloudconfigurationtodevice.set(data);
}
I get an error
[wiring] ERROR: ledger_open() failed: -2003
Now wonder if this is because Cloud to device ledgers cannot be written to!
Are there any other ways to flag that the Ledger data has been used?