Low write or not low write that’s the question?

I’ve just installed Emoncms (the “normal” version,) to my raspberry 3 following the instruction on emoncms/readme.md at master · emoncms/emoncms · GitHub and since I’m planning to use it mostly for temp logging using 50-60 Dallas DS18b20 sensors.
I wonder how long the sd card will hold given the fact that I am posting once a minute from node red to emoncms(localhost) configured as:
Input fixed interval PHPFINA 60s

Are you asking how many years worth of data will be able to be recorded before the SD card becomes full.

Or how long it will keep functioning before there is SD card corruption?

Putting a pi into low write mode is purely to protect the SD card, and has nothing to do with what it can hold.

First of all, thanks for taking the time for a replay Paul.

I am asking how long the sd card will be functional before it got corrupt.

Since as far as I know (and is not much) Node Red post data asynchronously and given 50-60 sensors post data at different time intervals what happens to the data once it comes to emoncms?
let’s say that Node Red sends sensor data every 5s (which is not the case) and the input is configured to log 60s. Which data point is taken? And does this setup affects the sd card longevity?

and something else that happened after power loss which upset only the local installation, any ideas?


That depends upon a number of factors including;

  • The number of writes made to the SD Card
  • Is the power supply likely to be interrupted?
  • The quality of the SD card
  • Luck!!

That depends upon the type of feed selected, with Fixed interval feeds, it will record the last received input value. So in your example, it will ignore 11 of the 12 inputs, and just record the 12th.
Compare with phptimeseries which also records a timestamp, so every input is recorded despite when it is received.
More about this in the learning section.

If you put emoncms into Redis low write mode, it will cache the feed data in RAM, and at a set interval will batch write the data to your feeds. By default, it’s set to 10 minutes, but that can be altered in settings.
This would significantly extend your SD card’s life, but the emonpi image file is specifically written to reduce other things such as stopping logs and other disk activity, and make the system root, read only.

As for your power loss issue - no idea, it may be that the system collapsed before that final datapoint was sent to emoncms.org.
It’s a unknown situation and we would be just guessing.

Paul