I have some problems saving some configuration/values
Build: ESPEasy_v2.0.0-dev12
In a custom devices plugin when a command (http://ip/control?cmd=rgb,off) is received I try to save a value to retain it when the ESP is powered off.
Code: Select all
Settings.TaskDevicePluginConfigLong[event->TaskIndex][2] = rgbvalue;
Code: Select all
Serial.println(Settings.TaskDevicePluginConfigLong[event->TaskIndex][2]);
But when powered back on and I try to restore the value in the "PLUGIN_INIT", it is always zero
Code: Select all
case PLUGIN_INIT:
{
LoadTaskSettings(event->TaskIndex);
Serial.println(Settings.TaskDevicePluginConfigLong[event->TaskIndex][2]);
rgbvalue = Settings.TaskDevicePluginConfigLong[event->TaskIndex][2];
...
success = true;
break;
}
I also tried to add SaveTaskSettings, but the value is still not saved...
Code: Select all
Settings.TaskDevicePluginConfigLong[event->TaskIndex][2] = rgbvalue;
SaveTaskSettings(event->TaskIndex);
regards
raihei