It's gotta be three settings--one is telling the plugin how often to save data to the file (Refresh Interval) and the other two are telling the plugin how much data to keep in the file (Observations, Duration). If you set the Duration value to 0 (zero), then the plugin will ignore the age of the CSV data and only limit it by the Observations value. Maybe an example would help.
Save a Value Once Per Day - Say you wanted to keep track of a device's battery level over time. You probably wouldn't need to save an observation more often than once per day. To set the CSV Engine device to save one observation once per day, we need to set the Refresh Interval value to the number of seconds in a day. 24 hours (in a day) times 60 minutes (in an hour) times 60 seconds (in a minute) or 24 x 60 x 60 = 86,400. Google has a handy tool to do the math (just Google 'how many seconds in a day').
- Screen Shot 2019-03-23 at 11.52.27 AM.png (19.53 KiB) Viewed 4055 times
This will result in 300 daily observations in the file:
Observations: 300 (never keep more than 300 observations in the file)
Duration: 0 (ignore the age of the data in the file)
Refresh Interval 86,400 (save an observation every day)
This will result in observations only for the last 72 hours (the data will never exceed 72 observations because it's limited by the Duration Value):
Observations: 300
Duration: 72 (hours)
Refresh Interval: 86,400 (seconds)
This will result in 300 observations being saved (the data will never reach 72 hours because there are 1,440 minutes in a day):
Observations: 300
Duration: 72 (hours)
Refresh Interval: 60 (seconds)
Refresh Interval: 86,400 = once per day (60 x 60 x 24)
Refresh Interval: 3,600 = once per hour (60 x 60)
Refresh Interval: 900 = every 15 minutes (60 seconds x 15)
Refresh Interval: 60 = once per minute (60 seconds)