Acces bucket from device

Hi guys,

Someone has figured it out how to make a call to a bucket from a device?

I mean, for example, if I have an acumulator, and storing it in a bucket, if the device resets, I want that it calls the last bucket value and keep counting since that value.

Thanks in advance, successes in this new year :wink:

Hi @ega, finally we are working on a new feature, that will be useful for this use case. Devices will be able to store/read config from the cloud with just a command. Hope we can release it soon! :wink:

Is that feature released or yet to be released. Cause i have the same issue in my instance. When the device resets, i need the device resources to be loaded from the data bucket created. Hope the feature is finished.

It can be done by the rest api

Here is a tutorial how to do it

Hope this helps.

I did not do it in a bucket, but on device properties.
in setup:
pson persistance;
thing.get_property(“persistance”, persistance);
currentInt = persistance[“currentInt”];
nCurrent = persistance[“nCurrent”];;
AhBat[27] = persistance[“Ah/hour”];
AhBat[26] = persistance[“Ah/yesterday”];
voltageDelta = persistance[“voltageDelta”];
voltageAt4h = persistance[“voltageAt4h”];
internal_resistance = persistance[“resistance”];

Later in Loop, all 10 minutes:
pson persistance;
persistance[“currentInt”] = currentInt ;
persistance[“nCurrent”] = nCurrent;
persistance[“Ah/hour”] = AhBat[27];
persistance[“Ah/yesterday”] = AhBat[26];
persistance[“voltageDelta”] = voltageDelta;
persistance[“voltageAt4h”] = voltageAt4h;
persistance[“resistance”] = internal_resistance;
thing.set_property(“persistance”, persistance, true);

Here you are…