2024-02-16 10:34:23 +01:00
|
|
|
create or replace view badesee_temperature_v as
|
|
|
|
select time,
|
|
|
|
cast(values->'Temp_Red'->>'value' as float) as Temp1,
|
|
|
|
cast(values->'Temp_White'->>'value' as float) as Temp2,
|
|
|
|
cast(values->'Temp_Black'->>'value' as float) as Temp3,
|
|
|
|
cast(values->'Battery'->>'value' as float) as battery,
|
|
|
|
attributes->>'Status' as status,
|
|
|
|
device
|
|
|
|
from measurements
|
|
|
|
where application = 'de-hottis-saerbeck-monitoring' and
|
|
|
|
device = 'eui-a84041318187ec13';
|
2024-07-12 15:42:38 +02:00
|
|
|
|
2024-11-11 12:45:47 +01:00
|
|
|
create or replace view cubecell_threeway_temperature2_v as
|
2024-07-12 15:42:38 +02:00
|
|
|
select time,
|
2024-11-11 12:45:47 +01:00
|
|
|
cast(values->'Temperature2'->>'value' as float) as value,
|
|
|
|
values->'Temperature2'->>'label' as label
|
2024-07-12 15:42:38 +02:00
|
|
|
from measurements
|
|
|
|
where application = 'de-hottis-saerbeck-monitoring' and
|
|
|
|
device = 'eui-70b3d57ed0068fa4';
|
|
|
|
|
2024-11-11 12:45:47 +01:00
|
|
|
create or replace view cubecell_threeway_temperature1_v as
|
|
|
|
select time,
|
|
|
|
cast(values->'Temperature1'->>'value' as float) as value,
|
|
|
|
values->'Temperature1'->>'label' as label
|
|
|
|
from measurements
|
|
|
|
where application = 'de-hottis-saerbeck-monitoring' and
|
|
|
|
device = 'eui-70b3d57ed0068fa4';
|
|
|
|
|
|
|
|
create or replace view cubecell_threeway_temperature3_v as
|
|
|
|
select time,
|
|
|
|
cast(values->'Temperature3'->>'value' as float) as value,
|
|
|
|
values->'Temperature3'->>'label' as label
|
|
|
|
from measurements
|
|
|
|
where application = 'de-hottis-saerbeck-monitoring' and
|
|
|
|
device = 'eui-70b3d57ed0068fa4';
|
2024-07-12 15:42:38 +02:00
|
|
|
|
2024-11-11 12:45:47 +01:00
|
|
|
create or replace view cubecell_threeway_battery_v as
|
|
|
|
select time,
|
|
|
|
cast(values->'Battery'->>'value' as float) as value,
|
|
|
|
values->'Battery'->>'label' as label
|
|
|
|
from measurements
|
|
|
|
where application = 'de-hottis-saerbeck-monitoring' and
|
|
|
|
device = 'eui-70b3d57ed0068fa4';
|
2025-02-03 14:21:41 +01:00
|
|
|
|