diff --git a/vendor/rakwireless/decoder-qingping.js b/vendor/rakwireless/decoder-qingping.js new file mode 100644 index 0000000000..a0c60adbba --- /dev/null +++ b/vendor/rakwireless/decoder-qingping.js @@ -0,0 +1,62 @@ +function Decoder(bytes, port) { + + var i = 0; + var output = {}; + var device_address = data[i++]; + var function_code = data[i++]; + var data_length = data[i++]; + var data_type = data[i++]; + + // Parsing only real time data from sensor + if ((0x41 == function_code) && (0x01 == data_type)) { + + // id + output.device = device_address; + + // timestamp + output.timestamp = (data[i] << 24) + (data[i+1] << 16) + (data[i+2] << 8) + data[i+3]; + i+=4; + + // temperature + output.temperature = ((data[i] * 16) + (data[i+1] >> 4) - 500) / 10.0; + output.humidity = (256 * (data[i+1] & 0x0F) + data[i+2]) / 10.0; + output.co2 = (data[i+3] << 8) + data[i+4]; + i+=5; + + // battery + output.battery = data[i]; + + } + + return output; + +} + +function bytesToHex(bytes) { + + var hexArray = []; + for (var i = 0; i < bytes.length; i++) { + var hex = (bytes[i] & 0xff).toString(16).toUpperCase(); + if (hex.length === 1) { + hex = '0' + hex; + } + hexArray.push(hex); + } + return hexArray.join(''); + +} + +function decodeUplink(input) { + + bytes = input.bytes; + fPort = input.fPort; + + return { + data: Decoder(bytes, fPort), + warnings: [], + errors: [] + }; + +} + + diff --git a/vendor/rakwireless/index.yaml b/vendor/rakwireless/index.yaml index 753bfbf7d8..ff7e393e9c 100644 --- a/vendor/rakwireless/index.yaml +++ b/vendor/rakwireless/index.yaml @@ -6,3 +6,5 @@ endDevices: - wisblock-kit4 - rak2270 - rak2560 + - qingping-t-h + - qingping-co2-t-h diff --git a/vendor/rakwireless/qingping-co2-t-h-868-profile.yaml b/vendor/rakwireless/qingping-co2-t-h-868-profile.yaml new file mode 100644 index 0000000000..e087bb591f --- /dev/null +++ b/vendor/rakwireless/qingping-co2-t-h-868-profile.yaml @@ -0,0 +1,48 @@ +# LoRaWAN MAC version: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4 or 1.1 +macVersion: '1.0.3' +# LoRaWAN Regional Parameters version. Values depend on the LoRaWAN version: +# 1.0: TS001-1.0 +# 1.0.1: TS001-1.0.1 +# 1.0.2: RP001-1.0.2 or RP001-1.0.2-RevB +# 1.0.3: RP001-1.0.3-RevA +# 1.0.4: RP002-1.0.0 or RP002-1.0.1 +# 1.1: RP001-1.1-RevA or RP001-1.1-RevB +regionalParametersVersion: 'RP001-1.0.3-RevA' + +# Whether the end device supports join (OTAA) or not (ABP) +supportsJoin: true +# If your device is an ABP device (supportsJoin is false), uncomment the following fields: +# RX1 delay +#rx1Delay: 5 +# RX1 data rate offset +#rx1DataRateOffset: 0 +# RX2 data rate index +#rx2DataRateIndex: 0 +# RX2 frequency (MHz) +#rx2Frequency: 869.525 +# Factory preset frequencies (MHz) +#factoryPresetFrequencies: [868.1, 868.3, 868.5, 867.1, 867.3, 867.5, 867.7, 867.9] + +# Maximum EIRP +maxEIRP: 16 + +# Whether the end device supports 32-bit frame counters +supports32bitFCnt: true + +# Whether the end device supports class B +supportsClassB: false +# If your device supports class B, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classBTimeout: 60 +# Ping slot period (seconds) +#pingSlotPeriod: 128 +# Ping slot data rate index +#pingSlotDataRateIndex: 0 +# Ping slot frequency (MHz). Set to 0 if the band supports ping slot frequency hopping. +#pingSlotFrequency: 869.525 + +# Whether the end device supports class C +supportsClassC: false +# If your device supports class C, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classCTimeout: 60 diff --git a/vendor/rakwireless/qingping-co2-t-h-915-profile.yaml b/vendor/rakwireless/qingping-co2-t-h-915-profile.yaml new file mode 100644 index 0000000000..9a2d8a9bf8 --- /dev/null +++ b/vendor/rakwireless/qingping-co2-t-h-915-profile.yaml @@ -0,0 +1,48 @@ +# LoRaWAN MAC version: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4 or 1.1 +macVersion: '1.0.3' +# LoRaWAN Regional Parameters version. Values depend on the LoRaWAN version: +# 1.0: TS001-1.0 +# 1.0.1: TS001-1.0.1 +# 1.0.2: RP001-1.0.2 or RP001-1.0.2-RevB +# 1.0.3: RP001-1.0.3-RevA +# 1.0.4: RP002-1.0.0 or RP002-1.0.1 +# 1.1: RP001-1.1-RevA or RP001-1.1-RevB +regionalParametersVersion: 'RP001-1.0.3-RevA' + +# Whether the end device supports join (OTAA) or not (ABP) +supportsJoin: true +# If your device is an ABP device (supportsJoin is false), uncomment the following fields: +# RX1 delay +#rx1Delay: 5 +# RX1 data rate offset +#rx1DataRateOffset: 0 +# RX2 data rate index +#rx2DataRateIndex: 0 +# RX2 frequency (MHz) +#rx2Frequency: 869.525 +# Factory preset frequencies (MHz) +#factoryPresetFrequencies: [868.1, 868.3, 868.5, 867.1, 867.3, 867.5, 867.7, 867.9] + +# Maximum EIRP +maxEIRP: 22 + +# Whether the end device supports 32-bit frame counters +supports32bitFCnt: true + +# Whether the end device supports class B +supportsClassB: false +# If your device supports class B, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classBTimeout: 60 +# Ping slot period (seconds) +#pingSlotPeriod: 128 +# Ping slot data rate index +#pingSlotDataRateIndex: 0 +# Ping slot frequency (MHz). Set to 0 if the band supports ping slot frequency hopping. +#pingSlotFrequency: 869.525 + +# Whether the end device supports class C +supportsClassC: false +# If your device supports class C, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classCTimeout: 60 diff --git a/vendor/rakwireless/qingping-co2-t-h-codec.yaml b/vendor/rakwireless/qingping-co2-t-h-codec.yaml new file mode 100644 index 0000000000..e0b8487080 --- /dev/null +++ b/vendor/rakwireless/qingping-co2-t-h-codec.yaml @@ -0,0 +1,2 @@ +uplinkDecoder: + fileName: decoder-qingping.js diff --git a/vendor/rakwireless/qingping-co2-t-h.png b/vendor/rakwireless/qingping-co2-t-h.png new file mode 100644 index 0000000000..f3a1620350 Binary files /dev/null and b/vendor/rakwireless/qingping-co2-t-h.png differ diff --git a/vendor/rakwireless/qingping-co2-t-h.yaml b/vendor/rakwireless/qingping-co2-t-h.yaml new file mode 100644 index 0000000000..45c02746ec --- /dev/null +++ b/vendor/rakwireless/qingping-co2-t-h.yaml @@ -0,0 +1,74 @@ +name: QingPing CO2 & Temperature & Humidity Monitor for LoRaWAN +description: The QingPing LoRaWAN CO2 monitor Sensor is a remote monitoring device that uses nondispersive infrared (NDIR) spectral analysis to accurately measure CO2 levels. Aside from CO2 levels, it also monitors temperature and relative humidity, providing a comprehensive overview of the indoor environment in real time. + +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '1.0' + numeric: 1 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.3.4' + numeric: 1 + # Corresponding hardware versions (optional) + hardwareVersions: + - '1.0' + + # LoRaWAN Device Profiles per region + # Supported regions are EU863-870, US902-928, AU915-928, AS923, CN779-787, EU433, CN470-510, KR920-923, IN865-867, RU864-870 + profiles: + EU863-870: + id: qingping-co2-t-h-868-profile + lorawanCertified: false + codec: qingping-co2-t-h-codec + US902-928: + id: qingping-co2-t-h-915-profile + lorawanCertified: false + codec: qingping-co2-t-h-codec + +sensors: + - temperature + - humidity + - co2 + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 77 + length: 77 + height: 28 + +# Weight in grams (optional) +#weight: 10 + +operatingConditions: + temperature: + min: -10 + max: 50 + +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://store.rakwireless.com/products/qingping-lorawan-co2-monitoring-sensor +dataSheetURL: https://downloads.rakwireless.com/IoT-Marketplace/Qingping/Indoor%20CO2%20Monitoring%20Solution/QingPing%20LoRaWAN%20CO2%20Sensor%20Datasheet.pdf + +# Photos +photos: + main: qingping-co2-t-h.png +#videos: +# main: https://www.youtube.com/watch?v=XVRR7Akyy8M + +# Regulatory compliances (optional) +#compliances: +# emc: +# - body: ETSI +# norm: EN +# standard: 301 489-1 +# version: 2.2.3 +# radio: +# - body: ETSI +# norm: EN +# standard: 300 220-2 +# version: 3.2.1 diff --git a/vendor/rakwireless/qingping-t-h-868-profile.yaml b/vendor/rakwireless/qingping-t-h-868-profile.yaml new file mode 100644 index 0000000000..e087bb591f --- /dev/null +++ b/vendor/rakwireless/qingping-t-h-868-profile.yaml @@ -0,0 +1,48 @@ +# LoRaWAN MAC version: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4 or 1.1 +macVersion: '1.0.3' +# LoRaWAN Regional Parameters version. Values depend on the LoRaWAN version: +# 1.0: TS001-1.0 +# 1.0.1: TS001-1.0.1 +# 1.0.2: RP001-1.0.2 or RP001-1.0.2-RevB +# 1.0.3: RP001-1.0.3-RevA +# 1.0.4: RP002-1.0.0 or RP002-1.0.1 +# 1.1: RP001-1.1-RevA or RP001-1.1-RevB +regionalParametersVersion: 'RP001-1.0.3-RevA' + +# Whether the end device supports join (OTAA) or not (ABP) +supportsJoin: true +# If your device is an ABP device (supportsJoin is false), uncomment the following fields: +# RX1 delay +#rx1Delay: 5 +# RX1 data rate offset +#rx1DataRateOffset: 0 +# RX2 data rate index +#rx2DataRateIndex: 0 +# RX2 frequency (MHz) +#rx2Frequency: 869.525 +# Factory preset frequencies (MHz) +#factoryPresetFrequencies: [868.1, 868.3, 868.5, 867.1, 867.3, 867.5, 867.7, 867.9] + +# Maximum EIRP +maxEIRP: 16 + +# Whether the end device supports 32-bit frame counters +supports32bitFCnt: true + +# Whether the end device supports class B +supportsClassB: false +# If your device supports class B, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classBTimeout: 60 +# Ping slot period (seconds) +#pingSlotPeriod: 128 +# Ping slot data rate index +#pingSlotDataRateIndex: 0 +# Ping slot frequency (MHz). Set to 0 if the band supports ping slot frequency hopping. +#pingSlotFrequency: 869.525 + +# Whether the end device supports class C +supportsClassC: false +# If your device supports class C, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classCTimeout: 60 diff --git a/vendor/rakwireless/qingping-t-h-915-profile.yaml b/vendor/rakwireless/qingping-t-h-915-profile.yaml new file mode 100644 index 0000000000..9a2d8a9bf8 --- /dev/null +++ b/vendor/rakwireless/qingping-t-h-915-profile.yaml @@ -0,0 +1,48 @@ +# LoRaWAN MAC version: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4 or 1.1 +macVersion: '1.0.3' +# LoRaWAN Regional Parameters version. Values depend on the LoRaWAN version: +# 1.0: TS001-1.0 +# 1.0.1: TS001-1.0.1 +# 1.0.2: RP001-1.0.2 or RP001-1.0.2-RevB +# 1.0.3: RP001-1.0.3-RevA +# 1.0.4: RP002-1.0.0 or RP002-1.0.1 +# 1.1: RP001-1.1-RevA or RP001-1.1-RevB +regionalParametersVersion: 'RP001-1.0.3-RevA' + +# Whether the end device supports join (OTAA) or not (ABP) +supportsJoin: true +# If your device is an ABP device (supportsJoin is false), uncomment the following fields: +# RX1 delay +#rx1Delay: 5 +# RX1 data rate offset +#rx1DataRateOffset: 0 +# RX2 data rate index +#rx2DataRateIndex: 0 +# RX2 frequency (MHz) +#rx2Frequency: 869.525 +# Factory preset frequencies (MHz) +#factoryPresetFrequencies: [868.1, 868.3, 868.5, 867.1, 867.3, 867.5, 867.7, 867.9] + +# Maximum EIRP +maxEIRP: 22 + +# Whether the end device supports 32-bit frame counters +supports32bitFCnt: true + +# Whether the end device supports class B +supportsClassB: false +# If your device supports class B, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classBTimeout: 60 +# Ping slot period (seconds) +#pingSlotPeriod: 128 +# Ping slot data rate index +#pingSlotDataRateIndex: 0 +# Ping slot frequency (MHz). Set to 0 if the band supports ping slot frequency hopping. +#pingSlotFrequency: 869.525 + +# Whether the end device supports class C +supportsClassC: false +# If your device supports class C, uncomment the following fields: +# Maximum delay for the end device to answer a MAC request or confirmed downlink frame (seconds) +#classCTimeout: 60 diff --git a/vendor/rakwireless/qingping-t-h-codec.yaml b/vendor/rakwireless/qingping-t-h-codec.yaml new file mode 100644 index 0000000000..e0b8487080 --- /dev/null +++ b/vendor/rakwireless/qingping-t-h-codec.yaml @@ -0,0 +1,2 @@ +uplinkDecoder: + fileName: decoder-qingping.js diff --git a/vendor/rakwireless/qingping-t-h.png b/vendor/rakwireless/qingping-t-h.png new file mode 100644 index 0000000000..216569175c Binary files /dev/null and b/vendor/rakwireless/qingping-t-h.png differ diff --git a/vendor/rakwireless/qingping-t-h.yaml b/vendor/rakwireless/qingping-t-h.yaml new file mode 100644 index 0000000000..03c8490dca --- /dev/null +++ b/vendor/rakwireless/qingping-t-h.yaml @@ -0,0 +1,73 @@ +name: QingPing Temperature & Humidity Monitor for LoRaWAN +description: The QingPing Temp & RH Monitor Pro S is a professional-grade sensor designed for precise monitoring of temperature and humidity levels. It is specifically tailored for greenhouse applications and can withstand extreme environmental conditions. With its precision accuracy, the monitor ensures optimal growing conditions for plants, enabling users to achieve maximum productivity. + +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '1.0' + numeric: 1 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.3.4' + numeric: 1 + # Corresponding hardware versions (optional) + hardwareVersions: + - '1.0' + + # LoRaWAN Device Profiles per region + # Supported regions are EU863-870, US902-928, AU915-928, AS923, CN779-787, EU433, CN470-510, KR920-923, IN865-867, RU864-870 + profiles: + EU863-870: + id: qingping-t-h-868-profile + lorawanCertified: false + codec: qingping-t-h-codec + US902-928: + id: qingping-t-h-915-profile + lorawanCertified: false + codec: qingping-t-h-codec + +sensors: + - temperature + - humidity + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 77 + length: 77 + height: 28 + +# Weight in grams (optional) +#weight: 10 + +operatingConditions: + temperature: + min: -20 + max: 50 + +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://store.rakwireless.com/products/advanced-greenhouse-temperature-humidity-sensor-with-display +dataSheetURL: https://downloads.rakwireless.com/IoT-Marketplace/Qingping/Indoor%20Temperature%20and%20Humidity%20Monitoring%20Solution/Qingping%20Temperature%20%26%20RH%20Monitor%20Pro%20S%20Datasheet.pdf + +# Photos +photos: + main: qingping-t-h.png +#videos: +# main: https://www.youtube.com/watch?v=XVRR7Akyy8M + +# Regulatory compliances (optional) +#compliances: +# emc: +# - body: ETSI +# norm: EN +# standard: 301 489-1 +# version: 2.2.3 +# radio: +# - body: ETSI +# norm: EN +# standard: 300 220-2 +# version: 3.2.1