rdmtc / node-red-contrib-ccu

Node-RED Nodes for the Homematic CCU
https://flows.nodered.org/node/node-red-contrib-ccu
MIT License
71 stars 13 forks source link

Possible to use "localfilesystem" for Context Store #114

Open dewenni opened 4 years ago

dewenni commented 4 years ago

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"  
         },  
      },
Hypnos3 commented 4 years ago

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.

dewenni commented 4 years ago

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

dewenni commented 4 years ago

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!