node-red-contrib-ccu icon indicating copy to clipboard operation
node-red-contrib-ccu copied to clipboard

Possible to use "localfilesystem" for Context Store

Open dewenni opened this issue 4 years ago • 3 comments

I have a question regarding context storage.

The context store is needed to store the state of datapoints, right? For example to get information lc (last change)

In the CCU Node properties it is only possible to use memory as Context Store image

If the context store is set to memory, the states get lost by any deploy or restart of node-red, right?

In fact of that, is it possible to use localfilesystem for context storage?

in node-red settings.js have configured:

// The following property can be used to enable context storage. The configuration    
// provided here will enable file-based context that flushes to disk every 30 seconds. 
// Refer to the documentation for further options: https://nodered.org/docs/api/context/  
      contextStorage: {  
          default: {  
              module:"localfilesystem"  
         },  
      },

dewenni avatar Apr 17 '20 13:04 dewenni

You can configure in the RedMatic Config screen that the default points to the filesystem. (see RedMatic Wiki).

Then you have the possibility to select the store there.

If you are not using RedMatic, I don't know.

Hypnos3 avatar Apr 17 '20 14:04 Hypnos3

sorry, I forgot to mention, that I'm using Node-Red only

dewenni avatar Apr 17 '20 16:04 dewenni

Sorry, if I'm confusing, but now it is possible to set the Context Storage to default 2 days ago it was not possible. Also not after several restarts of node-red.

image

my settings are still:

contextStorage: {  
     default: {  
              module:"localfilesystem"  
     },  
},

and it seems that the status of all CCU data points are stored here:

image

but after a re-deploy in node-red, all the lc Timestamps are still resetted to actual Date and Time.

@hobbyquaker Does the CCU-Node resets all status during restart independently from the storage type? What should be the behavior of the lc timestamps depending the context storage?

thanks a lot!

dewenni avatar Apr 19 '20 07:04 dewenni