Skip to content

Commit

Permalink
#145 last values harvesting InfluxDB for AirSensEUR
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Oct 17, 2018
1 parent 982ecfc commit 56a981f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/schema/db-schema-last.sql
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ CREATE VIEW smartem_rt.v_cur_measurements AS
SELECT gid, unique_id, device_id, device_name, device_meta, sensor_meta,label, unit,
name, value_raw, value_stale, time AS sample_time, value, point, altitude,
ST_X(point) as lon, ST_Y(point) as lat, EXTRACT(epoch from time ) AS timestamp
FROM smartem_rt.last_device_output WHERE value_stale = 0 AND time > now() - interval '15 minutes' ORDER BY device_id ASC;
FROM smartem_rt.last_device_output WHERE value_stale = 0 AND time > now() - interval '120 minutes' ORDER BY device_id ASC;

-- Current Measurements per Component
DROP VIEW IF EXISTS smartem_rt.v_cur_measurements_CO2;
Expand Down

0 comments on commit 56a981f

Please sign in to comment.