Browse Source

Allow faster sensor reading intervals, down to 1 second (#848)

sonoffsc
Xose Pérez 6 years ago
parent
commit
5f4bfe3782
6 changed files with 4307 additions and 4290 deletions
  1. +2
    -2
      code/espurna/config/sensors.h
  2. BIN
      code/espurna/data/index.all.html.gz
  3. BIN
      code/espurna/data/index.sensor.html.gz
  4. +2354
    -2349
      code/espurna/static/index.all.html.gz.h
  5. +1942
    -1937
      code/espurna/static/index.sensor.html.gz.h
  6. +9
    -2
      code/html/index.html

+ 2
- 2
code/espurna/config/sensors.h View File

@ -5,13 +5,13 @@
#define SENSOR_DEBUG 0 // Debug sensors
#define SENSOR_READ_INTERVAL 6 // Read data from sensors every 6 seconds
#define SENSOR_READ_MIN_INTERVAL 6 // Minimum read interval
#define SENSOR_READ_MIN_INTERVAL 1 // Minimum read interval
#define SENSOR_READ_MAX_INTERVAL 3600 // Maximum read interval
#define SENSOR_INIT_INTERVAL 10000 // Try to re-init non-ready sensors every 10s
#define SENSOR_REPORT_EVERY 10 // Report every this many readings
#define SENSOR_REPORT_MIN_EVERY 1 // Minimum every value
#define SENSOR_REPORT_MAX_EVERY 12 // Maximum
#define SENSOR_REPORT_MAX_EVERY 60 // Maximum
#define SENSOR_USE_INDEX 0 // Use the index in topic (i.e. temperature/0)
// even if just one sensor (0 for backwards compatibility)


BIN
code/espurna/data/index.all.html.gz View File


BIN
code/espurna/data/index.sensor.html.gz View File


+ 2354
- 2349
code/espurna/static/index.all.html.gz.h
File diff suppressed because it is too large
View File


+ 1942
- 1937
code/espurna/static/index.sensor.html.gz.h
File diff suppressed because it is too large
View File


+ 9
- 2
code/html/index.html View File

@ -1159,23 +1159,30 @@
<div class="pure-g">
<label class="pure-u-1 pure-u-lg-1-4">Read interval</label>
<select class="pure-u-1 pure-u-lg-1-4" name="snsRead">
<option value="1">1 second</option>
<option value="6">6 seconds</option>
<option value="10">10 seconds</option>
<option value="15">15 seconds</option>
<option value="30">30 seconds</option>
<option value="60">1 minute</option>
<option value="300">5 minutes</option>
<option value="600">10 minutes</option>
<option value="900">15 minutes</option>
<option value="1800">30 minutes</option>
<option value="3600">60 minutes</option>
</select>
<div class="pure-u-0 pure-u-lg-1-2"></div>
<div class="pure-u-0 pure-u-lg-1-4"></div>
<div class="pure-u-1 pure-u-lg-3-4 hint">
Select the interval between readings. These will be filtered and averaged for the report. The default and recommended value is 6 seconds.
Select the interval between readings. These will be filtered and averaged for the report.
Please mind some sensors do not have fast refresh intervals. Check the sensor datasheet to know the minimum read interval.
The default and recommended value is 6 seconds.
</div>
</div>
<div class="pure-g">
<label class="pure-u-1 pure-u-lg-1-4">Report every</label>
<div class="pure-u-1 pure-u-lg-1-4"><input name="snsReport" class="pure-u-1" type="number" min="1" step="1" max="12" /></div>
<div class="pure-u-1 pure-u-lg-1-4"><input name="snsReport" class="pure-u-1" type="number" min="1" step="1" max="60" /></div>
<div class="pure-u-0 pure-u-lg-1-2"></div>
<div class="pure-u-0 pure-u-lg-1-4"></div>
<div class="pure-u-1 pure-u-lg-3-4 hint">


Loading…
Cancel
Save