It's only 2 weeks I play with RPI and node-red.
I built 2 usefull, for me, workflows; both send data to dashboard. For me, historic data (last 2-3 days) is someway important.
Today, only today, I discovered than restarting node-red service wiped out all data from dashboard
My fault, of course. For some reasons, I expected than dashboard could handle persistance of data automatically.
So ... is it true? Dashboard is not saving and restoring data automatically? Just to be sure ...
If yes, is influxdb + grafana the best practice (i must run on RPi2 model b for now) ?
I don't use dashboard all that much, and whilst I stand to be corrected - I think that is true, DB does not persist data on it's own, so you need to develop a mechanism to do so.
example: store values in some database / file so you can then use it to restore the state of the graphs when Node RED / flows restarts using an
inject to trigger after 1s to read the stored values and send them into the dashboard restoring its state
Here is one example by @dceejay
You could also use the
flow context stores, as long as Node RED is set to use the file system
Another solution, which I use for charts:
A node-red node to persist data between Node Red deploys and restarts.
EDIT: You need to trigger the "Persist Out" node with a inject node.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.