diff --git a/packages/api/lib/controllers/boxesController.js b/packages/api/lib/controllers/boxesController.js index 470ace31..9b8f3e7f 100644 --- a/packages/api/lib/controllers/boxesController.js +++ b/packages/api/lib/controllers/boxesController.js @@ -381,7 +381,7 @@ const getBox = async function getBox (req, res, next) { * @apiParam (RequestBody) {Location} location the coordinates of this senseBox. * @apiParam (RequestBody) {String="homeV2Lora","homeV2Ethernet","homeV2Wifi","homeEthernet","homeWifi","homeEthernetFeinstaub","homeWifiFeinstaub","luftdaten_sds011","luftdaten_sds011_dht11","luftdaten_sds011_dht22","luftdaten_sds011_bmp180","luftdaten_sds011_bme280","hackair_home_v2"} [model] specify the model if you want to use a predefined senseBox model, autocreating sensor definitions. * @apiParam (RequestBody) {Sensor[]} [sensors] an array containing the sensors of this senseBox. Only use if `model` is unspecified. - * @apiParam (RequestBody) {String="hdc1080","bmp280","tsl45315","veml6070","sds011","bme680","smt50","soundlevelmeter", "windspeed"} [sensorTemplates] Specify which sensors should be included. + * @apiParam (RequestBody) {String="hdc1080","bmp280","tsl45315","veml6070","sds011","bme680","smt50","soundlevelmeter", "windspeed", "scd30"} [sensorTemplates] Specify which sensors should be included. * @apiParam (RequestBody) {Object} [mqtt] specify parameters of the MQTT integration for external measurement upload. Please see below for the accepted parameters * @apiParam (RequestBody) {Object} [ttn] specify parameters for the TTN integration for measurement from TheThingsNetwork.org upload. Please see below for the accepted parameters * @apiParam (RequestBody) {Boolean="true","false"} [useAuth] whether to use access_token or not for authentication @@ -541,7 +541,7 @@ module.exports = { { name: 'exposure', allowedValues: Box.BOX_VALID_EXPOSURES }, { name: 'model', allowedValues: Box.BOX_VALID_MODELS }, { name: 'sensors', dataType: ['object'] }, - { name: 'sensorTemplates', dataType: ['String'], allowedValues: ['hdc1080', 'bmp280', 'sds 011', 'tsl45315', 'veml6070', 'bme680', 'smt50', 'soundlevelmeter', 'windspeed'] }, + { name: 'sensorTemplates', dataType: ['String'], allowedValues: ['hdc1080', 'bmp280', 'sds 011', 'tsl45315', 'veml6070', 'bme680', 'smt50', 'soundlevelmeter', 'windspeed', 'scd30'] }, { name: 'serialPort', dataType: 'String', defaultValue: 'Serial1', allowedValues: ['Serial1', 'Serial2'] }, { name: 'soilDigitalPort', dataType: 'String', defaultValue: 'A', allowedValues: ['A', 'B', 'C'] }, { name: 'soundMeterPort', dataType: 'String', defaultValue: 'B', allowedValues: ['A', 'B', 'C'] }, diff --git a/packages/api/package.json b/packages/api/package.json index 3b18813b..230d5206 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -10,7 +10,7 @@ "Norwin Roosen" ], "dependencies": { - "@sensebox/opensensemap-api-models": "^0.0.26-beta.0", + "@sensebox/opensensemap-api-models": "^0.0.26", "@turf/area": "^6.0.1", "@turf/bbox": "^6.0.1", "@turf/centroid": "^6.0.2", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index a7fd73cb..6d98f760 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +## v0.0.26 +- Update @sensebox/node-sketch-templater to v1.8.3 + +## v0.0.26-beta.2 + +## v0.0.26-beta.1 + ## v0.0.26-beta.0 - Authorization diff --git a/packages/models/package.json b/packages/models/package.json index d6140885..064755d1 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,12 +1,12 @@ { "name": "@sensebox/opensensemap-api-models", "description": "openSenseMap data models and database connection", - "version": "0.0.26-beta.0", + "version": "0.0.26", "main": "index.js", "license": "MIT", "dependencies": { "@sensebox/osem-protos": "^1.1.0", - "@sensebox/sketch-templater": "^1.8.3-beta.0", + "@sensebox/sketch-templater": "^1.8.3", "bcrypt": "^5.0.0", "bunyan": "^1.8.14", "config": "^3.3.2", diff --git a/packages/models/src/box/sensorLayouts/sensebox.home.mcu.js b/packages/models/src/box/sensorLayouts/sensebox.home.mcu.js index d34818ea..c89f0c49 100644 --- a/packages/models/src/box/sensorLayouts/sensebox.home.mcu.js +++ b/packages/models/src/box/sensorLayouts/sensebox.home.mcu.js @@ -17,7 +17,8 @@ const { smt50_soilmoisture, smt50_soiltemperature, soundlevelmeter, - windspeed + windspeed, + scd30_co2 } = sensorDefinitions; module.exports = [ @@ -35,5 +36,6 @@ module.exports = [ smt50_soilmoisture, smt50_soiltemperature, soundlevelmeter, - windspeed + windspeed, + scd30_co2 ]; diff --git a/packages/models/src/box/sensorLayouts/sensorDefinitions/index.js b/packages/models/src/box/sensorLayouts/sensorDefinitions/index.js index 7f616047..a23253a3 100644 --- a/packages/models/src/box/sensorLayouts/sensorDefinitions/index.js +++ b/packages/models/src/box/sensorLayouts/sensorDefinitions/index.js @@ -39,7 +39,8 @@ const veml6070_uvintensity = require('./veml6070_uvintensity'), smt50_soilmoisture = require('./smt50_soilmoisture'), smt50_soiltemperature = require('./smt50_soiltemperature'), soundlevelmeter = require('./soundlevelmeter'), - windspeed = require('./windspeed'); + windspeed = require('./windspeed'), + scd30_co2 = require('./scd30_co2') module.exports = { hdc1008_temperature, @@ -81,5 +82,6 @@ module.exports = { smt50_soilmoisture, smt50_soiltemperature, soundlevelmeter, - windspeed + windspeed, + scd30_co2 }; diff --git a/packages/models/src/box/sensorLayouts/sensorDefinitions/scd30_co2.js b/packages/models/src/box/sensorLayouts/sensorDefinitions/scd30_co2.js new file mode 100644 index 00000000..2bd0c814 --- /dev/null +++ b/packages/models/src/box/sensorLayouts/sensorDefinitions/scd30_co2.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = { + title: 'CO₂', + unit: 'ppm', + sensorType: 'SCD30', + icon: 'osem-co2' +}; diff --git a/yarn.lock b/yarn.lock index 3c5ba467..7f52a3ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -42,10 +42,10 @@ resolved "https://registry.yarnpkg.com/@sensebox/osem-protos/-/osem-protos-1.1.0.tgz#a7de8bc6be867953f1309181a012063c23299e79" integrity sha512-H+nUVcWlT0dvIqfJnYHuX9JBcCkP1ZKGE5YTRNWPbAEdZ11h+srpQsmeI58wK5hJcdukaZAjc4Dy96IeGM77aA== -"@sensebox/sketch-templater@^1.8.3-beta.0": - version "1.8.3-beta.0" - resolved "https://registry.yarnpkg.com/@sensebox/sketch-templater/-/sketch-templater-1.8.3-beta.0.tgz#7eccf67469725741dc4a55fcf43f872dd37e1409" - integrity sha512-nsVkMmqr6tDJ4x48qiLyFOAJL1LLhavtg5dksqJa7qeFXQ2AHMmUC8uiU9r2PstANFDDRUDqFZ2rN69rl+NYog== +"@sensebox/sketch-templater@^1.8.3": + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sensebox/sketch-templater/-/sketch-templater-1.8.3.tgz#16fe48afdd2e472ab443e5d21890b59ec8701cd9" + integrity sha512-oKKgv6foFzoiTcyCeZEnycOshyE5owh8Xsjk3a0YuhfG+pLwd9EN4maV7jW6IPcmtSXtaTEICoB+H9K7DiAyLQ== dependencies: config "^1.29.2" dedent "^0.7.0" @@ -3274,7 +3274,7 @@ simple-statistics@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/simple-statistics/-/simple-statistics-7.3.1.tgz#12cac547a075ed718662eabf427894ec6a3a0396" integrity sha512-8RktUtizYSzj8vRIvEF8jpHiUcRz3MW/2pppzm0emrEQ3JaV10Kp0DCn4zj4QOCLL4pe/QQ03g88Oy+UbyNSqQ== - + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"