From 0212f6c8fe3805c3dac3fe4058626f5f41052358 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Tue, 2 Jan 2024 10:18:33 +0100 Subject: [PATCH] Move over to separate blueprints per source --- blueprints/sc_air_api.json | 264 +++++++++++++++++++ blueprints/{sc_air.json => sc_air_file.json} | 19 +- 2 files changed, 265 insertions(+), 18 deletions(-) create mode 100644 blueprints/sc_air_api.json rename blueprints/{sc_air.json => sc_air_file.json} (95%) diff --git a/blueprints/sc_air_api.json b/blueprints/sc_air_api.json new file mode 100644 index 00000000..314f1be2 --- /dev/null +++ b/blueprints/sc_air_api.json @@ -0,0 +1,264 @@ +{ + "meta": { + "documentation": "https://docs.smartcitizen.me/" + }, + "metrics": [ + { + "name": "PT1000_POS", + "description": "PT1000 raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "ASPT1000", + "description": "PT1000 temperature calculation in AFE", + "id": null, + "kwargs": { + "pt1000minus": null, + "pt1000plus": null, + "afe_id": null + }, + "post": false, + "function": "alphasense_pt1000", + "unit": "degC" + }, + { + "name": "EC_SENSOR_TEMP", + "description": "Electrochemical sensor temperature", + "id": null, + "kwargs": { + "priority": "ASPT1000" + }, + "post": false, + "function": "ec_sensor_temp", + "unit": "degC" + }, + { + "name": "CO_WE", + "description": "CO working electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "CO_AE", + "description": "CO auxiliary electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "NO2_WE", + "description": "NO2 working electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "NO2_AE", + "description": "NO2 auxiliary electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "NO_WE", + "description": "NO working electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "NO_AE", + "description": "NO auxiliary electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "SO2_WE", + "description": "SO2 working electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "SO2_AE", + "description": "SO2 auxiliary electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "H2S_WE", + "description": "H2S working electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "H2S_AE", + "description": "H2S auxiliary electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "OX_WE", + "description": "OX working electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name": "OX_AE", + "description": "OX auxiliary electrode raw value", + "id": null, + "kwargs": { + "channel": null + }, + "post": false, + "function": "channel_names", + "unit": "V" + }, + { + "name":"CO", + "description": "Calculation of CO based on AAN 803-04", + "id": 152, + "kwargs": { + "ae": null, + "alphasense_id": null, + "t": "EC_SENSOR_TEMP", + "we": null + }, + "post": true, + "function": "alphasense_803_04", + "unit": "ppb" + }, + { + "name":"NO2", + "description": "Calculation of NO2 based on AAN 803-04", + "id": 153, + "kwargs": { + "ae": null, + "alphasense_id": null, + "t": "EC_SENSOR_TEMP", + "we": null + }, + "post": true, + "function": "alphasense_803_04", + "unit": "ppb" + }, + { + "name":"O3", + "description": "Calculation of O3 based on AAN 803-04", + "id": 157, + "kwargs": { + "ae": null, + "alphasense_id": null, + "t": "EC_SENSOR_TEMP", + "we": null + }, + "post": true, + "function": "alphasense_803_04", + "unit": "ppb" + }, + { + "name":"SO2", + "description": "Calculation of SO2 based on AAN 803-04", + "id": 155, + "kwargs": { + "ae": null, + "alphasense_id": null, + "t": "EC_SENSOR_TEMP", + "we": null, + "use_alternative": true + }, + "post": true, + "function": "alphasense_803_04", + "unit": "ppb" + }, +{ + "name": "NO", + "description": "Calculation of NO based on AAN 803-04", + "id": 154, + "kwargs": { + "ae": null, + "alphasense_id": null, + "t": "EC_SENSOR_TEMP", + "we": null + }, + "post": true, + "function": "alphasense_803_04", + "unit": "ppb" + }, + { + "name": "H2S", + "description": "Calculation of H2S based on AAN 803-04", + "id": 156, + "kwargs": { + "ae": null, + "alphasense_id": null, + "t": "EC_SENSOR_TEMP", + "we": null + }, + "post": true, + "function": "alphasense_803_04", + "unit": "ppb" + } + ], + "source":{ + "type": "api", + "handler": "SCDevice", + "module": "smartcitizen_connector" + } +} diff --git a/blueprints/sc_air.json b/blueprints/sc_air_file.json similarity index 95% rename from blueprints/sc_air.json rename to blueprints/sc_air_file.json index 954be2e5..b1831fb6 100644 --- a/blueprints/sc_air.json +++ b/blueprints/sc_air_file.json @@ -1,17 +1,7 @@ { "meta": { - "timezone": null, "documentation": "https://docs.smartcitizen.me/" }, - "params": { - "id": null, - "clean_na": null, - "frequency": null, - "max_date": null, - "min_date": null, - "resample": false - }, - "source": null, "metrics": [ { "name": "PT1000_POS", @@ -266,13 +256,7 @@ "unit": "ppb" } ], - "sources": [ - { - "type": "api", - "handler": "SCDevice", - "module": "smartcitizen_connector" - }, - { + "source": { "type": "csv", "module": "scdata.io.csv", "handler": "csv_handler", @@ -291,5 +275,4 @@ "raw-data-file": null } } - ] }