diff --git a/schema.json b/schema.json index dd9b6b83ae..e7686ec901 100644 --- a/schema.json +++ b/schema.json @@ -972,6 +972,7 @@ "radar", "rainfall", "rssi", + "sap flow", "smart valve", "snr", "so2", diff --git a/vendor/decentlab/dl-blg-codec.yaml b/vendor/decentlab/dl-blg-codec.yaml new file mode 100644 index 0000000000..f1d849508c --- /dev/null +++ b/vendor/decentlab/dl-blg-codec.yaml @@ -0,0 +1,76 @@ +uplinkDecoder: + fileName: dl-blg.js + examples: + - description: Example 1 + input: + fPort: 1 + bytes: [0x02, 0x30, 0xc5, 0x00, 0x03, 0xa4, 0x0c, 0x00, 0x81, 0x0c, 0x60] + output: + data: + battery_voltage: + displayName: Battery voltage + unit: V + value: 3.168 + device_id: 12485 + protocol_version: 2 + temperature: + displayName: Temperature + unit: "\xB0C" + value: 22.028848392450755 + thermistor_resistance: + displayName: Thermistor resistance + unit: "\u03A9" + value: 115020.68221552655 + voltage_ratio: + displayName: Voltage ratio + value: 0.006409406661987305 + - description: Example 2 + input: + fPort: 1 + bytes: [0x02, 0x30, 0xc5, 0x00, 0x02, 0x0c, 0x60] + output: + data: + battery_voltage: + displayName: Battery voltage + unit: V + value: 3.168 + device_id: 12485 + protocol_version: 2 + +downlinkEncoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 3600 seconds and save + input: + data: + command: set period + save + parameter: 3600 + output: + bytes: [0, 2, 14, 16, 72, 164] + fPort: 1 + - description: Set ADR off + input: + data: + command: set adr off + output: + bytes: [0, 7, 0, 0, 229, 177] + fPort: 1 + +downlinkDecoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 600 seconds + input: + fPort: 1 + bytes: [0x00, 0x01, 0x02, 0x58, 0x7E, 0x51] + output: + data: + command: set period + parameter: 600 + - description: Reset + input: + fPort: 1 + bytes: [0xFE, 0xFE, 0x00, 0x00, 0x3C, 0x50] + output: + data: + command: reset diff --git a/vendor/decentlab/dl-blg.js b/vendor/decentlab/dl-blg.js new file mode 100644 index 0000000000..609e1880fe --- /dev/null +++ b/vendor/decentlab/dl-blg.js @@ -0,0 +1,84 @@ +var decentlab_decoder = { + PROTOCOL_VERSION: 2, + SENSORS: [ + {length: 2, + values: [{name: 'voltage_ratio', + displayName: 'Voltage ratio', + convert: function (x) { return ((x[0] + x[1]*65536) / 8388608 - 1) / 2; }}, + {name: 'thermistor_resistance', + displayName: 'Thermistor resistance', + convert: function (x) { return 1000 / (((x[0] + x[1]*65536) / 8388608 - 1) / 2) - 41000; }, + unit: 'Ω'}, + {name: 'temperature', + displayName: 'Temperature', + convert: function (x) { return (1 / (0.0008271111 + 0.000208802 * Math.log(1000 / (((x[0] + x[1]*65536) / 8388608 - 1) / 2) - 41000) + 0.000000080592 * Math.pow(Math.log(1000 / (((x[0] + x[1]*65536) / 8388608 - 1) / 2) - 41000), 3) )) - 273.15; }, + unit: '°C'}]}, + {length: 1, + values: [{name: 'battery_voltage', + displayName: 'Battery voltage', + convert: function (x) { return x[0] / 1000; }, + unit: 'V'}]} + ], + + read_int: function (bytes, pos) { + return (bytes[pos] << 8) + bytes[pos + 1]; + }, + + decode: function (msg) { + var bytes = msg; + var i, j; + if (typeof msg === 'string') { + bytes = []; + for (i = 0; i < msg.length; i += 2) { + bytes.push(parseInt(msg.substring(i, i + 2), 16)); + } + } + + var version = bytes[0]; + if (version != this.PROTOCOL_VERSION) { + return {error: "protocol version " + version + " doesn't match v2"}; + } + + var deviceId = this.read_int(bytes, 1); + var flags = this.read_int(bytes, 3); + var result = {'protocol_version': version, 'device_id': deviceId}; + // decode payload + var pos = 5; + for (i = 0; i < this.SENSORS.length; i++, flags >>= 1) { + if ((flags & 1) !== 1) + continue; + + var sensor = this.SENSORS[i]; + var x = []; + // convert data to 16-bit integer array + for (j = 0; j < sensor.length; j++) { + x.push(this.read_int(bytes, pos)); + pos += 2; + } + + // decode sensor values + for (j = 0; j < sensor.values.length; j++) { + var value = sensor.values[j]; + if ('convert' in value) { + result[value.name] = {displayName: value.displayName, + value: value.convert.bind(this)(x)}; + if ('unit' in value) + result[value.name]['unit'] = value.unit; + } + } + } + return result; + } +}; + +function decodeUplink(input) { + var res = decentlab_decoder.decode(input.bytes); + if (res.error) { + return { + errors: [res.error], + }; + } + return { + data: res, + }; +} diff --git a/vendor/decentlab/dl-blg.png b/vendor/decentlab/dl-blg.png new file mode 100644 index 0000000000..8fc5ee43b7 Binary files /dev/null and b/vendor/decentlab/dl-blg.png differ diff --git a/vendor/decentlab/dl-blg.yaml b/vendor/decentlab/dl-blg.yaml new file mode 100644 index 0000000000..3d385726f7 --- /dev/null +++ b/vendor/decentlab/dl-blg.yaml @@ -0,0 +1,89 @@ +name: DL-BLG +description: The Decentlab DL-BLG is equipped with a black globe temperature sensor. It is suitable for use in workplace safety, heat stress measurement, WBGT calculation for heat stress and meteorology. + +hardwareVersions: + - version: '1' + numeric: 1 + +firmwareVersions: + - version: 1.5.7 + numeric: 157 + hardwareVersions: + - '1' + profiles: + EU863-870: + id: profile-eu868 + lorawanCertified: true + codec: dl-blg-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: dl-blg-codec + US902-928: + id: profile-us915 + lorawanCertified: true + codec: dl-blg-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: dl-blg-codec + +sensors: + - temperature + - battery + +dimensions: + length: 135 + width: 81 + height: 70 + +weight: 720 + +battery: + replaceable: true + type: 2 C alkaline + +operatingConditions: + temperature: + min: -20 + max: 50 + relativeHumidity: + min: 0 + max: 1.0 + +ipCode: IP67 + +keyProvisioning: + - custom +keySecurity: none + +productURL: https://www.decentlab.com/black-globe-temperature-sensor-for-lorawan +dataSheetURL: https://cdn.decentlab.com/download/datasheets/Decentlab-DL-BLG-datasheet.pdf +photos: + main: dl-blg.png + +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 301 489-1 + version: 2.2.0 + - body: ETSI + norm: EN + standard: 301 489-3 + version: 2.1.1 + - body: ETSI + norm: EN + standard: 300 220-1 + version: 3.1.1 + - body: ETSI + norm: EN + standard: 300 220-2 + version: 3.1.1 + - body: IEC + norm: EN + standard: 62479:2010 diff --git a/vendor/decentlab/dl-cws-codec.yaml b/vendor/decentlab/dl-cws-codec.yaml new file mode 100644 index 0000000000..003432dfb6 --- /dev/null +++ b/vendor/decentlab/dl-cws-codec.yaml @@ -0,0 +1,89 @@ +uplinkDecoder: + fileName: dl-cws.js + examples: + - description: Example 1 + input: + fPort: 1 + bytes: [0x02, 0x46, 0x39, 0x00, 0x03, 0x8a, 0x77, 0x8a, 0x95, 0x97, 0x7a, 0x87, 0x4c, 0x80, 0x47, 0x8a, 0x5e, 0x0b, 0x74] + output: + data: + air_humidity: + displayName: Air humidity + unit: '%' + value: 60.1 + air_temperature: + displayName: Air temperature + unit: "\xB0C" + value: 27.09 + angle: + displayName: Angle + unit: "\xB0" + value: 71 + battery_voltage: + displayName: Battery voltage + unit: V + value: 2.932 + device_id: 17977 + dew_point: + displayName: Dew point + unit: "\xB0C" + value: 18.68 + protocol_version: 2 + sensor_temperature: + displayName: Sensor temperature + unit: "\xB0C" + value: 26.54 + surface_temperature: + displayName: Surface temperature + unit: "\xB0C" + value: 26.79 + - description: Example 2 + input: + fPort: 1 + bytes: [0x02, 0x46, 0x39, 0x00, 0x02, 0x0b, 0x74] + output: + data: + battery_voltage: + displayName: Battery voltage + unit: V + value: 2.932 + device_id: 17977 + protocol_version: 2 + +downlinkEncoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 3600 seconds and save + input: + data: + command: set period + save + parameter: 3600 + output: + bytes: [0, 2, 14, 16, 72, 164] + fPort: 1 + - description: Set ADR off + input: + data: + command: set adr off + output: + bytes: [0, 7, 0, 0, 229, 177] + fPort: 1 + +downlinkDecoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 600 seconds + input: + fPort: 1 + bytes: [0x00, 0x01, 0x02, 0x58, 0x7E, 0x51] + output: + data: + command: set period + parameter: 600 + - description: Reset + input: + fPort: 1 + bytes: [0xFE, 0xFE, 0x00, 0x00, 0x3C, 0x50] + output: + data: + command: reset diff --git a/vendor/decentlab/dl-cws.js b/vendor/decentlab/dl-cws.js new file mode 100644 index 0000000000..56899352be --- /dev/null +++ b/vendor/decentlab/dl-cws.js @@ -0,0 +1,100 @@ + +/* https://www.decentlab.com/support */ + +var decentlab_decoder = { + PROTOCOL_VERSION: 2, + SENSORS: [ + {length: 6, + values: [{name: 'surface_temperature', + displayName: 'Surface temperature', + convert: function (x) { return (x[0] - 32768) / 100; }, + unit: '°C'}, + {name: 'air_temperature', + displayName: 'Air temperature', + convert: function (x) { return (x[1] - 32768) / 100; }, + unit: '°C'}, + {name: 'air_humidity', + displayName: 'Air humidity', + convert: function (x) { return (x[2] - 32768) / 100; }, + unit: '%'}, + {name: 'dew_point', + displayName: 'Dew point', + convert: function (x) { return (x[3] - 32768) / 100; }, + unit: '°C'}, + {name: 'angle', + displayName: 'Angle', + convert: function (x) { return (x[4] - 32768); }, + unit: '°'}, + {name: 'sensor_temperature', + displayName: 'Sensor temperature', + convert: function (x) { return (x[5] - 32768) / 100; }, + unit: '°C'}]}, + {length: 1, + values: [{name: 'battery_voltage', + displayName: 'Battery voltage', + convert: function (x) { return x[0] / 1000; }, + unit: 'V'}]} + ], + + read_int: function (bytes, pos) { + return (bytes[pos] << 8) + bytes[pos + 1]; + }, + + decode: function (msg) { + var bytes = msg; + var i, j; + if (typeof msg === 'string') { + bytes = []; + for (i = 0; i < msg.length; i += 2) { + bytes.push(parseInt(msg.substring(i, i + 2), 16)); + } + } + + var version = bytes[0]; + if (version != this.PROTOCOL_VERSION) { + return {error: "protocol version " + version + " doesn't match v2"}; + } + + var deviceId = this.read_int(bytes, 1); + var flags = this.read_int(bytes, 3); + var result = {'protocol_version': version, 'device_id': deviceId}; + // decode payload + var pos = 5; + for (i = 0; i < this.SENSORS.length; i++, flags >>= 1) { + if ((flags & 1) !== 1) + continue; + + var sensor = this.SENSORS[i]; + var x = []; + // convert data to 16-bit integer array + for (j = 0; j < sensor.length; j++) { + x.push(this.read_int(bytes, pos)); + pos += 2; + } + + // decode sensor values + for (j = 0; j < sensor.values.length; j++) { + var value = sensor.values[j]; + if ('convert' in value) { + result[value.name] = {displayName: value.displayName, + value: value.convert.bind(this)(x)}; + if ('unit' in value) + result[value.name]['unit'] = value.unit; + } + } + } + return result; + } +}; + +function decodeUplink(input) { + var res = decentlab_decoder.decode(input.bytes); + if (res.error) { + return { + errors: [res.error], + }; + } + return { + data: res, + }; +} diff --git a/vendor/decentlab/dl-cws.png b/vendor/decentlab/dl-cws.png new file mode 100644 index 0000000000..b09d63b986 Binary files /dev/null and b/vendor/decentlab/dl-cws.png differ diff --git a/vendor/decentlab/dl-cws.yaml b/vendor/decentlab/dl-cws.yaml new file mode 100644 index 0000000000..3230e0157f --- /dev/null +++ b/vendor/decentlab/dl-cws.yaml @@ -0,0 +1,92 @@ +name: DL-CWS +description: The Decentlab DL-CWS includes a high-precision infrared pyrometer, temperature, humidity and dew point sensors. It is suitable for use in road weather information systems, winter road maintenance, frost alarming, ice alerting, and smart agriculture. + +hardwareVersions: + - version: '1' + numeric: 1 + +firmwareVersions: + - version: 1.5.7 + numeric: 157 + hardwareVersions: + - '1' + profiles: + EU863-870: + id: profile-eu868 + lorawanCertified: true + codec: dl-cws-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: dl-cws-codec + US902-928: + id: profile-us915 + lorawanCertified: true + codec: dl-cws-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: dl-cws-codec + +sensors: + - surface temperature + - tilt + - temperature + - humidity + - battery + +dimensions: + length: 135 + width: 81 + height: 70 + +weight: 1800 + +battery: + replaceable: true + type: 2 C alkaline + +operatingConditions: + temperature: + min: -20 + max: 50 + relativeHumidity: + min: 0 + max: 1.0 + +ipCode: IP67 + +keyProvisioning: + - custom +keySecurity: none + +productURL: https://www.decentlab.com/high-precision-winter-road-maintenance-sensor-for-lorawan +dataSheetURL: https://cdn.decentlab.com/download/datasheets/Decentlab-DL-CWS-datasheet.pdf +photos: + main: dl-cws.png + +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 301 489-1 + version: 2.2.0 + - body: ETSI + norm: EN + standard: 301 489-3 + version: 2.1.1 + - body: ETSI + norm: EN + standard: 300 220-1 + version: 3.1.1 + - body: ETSI + norm: EN + standard: 300 220-2 + version: 3.1.1 + - body: IEC + norm: EN + standard: 62479:2010 diff --git a/vendor/decentlab/dl-isf-codec.yaml b/vendor/decentlab/dl-isf-codec.yaml new file mode 100644 index 0000000000..9a821aa7e1 --- /dev/null +++ b/vendor/decentlab/dl-isf-codec.yaml @@ -0,0 +1,161 @@ +uplinkDecoder: + fileName: dl-isf.js + examples: + - description: Example 1 + input: + fPort: 1 + bytes: + [ + 0x02, + 0x3d, + 0x01, + 0x00, + 0x03, + 0x0c, + 0x29, + 0x0b, + 0xab, + 0x0c, + 0x3e, + 0x79, + 0x70, + 0x7a, + 0x1d, + 0x78, + 0x43, + 0x79, + 0x91, + 0x49, + 0x08, + 0x45, + 0x99, + 0x7e, + 0x4c, + 0xac, + 0xde, + 0xaa, + 0x6e, + 0x00, + 0x00, + 0x00, + 0x00, + 0x45, + 0x7e, + 0x41, + 0x5a, + 0x0b, + 0x59, + ] + output: + data: + alpha_inner: + displayName: Alpha (inner) + value: 0.00352 + alpha_outer: + displayName: Alpha (outer) + value: -0.05184 + battery_voltage: + displayName: Battery voltage + unit: V + value: 2.905 + beta_inner: + displayName: Beta (inner) + value: -0.04128 + beta_outer: + displayName: Beta (outer) + value: -0.14816 + device_id: 15617 + diagnostic: + displayName: Diagnostic + value: 0 + heat_velocity_inner: + displayName: Heat velocity (inner) + unit: "cm\u22C5h\u207B\xB9" + value: 0.144 + heat_velocity_outer: + displayName: Heat velocity (outer) + unit: "cm\u22C5h\u207B\xB9" + value: -2.208 + max_voltage: + displayName: Max voltage + unit: V + value: 11.486 + min_voltage: + displayName: Min voltage + unit: V + value: 10.862 + protocol_version: 2 + sap_flow: + displayName: Sap flow + unit: "l\u22C5h\u207B\xB9" + value: -0.192 + temperature_outer: + displayName: Temperature (outer) + unit: "\xB0C" + value: -4.36 + tmax_inner: + displayName: Tmax (inner) + unit: s + value: 35.634 + tmax_outer: + displayName: Tmax (outer) + unit: s + value: 37.392 + upstream_tmax_inner: + displayName: Upstream Tmax (inner) + unit: s + value: 33.46 + upstream_tmax_outer: + displayName: Upstream Tmax (outer) + unit: s + value: 35.58 + - description: Example 2 + input: + fPort: 1 + bytes: [0x02, 0x3d, 0x01, 0x00, 0x02, 0x0b, 0x59] + output: + data: + battery_voltage: + displayName: Battery voltage + unit: V + value: 2.905 + device_id: 15617 + protocol_version: 2 + +downlinkEncoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 3600 seconds and save + input: + data: + command: set period + save + parameter: 3600 + output: + bytes: [0, 2, 14, 16, 72, 164] + fPort: 1 + - description: Set ADR off + input: + data: + command: set adr off + output: + bytes: [0, 7, 0, 0, 229, 177] + fPort: 1 + +downlinkDecoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 600 seconds + input: + fPort: 1 + bytes: [0x00, 0x01, 0x02, 0x58, 0x7E, 0x51] + output: + data: + command: set period + parameter: 600 + - description: Reset + input: + fPort: 1 + bytes: [0xFE, 0xFE, 0x00, 0x00, 0x3C, 0x50] + output: + data: + command: reset diff --git a/vendor/decentlab/dl-isf.js b/vendor/decentlab/dl-isf.js new file mode 100644 index 0000000000..b497876c6b --- /dev/null +++ b/vendor/decentlab/dl-isf.js @@ -0,0 +1,131 @@ + +/* https://www.decentlab.com/products/sapflow-sensor-for-lorawan */ + +var decentlab_decoder = { + PROTOCOL_VERSION: 2, + SENSORS: [ + {length: 16, + values: [{name: 'sap_flow', + displayName: 'Sap flow', + convert: function (x) { return (x[0] * 16 - 50000) / 1000; }, + unit: 'l⋅h⁻¹'}, + {name: 'heat_velocity_outer', + displayName: 'Heat velocity (outer)', + convert: function (x) { return (x[1] * 16 - 50000) / 1000; }, + unit: 'cm⋅h⁻¹'}, + {name: 'heat_velocity_inner', + displayName: 'Heat velocity (inner)', + convert: function (x) { return (x[2] * 16 - 50000) / 1000; }, + unit: 'cm⋅h⁻¹'}, + {name: 'alpha_outer', + displayName: 'Alpha (outer)', + convert: function (x) { return (x[3] * 32 - 1000000) / 100000; }}, + {name: 'alpha_inner', + displayName: 'Alpha (inner)', + convert: function (x) { return (x[4] * 32 - 1000000) / 100000; }}, + {name: 'beta_outer', + displayName: 'Beta (outer)', + convert: function (x) { return (x[5] * 32 - 1000000) / 100000; }}, + {name: 'beta_inner', + displayName: 'Beta (inner)', + convert: function (x) { return (x[6] * 32 - 1000000) / 100000; }}, + {name: 'tmax_outer', + displayName: 'Tmax (outer)', + convert: function (x) { return (x[7] * 2) / 1000; }, + unit: 's'}, + {name: 'tmax_inner', + displayName: 'Tmax (inner)', + convert: function (x) { return (x[8] * 2) / 1000; }, + unit: 's'}, + {name: 'temperature_outer', + displayName: 'Temperature (outer)', + convert: function (x) { return (x[9] - 32768) / 100; }, + unit: '°C'}, + {name: 'max_voltage', + displayName: 'Max voltage', + convert: function (x) { return (x[10] - 32768) / 1000; }, + unit: 'V'}, + {name: 'min_voltage', + displayName: 'Min voltage', + convert: function (x) { return (x[11] - 32768) / 1000; }, + unit: 'V'}, + {name: 'diagnostic', + displayName: 'Diagnostic', + convert: function (x) { return x[12] + x[13] * 65536; }}, + {name: 'upstream_tmax_outer', + displayName: 'Upstream Tmax (outer)', + convert: function (x) { return (x[14] * 2) / 1000; }, + unit: 's'}, + {name: 'upstream_tmax_inner', + displayName: 'Upstream Tmax (inner)', + convert: function (x) { return (x[15] * 2) / 1000; }, + unit: 's'}]}, + {length: 1, + values: [{name: 'battery_voltage', + displayName: 'Battery voltage', + convert: function (x) { return x[0] / 1000; }, + unit: 'V'}]} + ], + + read_int: function (bytes, pos) { + return (bytes[pos] << 8) + bytes[pos + 1]; + }, + + decode: function (msg) { + var bytes = msg; + var i, j; + if (typeof msg === 'string') { + bytes = []; + for (i = 0; i < msg.length; i += 2) { + bytes.push(parseInt(msg.substring(i, i + 2), 16)); + } + } + + var version = bytes[0]; + if (version != this.PROTOCOL_VERSION) { + return {error: "protocol version " + version + " doesn't match v2"}; + } + + var deviceId = this.read_int(bytes, 1); + var flags = this.read_int(bytes, 3); + var result = {'protocol_version': version, 'device_id': deviceId}; + // decode payload + var pos = 5; + for (i = 0; i < this.SENSORS.length; i++, flags >>= 1) { + if ((flags & 1) !== 1) + continue; + + var sensor = this.SENSORS[i]; + var x = []; + // convert data to 16-bit integer array + for (j = 0; j < sensor.length; j++) { + x.push(this.read_int(bytes, pos)); + pos += 2; + } + + // decode sensor values + for (j = 0; j < sensor.values.length; j++) { + var value = sensor.values[j]; + if ('convert' in value) { + result[value.name] = {displayName: value.displayName, + value: value.convert.bind(this)(x)}; + if ('unit' in value) + result[value.name]['unit'] = value.unit; + } + } + } + return result; + } +}; + +function decodeUplink(input) { + var res = decentlab_decoder.decode(input.bytes); + if (res.error) { + return { + errors: [res.error], + }; + } + return { + data: res, + }; +} diff --git a/vendor/decentlab/dl-isf.png b/vendor/decentlab/dl-isf.png new file mode 100644 index 0000000000..6a9f8c8183 Binary files /dev/null and b/vendor/decentlab/dl-isf.png differ diff --git a/vendor/decentlab/dl-isf.yaml b/vendor/decentlab/dl-isf.yaml new file mode 100644 index 0000000000..688ca7290b --- /dev/null +++ b/vendor/decentlab/dl-isf.yaml @@ -0,0 +1,87 @@ +name: DL-ISF +description: The Decentlab DL-ISF is a sap flow sensor for LoRaWAN®. Suitable for applications such as plant physiology, plant water use, hydraulic redistribution, hydrology, and irrigation scheduling. + +hardwareVersions: + - version: '1' + numeric: 1 + +firmwareVersions: + - version: 1.5.7 + numeric: 157 + hardwareVersions: + - '1' + profiles: + EU863-870: + id: profile-eu868 + lorawanCertified: true + codec: dl-isf-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: dl-isf-codec + US902-928: + id: profile-us915 + lorawanCertified: true + codec: dl-isf-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: dl-isf-codec + +sensors: + - sap flow + +dimensions: + length: 135 + width: 81 + height: 70 + +weight: 400 + +battery: + replaceable: true + type: 2 C alkaline + +operatingConditions: + temperature: + min: -20 + max: 50 + relativeHumidity: + min: 0 + max: 1.0 + +ipCode: IP67 + +keyProvisioning: + - custom +keySecurity: none + +productURL: https://www.decentlab.com/products/sapflow-sensor-for-lorawan +photos: + main: dl-isf.png + +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 301 489-1 + version: 2.2.0 + - body: ETSI + norm: EN + standard: 301 489-3 + version: 2.1.1 + - body: ETSI + norm: EN + standard: 300 220-1 + version: 3.1.1 + - body: ETSI + norm: EN + standard: 300 220-2 + version: 3.1.1 + - body: IEC + norm: EN + standard: 62479:2010 diff --git a/vendor/decentlab/dl-lid.js b/vendor/decentlab/dl-lid.js index 00a7248aaf..d16edf7832 100644 --- a/vendor/decentlab/dl-lid.js +++ b/vendor/decentlab/dl-lid.js @@ -1,5 +1,5 @@ -/* https://decentlab.squarespace.com/products/laser-distance-level-sensor-for-lorawan */ +/* https://www.decentlab.com/products/laser-distance-level-sensor-for-lorawan */ var decentlab_decoder = { PROTOCOL_VERSION: 2, diff --git a/vendor/decentlab/dl-optod.js b/vendor/decentlab/dl-optod.js index 2e1d29bfb0..e285104517 100644 --- a/vendor/decentlab/dl-optod.js +++ b/vendor/decentlab/dl-optod.js @@ -1,5 +1,5 @@ -/* https://decentlab.squarespace.com/products/optical-dissolved-oxygen-and-temperature-sensor-for-lorawan */ +/* https://www.decentlab.com/products/optical-dissolved-oxygen-and-temperature-sensor-for-lorawan */ var decentlab_decoder = { PROTOCOL_VERSION: 2, diff --git a/vendor/decentlab/dl-tp-codec.yaml b/vendor/decentlab/dl-tp-codec.yaml new file mode 100644 index 0000000000..c2f9fcbdfe --- /dev/null +++ b/vendor/decentlab/dl-tp-codec.yaml @@ -0,0 +1,170 @@ +uplinkDecoder: + fileName: dl-tp.js + examples: + - description: Example 1 + input: + fPort: 1 + bytes: + [ + 0x02, + 0x3e, + 0x3e, + 0x00, + 0x03, + 0x8a, + 0xbc, + 0x8a, + 0x92, + 0x8a, + 0xa0, + 0x8a, + 0x84, + 0x8a, + 0xb3, + 0x8a, + 0x89, + 0x8a, + 0xc3, + 0x8a, + 0xad, + 0x8a, + 0xb7, + 0x8a, + 0x92, + 0x8a, + 0xa1, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x0a, + 0xfc, + ] + output: + data: + battery_voltage: + displayName: Battery voltage + unit: V + value: 2.812 + device_id: 15934 + protocol_version: 2 + temperature_at_level_0: + displayName: Temperature at level 0 + unit: "\xB0C" + value: 27.48 + temperature_at_level_1: + displayName: Temperature at level 1 + unit: "\xB0C" + value: 27.06 + temperature_at_level_10: + displayName: Temperature at level 10 + unit: "\xB0C" + value: 27.21 + temperature_at_level_11: + displayName: Temperature at level 11 + unit: "\xB0C" + value: -327.68 + temperature_at_level_12: + displayName: Temperature at level 12 + unit: "\xB0C" + value: -327.68 + temperature_at_level_13: + displayName: Temperature at level 13 + unit: "\xB0C" + value: -327.68 + temperature_at_level_14: + displayName: Temperature at level 14 + unit: "\xB0C" + value: -327.68 + temperature_at_level_15: + displayName: Temperature at level 15 + unit: "\xB0C" + value: -327.68 + temperature_at_level_2: + displayName: Temperature at level 2 + unit: "\xB0C" + value: 27.2 + temperature_at_level_3: + displayName: Temperature at level 3 + unit: "\xB0C" + value: 26.92 + temperature_at_level_4: + displayName: Temperature at level 4 + unit: "\xB0C" + value: 27.39 + temperature_at_level_5: + displayName: Temperature at level 5 + unit: "\xB0C" + value: 26.97 + temperature_at_level_6: + displayName: Temperature at level 6 + unit: "\xB0C" + value: 27.55 + temperature_at_level_7: + displayName: Temperature at level 7 + unit: "\xB0C" + value: 27.33 + temperature_at_level_8: + displayName: Temperature at level 8 + unit: "\xB0C" + value: 27.43 + temperature_at_level_9: + displayName: Temperature at level 9 + unit: "\xB0C" + value: 27.06 + - description: Example 2 + input: + fPort: 1 + bytes: [0x02, 0x3e, 0x3e, 0x00, 0x02, 0x0a, 0xfc] + output: + data: + battery_voltage: + displayName: Battery voltage + unit: V + value: 2.812 + device_id: 15934 + protocol_version: 2 + +downlinkEncoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 3600 seconds and save + input: + data: + command: set period + save + parameter: 3600 + output: + bytes: [0, 2, 14, 16, 72, 164] + fPort: 1 + - description: Set ADR off + input: + data: + command: set adr off + output: + bytes: [0, 7, 0, 0, 229, 177] + fPort: 1 + +downlinkDecoder: + fileName: dl-downlink-codec.js + examples: + - description: Set period 600 seconds + input: + fPort: 1 + bytes: [0x00, 0x01, 0x02, 0x58, 0x7E, 0x51] + output: + data: + command: set period + parameter: 600 + - description: Reset + input: + fPort: 1 + bytes: [0xFE, 0xFE, 0x00, 0x00, 0x3C, 0x50] + output: + data: + command: reset diff --git a/vendor/decentlab/dl-tp.js b/vendor/decentlab/dl-tp.js new file mode 100644 index 0000000000..d42c74f73e --- /dev/null +++ b/vendor/decentlab/dl-tp.js @@ -0,0 +1,137 @@ +var decentlab_decoder = { + PROTOCOL_VERSION: 2, + SENSORS: [ + {length: 16, + values: [{name: 'temperature_at_level_0', + displayName: 'Temperature at level 0', + convert: function (x) { return (x[0] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_1', + displayName: 'Temperature at level 1', + convert: function (x) { return (x[1] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_2', + displayName: 'Temperature at level 2', + convert: function (x) { return (x[2] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_3', + displayName: 'Temperature at level 3', + convert: function (x) { return (x[3] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_4', + displayName: 'Temperature at level 4', + convert: function (x) { return (x[4] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_5', + displayName: 'Temperature at level 5', + convert: function (x) { return (x[5] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_6', + displayName: 'Temperature at level 6', + convert: function (x) { return (x[6] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_7', + displayName: 'Temperature at level 7', + convert: function (x) { return (x[7] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_8', + displayName: 'Temperature at level 8', + convert: function (x) { return (x[8] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_9', + displayName: 'Temperature at level 9', + convert: function (x) { return (x[9] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_10', + displayName: 'Temperature at level 10', + convert: function (x) { return (x[10] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_11', + displayName: 'Temperature at level 11', + convert: function (x) { return (x[11] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_12', + displayName: 'Temperature at level 12', + convert: function (x) { return (x[12] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_13', + displayName: 'Temperature at level 13', + convert: function (x) { return (x[13] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_14', + displayName: 'Temperature at level 14', + convert: function (x) { return (x[14] - 32768) / 100; }, + unit: '°C'}, + {name: 'temperature_at_level_15', + displayName: 'Temperature at level 15', + convert: function (x) { return (x[15] - 32768) / 100; }, + unit: '°C'}]}, + {length: 1, + values: [{name: 'battery_voltage', + displayName: 'Battery voltage', + convert: function (x) { return x[0] / 1000; }, + unit: 'V'}]} + ], + + read_int: function (bytes, pos) { + return (bytes[pos] << 8) + bytes[pos + 1]; + }, + + decode: function (msg) { + var bytes = msg; + var i, j; + if (typeof msg === 'string') { + bytes = []; + for (i = 0; i < msg.length; i += 2) { + bytes.push(parseInt(msg.substring(i, i + 2), 16)); + } + } + + var version = bytes[0]; + if (version != this.PROTOCOL_VERSION) { + return {error: "protocol version " + version + " doesn't match v2"}; + } + + var deviceId = this.read_int(bytes, 1); + var flags = this.read_int(bytes, 3); + var result = {'protocol_version': version, 'device_id': deviceId}; + // decode payload + var pos = 5; + for (i = 0; i < this.SENSORS.length; i++, flags >>= 1) { + if ((flags & 1) !== 1) + continue; + + var sensor = this.SENSORS[i]; + var x = []; + // convert data to 16-bit integer array + for (j = 0; j < sensor.length; j++) { + x.push(this.read_int(bytes, pos)); + pos += 2; + } + + // decode sensor values + for (j = 0; j < sensor.values.length; j++) { + var value = sensor.values[j]; + if ('convert' in value) { + result[value.name] = {displayName: value.displayName, + value: value.convert.bind(this)(x)}; + if ('unit' in value) + result[value.name]['unit'] = value.unit; + } + } + } + return result; + } +}; + +function decodeUplink(input) { + var res = decentlab_decoder.decode(input.bytes); + if (res.error) { + return { + errors: [res.error], + }; + } + return { + data: res, + }; +} diff --git a/vendor/decentlab/dl-tp.png b/vendor/decentlab/dl-tp.png new file mode 100644 index 0000000000..960972298a Binary files /dev/null and b/vendor/decentlab/dl-tp.png differ diff --git a/vendor/decentlab/dl-tp.yaml b/vendor/decentlab/dl-tp.yaml new file mode 100644 index 0000000000..27e4e9259b --- /dev/null +++ b/vendor/decentlab/dl-tp.yaml @@ -0,0 +1,87 @@ +name: DL-TP +description: The Decentlab DL-TP comes with temperature profiling sensors that can be used in monitoring of glaciers, lakes, ocean, permafrost, dike, dam and soils. + +hardwareVersions: + - version: '1' + numeric: 1 + +firmwareVersions: + - version: 1.5.7 + numeric: 157 + hardwareVersions: + - '1' + profiles: + EU863-870: + id: profile-eu868 + lorawanCertified: true + codec: dl-tp-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: dl-tp-codec + US902-928: + id: profile-us915 + lorawanCertified: true + codec: dl-tp-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: dl-tp-codec + +sensors: + - temperature + +dimensions: + length: 135 + width: 81 + height: 70 + +weight: 400 + +battery: + replaceable: true + type: 2 C alkaline + +operatingConditions: + temperature: + min: -20 + max: 50 + relativeHumidity: + min: 0 + max: 1.0 + +ipCode: IP67 + +keyProvisioning: + - custom +keySecurity: none + +productURL: https://www.decentlab.com/products/temperature-profile-for-lorawan +photos: + main: dl-tp.png + +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 301 489-1 + version: 2.2.0 + - body: ETSI + norm: EN + standard: 301 489-3 + version: 2.1.1 + - body: ETSI + norm: EN + standard: 300 220-1 + version: 3.1.1 + - body: ETSI + norm: EN + standard: 300 220-2 + version: 3.1.1 + - body: IEC + norm: EN + standard: 62479:2010 diff --git a/vendor/decentlab/index.yaml b/vendor/decentlab/index.yaml index b2375ac519..49cceb3b76 100644 --- a/vendor/decentlab/index.yaml +++ b/vendor/decentlab/index.yaml @@ -2,7 +2,9 @@ endDevices: - dl-5tm - dl-atm22 - dl-atm41 + - dl-blg - dl-ctd10 + - dl-cws - dl-dlr2-002 - dl-dlr2-003 - dl-dlr2-004 @@ -14,6 +16,7 @@ endDevices: - dl-ds18 - dl-dws - dl-iam + - dl-isf - dl-itst - dl-kl66 - dl-lid @@ -34,6 +37,7 @@ endDevices: - dl-sht35-002 - dl-smtp - dl-tbrg + - dl-tp - dl-trs11 - dl-trs12 - dl-trs21 diff --git a/vendor/index.yaml b/vendor/index.yaml index f424b32059..42356c51c5 100644 --- a/vendor/index.yaml +++ b/vendor/index.yaml @@ -165,7 +165,7 @@ vendors: description: Decentlab is a Swiss company providing wireless sensor devices and services for distributed, cost-effective monitoring solutions. The sensor devices communicate wirelessly over LoRaWAN® and are designed for ultra low power consumption, capable of operating on batteries for several years. The devices are built for industrial applications and are ready to be deployed in any harsh indoor or outdoor environment. The service framework provides convenient access to measurement data and enables seamless integration into existing monitoring and control systems. Application areas are environmental and air quality monitoring, hydrological measurements, smart agriculture and smart cities. social: linkedin: https://www.linkedin.com/company/decentlab - facebook: https://www.facebook.com/decentlab.gmbh + facebook: https://www.facebook.com/decentlab twitter: decentlab github: decentlab