diff --git a/vendor/elv/elv-bm-trx1.js b/vendor/elv/elv-bm-trx1.js index 8b1419cc67..a836712dbe 100644 --- a/vendor/elv/elv-bm-trx1.js +++ b/vendor/elv/elv-bm-trx1.js @@ -1,7 +1,7 @@ /* * ELV modular system Payload-Parser * - * Version: V1.9.0 + * Version: V1.10.1 * * */ @@ -786,7 +786,7 @@ function Decoder(bytes, port) { } case 0x14: //6-Axis-Sensor { - index++; + index++; decoded.Acc_x = !!(bytes[index] & 0x01); decoded.Acc_y = !!(bytes[index] & 0x02); decoded.Acc_z = !!(bytes[index] & 0x04); @@ -797,26 +797,65 @@ function Decoder(bytes, port) { } case 0x15: //Window-State { - index++; + index++; data = bytes[index]; if (data < 100) { - decoded.window_state = data; + decoded.Window_State = data; } else if (data == 255) { - decoded.window_state = "Tilted" + decoded.Window_State = "Tilted" } else { - decoded.window_state = "Undefined" + decoded.Window_State = "Undefined" } break; } case 0x16: { index++; - decoded.situation = bytes[index]; + decoded.Situation = bytes[index]; + break; + } + case 0x17: // UV-Index + { + decoded.UVI = bytes[++index]; + break; + } + case 0x18: // UV-A + { + decoded.UVA = ( bytes[++index] << 24 ) | ( bytes[++index] << 16 ) | ( bytes[++index] << 8 ) | bytes[++index]; + decoded.UVA /= 1000000; + + break; + } + case 0x19: // UV-B + { + decoded.UVB = ( bytes[++index] << 24 ) | ( bytes[++index] << 16 ) | ( bytes[++index] << 8 ) | bytes[++index]; + decoded.UVB /= 1000000; + + break; + } + case 0x1A: // UV-C + { + decoded.UVC = ( bytes[++index] << 24 ) | ( bytes[++index] << 16 ) | ( bytes[++index] << 8 ) | bytes[++index]; + decoded.UVC /= 1000000; + + break; + } + case 0x1B: // Irradiance + { + decoded.Irradiance = ( bytes[++index] << 8 ) | bytes[++index]; + + if( decoded.Irradiance == 0xFFFF ) + { + decoded.Irradiance = 0; + } + + decoded.Irradiance /= 10; + break; } // case 0x??: // Further Data Type @@ -853,14 +892,3 @@ function Decoder(bytes, port) { return decoded; } - -function decodeDownlink(input) { - return { - data: { - bytes: input.bytes - }, - warnings: [], - errors: [] - } -} - diff --git a/vendor/fludia/fm432g-10-15mn-decode.js b/vendor/fludia/fm432g-10-15mn-decode.js index de792da889..6a60073c9e 100644 --- a/vendor/fludia/fm432g-10-15mn-decode.js +++ b/vendor/fludia/fm432g-10-15mn-decode.js @@ -115,11 +115,11 @@ function decode_T1(payload,time_step){ function decode_T1_adjustable_step(payload){ var data = {}; data.time_step = payload[1]; - data.index = (payload[2] & 0xFF) << 24 | (payload[3] & 0xFF) << 16 | (payload[4] & 0xFF) << 8 | (payload[5] & 0xFF); + data.index = ((payload[2] & 0xFF) << 24 | (payload[3] & 0xFF) << 16 | (payload[4] & 0xFF) << 8 | (payload[5] & 0xFF))/10; data.increments = [] var nb_values_in_payload = (payload.length-6)/2 for(i=0;i> 6) & 0x3FF; @@ -398,7 +373,7 @@ function decodeUplink(input) "iziairCo2": iaqGlobalArgument(data_izi_air_co2), "iziairCov": iaqGlobalArgument(data_izi_air_cov), }; - + return data; } @@ -411,7 +386,7 @@ function decodeUplink(input) var offset_octet = 0; var data_nombre_mesures = (parseInt(stringHex.substring(4,6),16)>>2)&0x3F; - var data_time_between_measurement_sec = ((parseInt(stringHex.substring(4,8),16)>>2)&0xFF); + var data_time_between_measurement_min = ((parseInt(stringHex.substring(4,8),16)>>2)&0xFF); var data_repetition = (parseInt(stringHex.substring(7,9),16))&0x3F; var binary=hexToBinary(stringHex) @@ -421,17 +396,17 @@ function decodeUplink(input) mesure[i]= parseInt(binary.substring(offset_binaire,offset_binaire+10),2); if(mesure[i] === 0x3FF){mesure[i] = 0;} - else{mesure[i] = Math.round(mesure[i] * 5)} + else{mesure[i] = parseFloat((mesure[i] * 5).toFixed(2))} } data={ "typeOfProduct": typeOfProduct(octetTypeProduit), "typeOfMessage": typeOfMessage(octetTypeMessage), "numberOfRecord": data_nombre_mesures, - "periodBetweenRecord":{"value":data_time_between_measurement_sec,"unit":"minutes"}, + "periodBetweenRecord":{"value":data_time_between_measurement_min*10,"unit":"minutes"}, "redundancyOfRecord":data_repetition, "co2":{"value":mesure,"unit":"ppm"}, } - + return data } @@ -441,10 +416,10 @@ function decodeUplink(input) var i = 0; var data_nombre_mesures = (parseInt(stringHex.substring(4,6),16)>>2)&0x3F; - var data_time_between_measurement_sec = ((parseInt(stringHex.substring(4,8),16)>>2)&0xFF); + var data_time_between_measurement_min = ((parseInt(stringHex.substring(4,8),16)>>2)&0xFF); var data_repetition = (parseInt(stringHex.substring(7,9),16))&0x3F; var binary=hexToBinary(stringHex) - + for(i=0;i>2)&0x3F; + var data_time_between_measurement_min = ((parseInt(stringHex.substring(4,8),16)>>2)&0xFF); + var data_repetition = (parseInt(stringHex.substring(7,9),16))&0x3F; + var binary=hexToBinary(stringHex) + + for(i=0;i>3) & 0x1F; var data_date_produit_minute = (parseInt(stringHex.substring(32,34),16)>>1) & 0x3F; + var data_datalog_humidity_on_off = (parseInt(stringHex.substring(33,34),16)) & 0x01; data = {"typeOfProduct": typeOfProduct(octetTypeProduit), @@ -574,6 +580,7 @@ function decodeUplink(input) "deltaTemperature": deltaTemp(data_periodic_delta_temp), "historicalCO2DataActivation":active(data_datalog_co2_on_off), "historicalTemperatureDataActivation":active(data_datalog_temperature_on_off), + "historicalHumidityDataActivation":active(data_datalog_humidity_on_off), "numberOfRecordsInADatalogMessage":data_datalog_new_measure, "numberOfMessagesFor1Record":data_datalog_repetition, "transmissionPeriodOfHistoricalMessage":transmissionPeriodHistorical(data_datalog_tx_period), diff --git a/vendor/nexelec/wave-codec.yaml b/vendor/nexelec/wave-codec.yaml new file mode 100644 index 0000000000..3535c0ce28 --- /dev/null +++ b/vendor/nexelec/wave-codec.yaml @@ -0,0 +1,10 @@ +# Uplink decoder decodes binary data uplink into a JSON object (optional) +# For documentation on writing encoders and decoders, see: https://thethingsstack.io/integrations/payload-formatters/javascript/ +uplinkDecoder: + fileName: sign-codec.js + +downlinkEncoder: + fileName: sign-codec.js + +downlinkDecoder: + fileName: sign-codec.js diff --git a/vendor/nexelec/wave-profile.yaml b/vendor/nexelec/wave-profile.yaml new file mode 100644 index 0000000000..87105f11a0 --- /dev/null +++ b/vendor/nexelec/wave-profile.yaml @@ -0,0 +1,47 @@ +# LoRaWAN MAC version: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4 or 1.1 +macVersion: 1.0.4 +# 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: RP002-1.0.3 + +# 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: 14 +# 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/nexelec/wave.yaml b/vendor/nexelec/wave.yaml new file mode 100644 index 0000000000..8b8d163160 --- /dev/null +++ b/vendor/nexelec/wave.yaml @@ -0,0 +1,134 @@ +name: WAVE - Air Quality +description: WAVE is a 5-in-1 LoRaWAN-connected, battery- or USB-powered room sensor that can be rapidly configurable via NFC. Depending on the model, the sensor can measure co2, temperature, humidity, presence and luminosity. + +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: 'V001' + numeric: 1 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: 'V01.0' + numeric: 1 + # Corresponding hardware versions (optional) + hardwareVersions: + - 'V001' + + # Firmware features (optional) + # Valid values are: remote rejoin (trigger a join from the application layer), transmission interval (configure how + # often he device sends a message). + features: + - remote rejoin + - transmission interval + + # 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: + # Optional identifier of the vendor of the profile. When you specify the vendorID, the profile is loaded from + # the vendorID's folder. This allows you to reuse profiles from module or LoRaWAN end device stack vendors. + # If vendorID is empty, the current vendor ID is used. In this example, the vendorID is the current vendor ID, + # which is verbose. + #vendorID: example + # Identifier of the profile (lowercase, alphanumeric with dashes, max 36 characters) + id: wave-profile + lorawanCertified: false + codec: sign-codec + +# Sensors that this device features (optional) +# Valid values are: +# 4-20 ma, accelerometer, altitude, analog input, auxiliary, barometer, battery, button, bvoc, co, co2, conductivity, +# current, digital input, dissolved oxygen, distance, dust, energy, gps, gyroscope, h2s, humidity, iaq, level, light, +# lightning, link, magnetometer, moisture, motion, no, no2, o3, particulate matter, ph, pir, pm2.5, pm10, potentiometer, +# power, precipitation, pressure, proximity, pulse count, pulse frequency, radar, rainfall, rssi, smart valve, snr, so2, +# solar radiation, sound, strain, surface temperature, temperature, tilt, time, tvoc, uv, vapor pressure, velocity, +# vibration, voltage, water potential, water, weight, wifi ssid, wind direction, wind speed. +sensors: + - co2 + - temperature + - humidity + - motion + - light + +# Additional radios that this device has (optional) +# Valid values are: ble, nfc, wifi, cellular. +additionalRadios: + - nfc + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 87 + length: 87 + height: 23 + +# Weight in grams (optional) +weight: 110 + +# Battery information (optional) +battery: + replaceable: true + type: AA + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -30 + max: 70 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1 + +# IP rating (optional) +ipCode: IP30 + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: read protected + +# Product and data sheet URLs (optional) +productURL: https://nexelec.eu/produit/rise/ +dataSheetURL: https://support.nexelec.fr/en/support/solutions/articles/80001085097-datasheet/ + +# Commercial information +resellerURLs: + - name: 'Nexelec' + region: + - European Union + url: https://www.nexelec.fr/ + +msrp: + EUR: 165 + USD: 181 + +# Photos +photos: + main: sign.png + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + - body: ETSI + norm: EN + standard: 62479:2010 + + radioEquipment: + - body: ETSI + norm: EN + standard: 301 489-1 + version: 2.2.0 + - body: ETSI + norm: EN + standard: 301 489-3 + version: 2.1.0 + - body: ETSI + norm: EN + standard: 300 220-2 + version: 3.2.1