diff --git a/vendor/senzemo/index.yaml b/vendor/senzemo/index.yaml index 57170380a1..7eb5859ecf 100644 --- a/vendor/senzemo/index.yaml +++ b/vendor/senzemo/index.yaml @@ -2,3 +2,10 @@ endDevices: - smc30 - spu20 - spu20b + - sto10 + - slw10 + - srm10 + - ssm40 + - stf40 + - stp40 + diff --git a/vendor/senzemo/slw10-codec.yaml b/vendor/senzemo/slw10-codec.yaml new file mode 100644 index 0000000000..2d61ecfb93 --- /dev/null +++ b/vendor/senzemo/slw10-codec.yaml @@ -0,0 +1,4 @@ +# 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: slw10.js diff --git a/vendor/senzemo/slw10.js b/vendor/senzemo/slw10.js new file mode 100644 index 0000000000..1027551c7b --- /dev/null +++ b/vendor/senzemo/slw10.js @@ -0,0 +1,127 @@ +/* + + _____ _____ __ _ __ + / ___/___ ____ ____ ___ ____ ___ ____ / ___/___ ____ _____/ /_(_)____/ /__ + \__ \/ _ \/ __ \/_ / / _ \/ __ `__ \/ __ \\__ \/ _ \/ __ \/ ___/ __/ / ___/ //_/ + ___/ / __/ / / / / /_/ __/ / / / / / /_/ /__/ / __/ / / (__ ) /_/ / /__/ ,< +/____/\___/_/ /_/ /___/\___/_/ /_/ /_/\____/____/\___/_/ /_/____/\__/_/\___/_/|_| + + Senstick SLW10 HW 1.0 - FW 1.0 +*/ + + +function decodeUplink(input) +{ + const bytes = input.bytes; + const port = input.fPort; + + var Status; + var BatteryVoltage; + var SensorVoltage; + + // Alarm Packet + if (port == 1) + { + if (bytes.length == 1) + { + Status = bytes[0]; + + return { + data: { + Status: Status + }, + warnings: [], + errors: [] + }; + } + } + + // Data Packet + else if (port == 2) + { + if (bytes.length == 4) + { + BatteryVoltage = (bytes[0] << 8) + bytes[1]; + SensorVoltage = (bytes[2] << 8) + bytes[3]; + + return { + data: { + Status: 0, + BatteryVoltage: BatteryVoltage, + SensorVoltage: SensorVoltage, + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 5) + { + Status = bytes[0]; + BatteryVoltage = (bytes[1] << 8) + bytes[2]; + SensorVoltage = (bytes[3] << 8) + bytes[4]; + + return { + data: { + Status: Status, + BatteryVoltage: BatteryVoltage, + SensorVoltage: SensorVoltage, + }, + warnings: [], + errors: [] + }; + } + } + + // If Config packet + else if (port == 3) + { + if (bytes.length == 9) + { + Status = bytes[0]; + var SendPeriod = bytes[1]; + var MoveThr = bytes[2]; + var PacketConfirm = bytes[3]; + var DataRatePlusADR = bytes[4]; + var FamilyId = bytes[5]; + var ProductId = bytes[6]; + var HW = bytes[7]; + var FW = bytes[8]; + + var ADRon = Boolean(DataRatePlusADR & (1 << 7)); + var DataRate = (DataRatePlusADR & 0x7F); + + return { + data: { + Status: Status, + SendPeriod: SendPeriod, + MoveThr:MoveThr, + PacketConfirm: PacketConfirm, + DataRate: DataRate, + ADRon: ADRon, + FamilyId: FamilyId, + ProductId: ProductId, + HW: HW/10, + FW: FW/10 + }, + warnings: [], + errors: [] + }; + } + } + + // RTT FW warning + else if (port == 4) + { + var warning = "RTT FIRMWARE"; + + return { + data: { + warning: warning + }, + warnings: [], + errors: [] + }; + } +} + diff --git a/vendor/senzemo/slw10.png b/vendor/senzemo/slw10.png new file mode 100644 index 0000000000..b0f3d9a14d Binary files /dev/null and b/vendor/senzemo/slw10.png differ diff --git a/vendor/senzemo/slw10.yaml b/vendor/senzemo/slw10.yaml new file mode 100644 index 0000000000..0779be013e --- /dev/null +++ b/vendor/senzemo/slw10.yaml @@ -0,0 +1,162 @@ +name: SLW10 - Senstick Leaf Wetness +description: Leaf Wetness LoRaWAN® sensor, SLW10 measures the presence and duration of moisture on the surface of leaves. +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '1.0' + numeric: 10 + partNumber: SLW10 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.0' + numeric: 10 + # 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: profile-eu868 + lorawanCertified: false + codec: slw10-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: slw10-codec + US902-928: + id: profile-us915 + lorawanCertified: false + codec: slw10-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: slw10-codec + +# Sensors that this device features (optional) +# Valid values are: accelerometer, altitude, auxiliary, barometer, battery, button, co2, distance, dust, gps, gyroscope, +# humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, +# vibration, water, wind direction and wind speed. +sensors: + + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 25 + length: 105 + height: 25 + +# Weight in grams (optional) +weight: 90 + +# Battery information (optional) +battery: + replaceable: true + type: ER14505 + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -40 + max: 85 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1.00 + +# IP rating (optional) +ipCode: IP67 + +# Key provisioning (optional) +# Valid values are: custom (user can configure keys), join server and manifest. +keyProvisioning: + - custom + - join server + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://senzemo.com/products/leaf-wetness-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2023/05/Senstick-Leaf-Wetness-SLW10-Datasheet.pptx.pdf +resellerURLs: + - name: 'Sensational Systems' + region: + - United Kingdom + url: https://sensational.systems/ + - name: 'Arcsgroup' + region: + - Australia + url: https://thearcsgroup.com/ + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT + region: + - United States + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) + region: + - European Union + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + + +# Photos +photos: + main: slw10.png + + +# Youtube or Vimeo Video (optional) + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 303 446-1 + - body: ETSI + norm: EN + standard: 303 446-2 + - body: ETSI + norm: EN + standard: 301 489-17 + - body: ETSI + norm: EN + standard: 61000-6-1 + - body: IEC + norm: EN + standard: 61000-6-2 diff --git a/vendor/senzemo/smc30.yaml b/vendor/senzemo/smc30.yaml index 9c0cdd5553..40dce41469 100644 --- a/vendor/senzemo/smc30.yaml +++ b/vendor/senzemo/smc30.yaml @@ -41,10 +41,7 @@ firmwareVersions: # humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, # vibration, water, wind direction and wind speed. sensors: - - temperature - - humidity - - pressure - - battery + # Dimensions in mm (optional) # Use width, height, length and/or diameter @@ -86,25 +83,54 @@ keyProvisioning: keySecurity: none # Product and data sheet URLs (optional) -productURL: http://senstick.co -dataSheetURL: https://senstick.co/downloads/Senstick-SMC30-Datasheet.pdf +productURL: https://senzemo.com/products/indoor-microclimate-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2022/11/Senstick-SMC30-Datasheet.pdf resellerURLs: - name: 'Sensational Systems' region: - - European Union + - United Kingdom url: https://sensational.systems/ - name: 'Arcsgroup' region: - Australia url: https://thearcsgroup.com/ - - name: 'mydevices' + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT region: - United States - url: https://mydevices.com/ - - name: 'Concept13' + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) region: - European Union - url: https://www.concept13.co.uk/ + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + # Photos photos: diff --git a/vendor/senzemo/spu20.yaml b/vendor/senzemo/spu20.yaml index 22f6bb4470..8390ddfa6f 100644 --- a/vendor/senzemo/spu20.yaml +++ b/vendor/senzemo/spu20.yaml @@ -41,11 +41,7 @@ firmwareVersions: # humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, # vibration, water, wind direction and wind speed. sensors: - - co2 - - tvoc - - temperature - - humidity - - pressure + # Dimensions in mm (optional) # Use width, height, length and/or diameter @@ -87,25 +83,54 @@ keyProvisioning: keySecurity: none # Product and data sheet URLs (optional) -productURL: https://senspuck.com/ -dataSheetURL: https://senstick.co/downloads/Senspuck-Pure-SPU20-Datasheet.pdf +productURL: https://senzemo.com/products/indoor-air-quality-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2022/12/Senspuck-Pure-Battery-SPU10B-Datasheet.pdf resellerURLs: - name: 'Sensational Systems' region: - - European Union + - United Kingdom url: https://sensational.systems/ - name: 'Arcsgroup' region: - Australia url: https://thearcsgroup.com/ - - name: 'mydevices' + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT region: - United States - url: https://mydevices.com/ - - name: 'Concept13' + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) region: - European Union - url: https://www.concept13.co.uk/ + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + # Photos photos: diff --git a/vendor/senzemo/spu20b.yaml b/vendor/senzemo/spu20b.yaml index 2caec59877..9bd9ff9779 100644 --- a/vendor/senzemo/spu20b.yaml +++ b/vendor/senzemo/spu20b.yaml @@ -41,11 +41,7 @@ firmwareVersions: # humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, # vibration, water, wind direction and wind speed. sensors: - - co2 - - tvoc - - temperature - - humidity - - pressure + # Dimensions in mm (optional) # Use width, height, length and/or diameter @@ -87,25 +83,54 @@ keyProvisioning: keySecurity: none # Product and data sheet URLs (optional) -productURL: https://senspuck.com/ -dataSheetURL: https://senstick.co/downloads/Senspuck-Pure-Battery-SPU20B-Datasheet.pdf +productURL: https://senzemo.com/products/indoor-air-quality-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2022/12/Senspuck-Pure-Battery-SPU10B-Datasheet.pdf resellerURLs: - name: 'Sensational Systems' region: - - European Union + - United Kingdom url: https://sensational.systems/ - name: 'Arcsgroup' region: - Australia url: https://thearcsgroup.com/ - - name: 'mydevices' + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT region: - United States - url: https://mydevices.com/ - - name: 'Concept13' + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) region: - European Union - url: https://www.concept13.co.uk/ + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + # Photos photos: diff --git a/vendor/senzemo/srm10-codec.yaml b/vendor/senzemo/srm10-codec.yaml new file mode 100644 index 0000000000..ab8d9be1ff --- /dev/null +++ b/vendor/senzemo/srm10-codec.yaml @@ -0,0 +1,4 @@ +# 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: srm10.js diff --git a/vendor/senzemo/srm10.js b/vendor/senzemo/srm10.js new file mode 100644 index 0000000000..ea4e310ac7 --- /dev/null +++ b/vendor/senzemo/srm10.js @@ -0,0 +1,148 @@ +/* + + _____ _____ __ _ __ + / ___/___ ____ ____ ___ ____ ___ ____ / ___/___ ____ _____/ /_(_)____/ /__ + \__ \/ _ \/ __ \/_ / / _ \/ __ `__ \/ __ \\__ \/ _ \/ __ \/ ___/ __/ / ___/ //_/ + ___/ / __/ / / / / /_/ __/ / / / / / /_/ /__/ / __/ / / (__ ) /_/ / /__/ ,< +/____/\___/_/ /_/ /___/\___/_/ /_/ /_/\____/____/\___/_/ /_/____/\__/_/\___/_/|_| + + Senstick SRM10 HW 1.0 - FW 1.0 +*/ + + +function decodeUplink(input) { + const bytes = input.bytes; + const port = input.fPort; + + var Status; + var CurRainIntCnt; + var CurRainCnt; + var TotRainCnt; + var BatteryLevel; + + // Alarm Packet + if (port == 1) + { + if (bytes.length == 1) + { + Status = bytes[0]; + + return { + data: { + Status: bitsToMsg(Status), + }, + warnings: [], + errors: [] + }; + } + } + + // If Data Packet + else if (port == 2) + { + if (bytes.length == 8) + { + CurRainIntCnt = bytes[0]; + CurRainCnt = (bytes[1] << 8) + bytes[2]; + TotRainCnt = (bytes[3] << 24) + (bytes[4] << 16) + (bytes[5] << 8) + bytes[6]; + BatteryLevel = bytes[7]; + + return { + data: { + CurrentRain: (CurRainIntCnt * 0.2).toFixed(1), + CurrentRainTotal: (CurRainCnt * 0.2).toFixed(1), + TotalRain: (TotRainCnt * 0.2).toFixed(1), + BatteryLevel: map(BatteryLevel, 0, 255, 800, 1800) + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 9) + { + Status = bytes[0]; + CurRainIntCnt = bytes[1]; + CurRainCnt = (bytes[2] << 8) + bytes[3]; + TotRainCnt = (bytes[4] << 24) + (bytes[5] << 16) + (bytes[6] << 8) + bytes[7]; + BatteryLevel = bytes[8]; + + return { + data: { + Status: bitsToMsg(Status), + CurrentRain: (CurRainIntCnt * 0.2).toFixed(1), + CurrentRainTotal: (CurRainCnt * 0.2).toFixed(1), + TotalRain: (TotRainCnt * 0.2).toFixed(1), + BatteryLevel: map(BatteryLevel, 0, 255, 800, 1800) + }, + warnings: [], + errors: [] + }; + } + } + + // If Config packet + else if (port == 3) + { + Status = bytes[0]; + var SendPeriod = bytes[1]; + var MovementThreshold = bytes[2]; + var PacketConfirm = bytes[3]; + var DataRatePlusADR = bytes[4]; + var FamilyId = bytes[5]; + var ProductId = bytes[6]; + var HW = bytes[7]; + var FW = bytes[8]; + + var ADRon = Boolean(DataRatePlusADR & (1 << 7)); + var DataRate = (DataRatePlusADR & 0x7F); + + return { + data: { + Status: bitsToMsg(Status), + SendPeriod: SendPeriod, + MovementThreshold: MovementThreshold, + PacketConfirm: PacketConfirm, + DataRate: DataRate, + ADRon: ADRon, + FamilyId: FamilyId, + ProductId: ProductId, + HW: HW/10, + FW: FW/10 + }, + warnings: [], + errors: [] + }; + } +} + +function bitsToMsg (B){ + var msg = ""; + if(B === 0) {msg = "OK "} + if(((B >> 0) & 1) === 1){msg += "Movement Detected Packet, "} + if(((B >> 1) & 1) === 1){msg += "Movement Detected Confirmed, "} + if(((B >> 2) & 1) === 1){msg += "Battery Low Power, "} + if(((B >> 3) & 1) === 1){msg += "Accelerometer Failure, "} + if(((B >> 4) & 1) === 1){msg += "T/RH Sensor Failure, "} + if(((B >> 5) & 1) === 1){msg += "AP Sensor Failure, "} + if(((B >> 6) & 1) === 1){msg += "NFC Failure, "} + if(((B >> 7) & 1) === 1){msg += "Temperature Probe Failure, "} + msg = msg.slice (0, -2); + return msg; +} + +function sintToDec(T){ + if (T > 32767) { + return ((T - 65536) / 100.0); + } + else { + return (T / 100.0); + } +} + +function map(x, in_min, in_max, out_min, out_max){ + var temp = ((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); + temp=temp/1000; + temp = temp.toFixed(2); + return (temp); +} \ No newline at end of file diff --git a/vendor/senzemo/srm10.png b/vendor/senzemo/srm10.png new file mode 100644 index 0000000000..9204503d92 Binary files /dev/null and b/vendor/senzemo/srm10.png differ diff --git a/vendor/senzemo/srm10.yaml b/vendor/senzemo/srm10.yaml new file mode 100644 index 0000000000..7724b8e914 --- /dev/null +++ b/vendor/senzemo/srm10.yaml @@ -0,0 +1,162 @@ +name: srm10 - Senstick Rain Meter +description: Rain Meter LoRaWAN® sensor, SRM10 collects data for rain precipitation. +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '1.0' + numeric: 10 + partNumber: srm10 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.0' + numeric: 10 + # 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: profile-eu868 + lorawanCertified: false + codec: srm10-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: srm10-codec + US902-928: + id: profile-us915 + lorawanCertified: false + codec: srm10-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: srm10-codec + +# Sensors that this device features (optional) +# Valid values are: accelerometer, altitude, auxiliary, barometer, battery, button, co2, distance, dust, gps, gyroscope, +# humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, +# vibration, water, wind direction and wind speed. +sensors: + + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 25 + length: 105 + height: 25 + +# Weight in grams (optional) +weight: 90 + +# Battery information (optional) +battery: + replaceable: true + type: AA + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -40 + max: 85 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1.00 + +# IP rating (optional) +ipCode: IP67 + +# Key provisioning (optional) +# Valid values are: custom (user can configure keys), join server and manifest. +keyProvisioning: + - custom + - join server + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://senzemo.com/products/rain-meter/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2023/06/Senstick-Rainmeter-SRM10-Datasheet-1.1.pptx.pdf +resellerURLs: + - name: 'Sensational Systems' + region: + - United Kingdom + url: https://sensational.systems/ + - name: 'Arcsgroup' + region: + - Australia + url: https://thearcsgroup.com/ + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT + region: + - United States + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) + region: + - European Union + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + + +# Photos +photos: + main: srm10.png + + +# Youtube or Vimeo Video (optional) + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 303 446-1 + - body: ETSI + norm: EN + standard: 303 446-2 + - body: ETSI + norm: EN + standard: 301 489-17 + - body: ETSI + norm: EN + standard: 61000-6-1 + - body: IEC + norm: EN + standard: 61000-6-2 diff --git a/vendor/senzemo/ssm40-codec.yaml b/vendor/senzemo/ssm40-codec.yaml new file mode 100644 index 0000000000..d1ceb8fefa --- /dev/null +++ b/vendor/senzemo/ssm40-codec.yaml @@ -0,0 +1,4 @@ +# 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: ssm40.js diff --git a/vendor/senzemo/ssm40.js b/vendor/senzemo/ssm40.js new file mode 100644 index 0000000000..419dd441b2 --- /dev/null +++ b/vendor/senzemo/ssm40.js @@ -0,0 +1,155 @@ +/* + + _____ _____ __ _ __ + / ___/___ ____ ____ ___ ____ ___ ____ / ___/___ ____ _____/ /_(_)____/ /__ + \__ \/ _ \/ __ \/_ / / _ \/ __ `__ \/ __ \\__ \/ _ \/ __ \/ ___/ __/ / ___/ //_/ + ___/ / __/ / / / / /_/ __/ / / / / / /_/ /__/ / __/ / / (__ ) /_/ / /__/ ,< +/____/\___/_/ /_/ /___/\___/_/ /_/ /_/\____/____/\___/_/ /_/____/\__/_/\___/_/|_| + + Senstick SSM40 HW 4.0 - FW 1.0 +*/ + + +function decodeUplink(input) { + const bytes = input.bytes; + const port = input.fPort; + + var Status; + var BatteryVoltage; + var SensorVoltage; + var SoilMoisture; + var VWC; + + // Alarm Packet + if (port == 1) + { + if (bytes.length == 1) + { + Status = bytes[0]; + + return { + data: { + Status: Status + }, + warnings: [], + errors: [] + }; + } + } + + // Data Packet + else if (port == 2) + { + if (bytes.length == 4) + { + BatteryVoltage = (bytes[0] << 8) + bytes[1]; + SensorVoltage = (bytes[2] << 8) + bytes[3]; + + return { + data: { + BatteryVoltage: BatteryVoltage, + SensorVoltage: SensorVoltage, + SoilMoisture: voltageToMoisture(SensorVoltage), + VWC: voltageToVWC(SensorVoltage) + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 5) + { + Status = bytes[0]; + BatteryVoltage = (bytes[1] << 8) + bytes[2]; + SensorVoltage = (bytes[3] << 8) + bytes[4]; + + return { + data: { + Status: Status, + BatteryVoltage: BatteryVoltage, + SensorVoltage: SensorVoltage, + SoilMoisture: voltageToMoisture(SensorVoltage), + VWC: voltageToVWC(SensorVoltage) + }, + warnings: [], + errors: [] + }; + } + } + + // If Config packet + else if (port == 3) + { + if (bytes.length == 9) + { + Status = bytes[0]; + var SendPeriod = bytes[1]; + var MoveThr = bytes[2]; + var PacketConfirm = bytes[3]; + var DataRatePlusADR = bytes[4]; + var FamilyId = bytes[5]; + var ProductId = bytes[6]; + var HW = bytes[7]; + var FW = bytes[8]; + + var ADRon = Boolean(DataRatePlusADR & (1 << 7)); + var DataRate = (DataRatePlusADR & 0x7F); + + return { + data: { + Status: Status, + SendPeriod: SendPeriod, + MoveThr:MoveThr, + PacketConfirm: PacketConfirm, + DataRate: DataRate, + ADRon: ADRon, + FamilyId: FamilyId, + ProductId: ProductId, + HW: HW/10, + FW: FW/10 + }, + warnings: [], + errors: [] + }; + } + } + + // RTT FW warning + else if (port == 4) + { + var warning = "RTT FIRMWARE"; + + return { + data: { + warning: warning + }, + warnings: [], + errors: [] + }; + } +} + + +function voltageToMoisture (mV) +{ + var Vmax = 2876; // Max mV @ 100% = 2871-2882 mV + var Vmin = 44; // Min mV @ 0% = 44 mV + + var SM = Math.round((mV - Vmin) * 100 / (Vmax - Vmin)); + + if (SM > 100) SM = 100; + else if (SM < 0) SM = 0; + + return (SM); +} + +function voltageToVWC (mV) +{ + var Voltage = mV / 1000; + var VWC_value = (2.8432 * Voltage * Voltage * Voltage) - (9.1993 * Voltage * Voltage) + (20.2553 * Voltage) - 4.1882; + VWC_value = Math.round(VWC_value); + + if (VWC_value < 0) VWC_value = 0; + + return VWC_value; +} \ No newline at end of file diff --git a/vendor/senzemo/ssm40.png b/vendor/senzemo/ssm40.png new file mode 100644 index 0000000000..cfcf7bde17 Binary files /dev/null and b/vendor/senzemo/ssm40.png differ diff --git a/vendor/senzemo/ssm40.yaml b/vendor/senzemo/ssm40.yaml new file mode 100644 index 0000000000..9e27e73c2c --- /dev/null +++ b/vendor/senzemo/ssm40.yaml @@ -0,0 +1,162 @@ +name: ssm40 - Senstick Soil Moisture +description: Senstick Soil Moisture sensor, SSM40 is a reliable LoRaWAN® sensor for agriculture. +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '4.0' + numeric: 40 + partNumber: ssm40 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.0' + numeric: 10 + # 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: profile-eu868 + lorawanCertified: false + codec: ssm40-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: ssm40-codec + US902-928: + id: profile-us915 + lorawanCertified: false + codec: ssm40-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: ssm40-codec + +# Sensors that this device features (optional) +# Valid values are: accelerometer, altitude, auxiliary, barometer, battery, button, co2, distance, dust, gps, gyroscope, +# humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, +# vibration, water, wind direction and wind speed. +sensors: + + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 25 + length: 105 + height: 25 + +# Weight in grams (optional) +weight: 90 + +# Battery information (optional) +battery: + replaceable: true + type: ER14505 + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -40 + max: 85 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1.00 + +# IP rating (optional) +ipCode: IP67 + +# Key provisioning (optional) +# Valid values are: custom (user can configure keys), join server and manifest. +keyProvisioning: + - custom + - join server + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://senzemo.com/products/soil-moisture-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2023/04/Senstick-SSM40_Datasheet_1v0.pptx.pdf +resellerURLs: + - name: 'Sensational Systems' + region: + - United Kingdom + url: https://sensational.systems/ + - name: 'Arcsgroup' + region: + - Australia + url: https://thearcsgroup.com/ + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT + region: + - United States + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) + region: + - European Union + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + + +# Photos +photos: + main: ssm40.png + + +# Youtube or Vimeo Video (optional) + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 303 446-1 + - body: ETSI + norm: EN + standard: 303 446-2 + - body: ETSI + norm: EN + standard: 301 489-17 + - body: ETSI + norm: EN + standard: 61000-6-1 + - body: IEC + norm: EN + standard: 61000-6-2 diff --git a/vendor/senzemo/stf40-codec.yaml b/vendor/senzemo/stf40-codec.yaml new file mode 100644 index 0000000000..7590ccf740 --- /dev/null +++ b/vendor/senzemo/stf40-codec.yaml @@ -0,0 +1,4 @@ +# 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: stf40.js diff --git a/vendor/senzemo/stf40.js b/vendor/senzemo/stf40.js new file mode 100644 index 0000000000..14b97e0a76 --- /dev/null +++ b/vendor/senzemo/stf40.js @@ -0,0 +1,180 @@ +/* + + _____ _____ __ _ __ + / ___/___ ____ ____ ___ ____ ___ ____ / ___/___ ____ _____/ /_(_)____/ /__ + \__ \/ _ \/ __ \/_ / / _ \/ __ `__ \/ __ \\__ \/ _ \/ __ \/ ___/ __/ / ___/ //_/ + ___/ / __/ / / / / /_/ __/ / / / / / /_/ /__/ / __/ / / (__ ) /_/ / /__/ ,< +/____/\___/_/ /_/ /___/\___/_/ /_/ /_/\____/____/\___/_/ /_/____/\__/_/\___/_/|_| + + Senstick STF40 HW 4.0 - FW 1.0 +*/ + + +function decodeUplink(input) { + const bytes = input.bytes; + const port = input.fPort; + + var Status; + var BatteryVoltage; + var ProbeTemperature; + var SensorVoltage; + var NTCresistance; + var vdda; + + // Alarm Packet + if (port == 1) + { + if (bytes.length == 1) + { + Status = bytes[0]; + + return { + data: { + Status: Status + }, + warnings: [], + errors: [] + }; + } + } + + // Data Packet + else if (port == 2) + { + if (bytes.length == 4) + { + BatteryVoltage = (bytes[0] << 8) + bytes[1]; + ProbeTemperature = (bytes[2] << 8) + bytes[3]; + + return { + data: { + BatteryVoltage: BatteryVoltage, + ProbeTemperature: sintToDec(ProbeTemperature) + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 5) + { + Status = bytes[0]; + BatteryVoltage = (bytes[1] << 8) + bytes[2]; + ProbeTemperature = (bytes[3] << 8) + bytes[4]; + + return { + data: { + Status: Status, + BatteryVoltage: BatteryVoltage, + ProbeTemperature: sintToDec(ProbeTemperature) + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 12) + { + BatteryVoltage = (bytes[0] << 8) + bytes[1]; + ProbeTemperature = (bytes[2] << 8) + bytes[3]; + SensorVoltage = (bytes[4] << 8) + bytes[5]; + NTCresistance = (bytes[6] << 24) + (bytes[7] << 16) + (bytes[8] << 8) + bytes[9]; + vdda = (bytes[10] << 8) + bytes[11]; + + return { + data: { + BatteryVoltage: BatteryVoltage, + ProbeTemperature: sintToDec(ProbeTemperature), + SensorVoltage: SensorVoltage, + NTCresistance: NTCresistance, + vdda: vdda + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 13) + { + Status = bytes[0]; + BatteryVoltage = (bytes[1] << 8) + bytes[2]; + ProbeTemperature = (bytes[3] << 8) + bytes[4]; + SensorVoltage = (bytes[5] << 8) + bytes[6]; + NTCresistance = (bytes[7] << 24) + (bytes[8] << 16) + (bytes[9] << 8) + bytes[10]; + vdda = (bytes[11] << 8) + bytes[12]; + + return { + data: { + Status: Status, + BatteryVoltage: BatteryVoltage, + ProbeTemperature: sintToDec(ProbeTemperature), + SensorVoltage: SensorVoltage, + NTCresistance: NTCresistance, + vdda: vdda + }, + warnings: [], + errors: [] + }; + } + } + + // If Config packet + else if (port == 3) + { + if (bytes.length == 9) + { + Status = bytes[0]; + var SendPeriod = bytes[1]; + var MoveThr = bytes[2]; + var PacketConfirm = bytes[3]; + var DataRatePlusADR = bytes[4]; + var FamilyId = bytes[5]; + var ProductId = bytes[6]; + var HW = bytes[7]; + var FW = bytes[8]; + + var ADRon = Boolean(DataRatePlusADR & (1 << 7)); + var DataRate = (DataRatePlusADR & 0x7F); + + return { + data: { + Status: Status, + SendPeriod: SendPeriod, + MoveThr:MoveThr, + PacketConfirm: PacketConfirm, + DataRate: DataRate, + ADRon: ADRon, + FamilyId: FamilyId, + ProductId: ProductId, + HW: HW/10, + FW: FW/10 + }, + warnings: [], + errors: [] + }; + } + } + + // RTT FW warning + else if (port == 4) + { + var warning = "RTT FIRMWARE"; + + return { + data: { + warning: warning + }, + warnings: [], + errors: [] + }; + } +} +function sintToDec(T) +{ + if (T > 32767) { + return ((T - 65536) / 100.0); + } + else { + return (T / 100.0); + } +} \ No newline at end of file diff --git a/vendor/senzemo/stf40.png b/vendor/senzemo/stf40.png new file mode 100644 index 0000000000..49343d0d69 Binary files /dev/null and b/vendor/senzemo/stf40.png differ diff --git a/vendor/senzemo/stf40.yaml b/vendor/senzemo/stf40.yaml new file mode 100644 index 0000000000..0e2a379567 --- /dev/null +++ b/vendor/senzemo/stf40.yaml @@ -0,0 +1,162 @@ +name: stf40 - Senstick Food Temperature +description: Food Probe Sensor STF40 is great for measuring food storage and cooking temperature. +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '4.0' + numeric: 40 + partNumber: stf40 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.0' + numeric: 10 + # 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: profile-eu868 + lorawanCertified: false + codec: stf40-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: stf40-codec + US902-928: + id: profile-us915 + lorawanCertified: false + codec: stf40-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: stf40-codec + +# Sensors that this device features (optional) +# Valid values are: accelerometer, altitude, auxiliary, barometer, battery, button, co2, distance, dust, gps, gyroscope, +# humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, +# vibration, water, wind direction and wind speed. +sensors: + + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 25 + length: 105 + height: 25 + +# Weight in grams (optional) +weight: 90 + +# Battery information (optional) +battery: + replaceable: true + type: ER14505 + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -40 + max: 85 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1.00 + +# IP rating (optional) +ipCode: IP67 + +# Key provisioning (optional) +# Valid values are: custom (user can configure keys), join server and manifest. +keyProvisioning: + - custom + - join server + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://senzemo.com/products/food-probe-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2023/08/Senstick-STF40_Datasheet_1v0.pptx-1.pdf +resellerURLs: + - name: 'Sensational Systems' + region: + - United Kingdom + url: https://sensational.systems/ + - name: 'Arcsgroup' + region: + - Australia + url: https://thearcsgroup.com/ + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT + region: + - United States + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) + region: + - European Union + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + + +# Photos +photos: + main: stf40.png + + +# Youtube or Vimeo Video (optional) + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 303 446-1 + - body: ETSI + norm: EN + standard: 303 446-2 + - body: ETSI + norm: EN + standard: 301 489-17 + - body: ETSI + norm: EN + standard: 61000-6-1 + - body: IEC + norm: EN + standard: 61000-6-2 diff --git a/vendor/senzemo/sto10-codec.yaml b/vendor/senzemo/sto10-codec.yaml new file mode 100644 index 0000000000..96ba5a9e31 --- /dev/null +++ b/vendor/senzemo/sto10-codec.yaml @@ -0,0 +1,4 @@ +# 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: sto10.js diff --git a/vendor/senzemo/sto10.js b/vendor/senzemo/sto10.js new file mode 100644 index 0000000000..abd91fb7a3 --- /dev/null +++ b/vendor/senzemo/sto10.js @@ -0,0 +1,157 @@ +/* + + _____ _____ __ _ __ + / ___/___ ____ ____ ___ ____ ___ ____ / ___/___ ____ _____/ /_(_)____/ /__ + \__ \/ _ \/ __ \/_ / / _ \/ __ `__ \/ __ \\__ \/ _ \/ __ \/ ___/ __/ / ___/ //_/ + ___/ / __/ / / / / /_/ __/ / / / / / /_/ /__/ / __/ / / (__ ) /_/ / /__/ ,< +/____/\___/_/ /_/ /___/\___/_/ /_/ /_/\____/____/\___/_/ /_/____/\__/_/\___/_/|_| + + Senstick STO10 HW 1.0 - FW 1.0 +*/ + + +function decodeUplink(input) +{ + const bytes = input.bytes; + const port = input.fPort; + + var Status; + var Temperature; + var BatteryLevel; + + // Alarm Packet + if (port == 1) + { + if (bytes.length == 1) + { + Status = bytes[0]; + + return { + data: { + Status: bitsToMsg (Status) + }, + warnings: [], + errors: [] + }; + } + } + + // If Data Packet + if (port == 2) + { + if (bytes.length == 3) + { + Temperature = (bytes[0] << 8) + bytes[1]; + BatteryLevel = bytes[2]; + + return { + data: { + Status: bitsToMsg (0), + Temperature: sintToDec(Temperature), + BatteryLevel: map(BatteryLevel, 0, 255, 800, 1800) + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 4) + { + Status = bytes[0]; + Temperature = (bytes[1] << 8) + bytes[2]; + BatteryLevel = bytes[3]; + + return { + data: { + Status: bitsToMsg (Status), + Temperature: sintToDec(Temperature), + BatteryLevel: map(BatteryLevel, 0, 255, 800, 1800) + }, + warnings: [], + errors: [] + }; + } + } + + // If Config packet + else if (port == 3) + { + if (bytes.length == 9) + { + Status = bytes[0]; + var SendPeriod = bytes[1]; + var MoveThr = bytes[2]; + var PacketConfirm = bytes[3]; + var DataRatePlusADR = bytes[4]; + var FamilyId = bytes[5]; + var ProductId = bytes[6]; + var HW = bytes[7]; + var FW = bytes[8]; + + var ADRon = Boolean(DataRatePlusADR & (1 << 7)); + var DataRate = (DataRatePlusADR & 0x7F); + + + return { + data: { + Status: bitsToMsg (Status), + SendPeriod: SendPeriod, + MoveThr:MoveThr, + PacketConfirm: PacketConfirm, + DataRate: DataRate, + ADRon: ADRon, + FamilyId: FamilyId, + ProductId: ProductId, + HW: HW/10, + FW: FW/10 + }, + warnings: [], + errors: [] + }; + } + } + + // RTT FW warning + else if (port == 4) + { + var warning = "RTT FIRMWARE"; + + return { + data: { + warning: warning + }, + warnings: [], + errors: [] + }; + } +} + + +function sintToDec(T){ + if (T > 32767) { + return ((T - 65536) / 100.0); + } + else { + return (T / 100.0); + } +} + +function map(x, in_min, in_max, out_min, out_max){ + var temp = ((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); + temp = temp.toFixed(); + return (temp); +} + +function bitsToMsg (B){ + var msg = ""; + if(B === 0) {msg = "OK "} + if(((B >> 0) & 1) === 1){msg += "Movement Detected Packet, "} + if(((B >> 1) & 1) === 1){msg += "Movement Detected Confirmed, "} + if(((B >> 2) & 1) === 1){msg += "Accelerometer Failure, "} + if(((B >> 3) & 1) === 1){msg += "Temperature Sensor Failure, "} + if(((B >> 4) & 1) === 1){msg += "NFC IC Failure, "} + if(((B >> 5) & 1) === 1){msg += "EUI IC Failure, "} + if(((B >> 6) & 1) === 1){msg += "Wrong Battery, "} + msg = msg.slice (0, -2); + return msg; +} \ No newline at end of file diff --git a/vendor/senzemo/sto10.png b/vendor/senzemo/sto10.png new file mode 100644 index 0000000000..fc21c77c2c Binary files /dev/null and b/vendor/senzemo/sto10.png differ diff --git a/vendor/senzemo/sto10.yaml b/vendor/senzemo/sto10.yaml new file mode 100644 index 0000000000..41a0d2a8dd --- /dev/null +++ b/vendor/senzemo/sto10.yaml @@ -0,0 +1,163 @@ +name: STO10 - Senstick Temperature Only +description: Temperature Only LoRaWAN® sensor, STO10 collects data for temperature and is ideal for HACCP, Cold Chain monitoring. + +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '1.0' + numeric: 10 + partNumber: STO10 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.0' + numeric: 10 + # 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: profile-eu868 + lorawanCertified: false + codec: sto10-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: sto10-codec + US902-928: + id: profile-us915 + lorawanCertified: false + codec: sto10-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: sto10-codec + +# Sensors that this device features (optional) +# Valid values are: accelerometer, altitude, auxiliary, barometer, battery, button, co2, distance, dust, gps, gyroscope, +# humidity, light, link, magnetometer, moisture, ph, pir, proximity, rssi, snr, sound, temperature, tvoc, velocity, +# vibration, water, wind direction and wind speed. +sensors: + + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 25 + length: 105 + height: 25 + +# Weight in grams (optional) +weight: 90 + +# Battery information (optional) +battery: + replaceable: true + type: AA + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -40 + max: 85 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1.00 + +# IP rating (optional) +ipCode: IP67 + +# Key provisioning (optional) +# Valid values are: custom (user can configure keys), join server and manifest. +keyProvisioning: + - custom + - join server + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://senzemo.com/products/temperature-only-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2024/05/Senstick-STO10_Datasheet_1v0.pdf +resellerURLs: + - name: 'Sensational Systems' + region: + - United Kingdom + url: https://sensational.systems/ + - name: 'Arcsgroup' + region: + - Australia + url: https://thearcsgroup.com/ + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT + region: + - United States + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) + region: + - European Union + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + + +# Photos +photos: + main: sto10.png + + +# Youtube or Vimeo Video (optional) + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 303 446-1 + - body: ETSI + norm: EN + standard: 303 446-2 + - body: ETSI + norm: EN + standard: 301 489-17 + - body: ETSI + norm: EN + standard: 61000-6-1 + - body: IEC + norm: EN + standard: 61000-6-2 diff --git a/vendor/senzemo/stp40-codec.yaml b/vendor/senzemo/stp40-codec.yaml new file mode 100644 index 0000000000..3d6040daec --- /dev/null +++ b/vendor/senzemo/stp40-codec.yaml @@ -0,0 +1,4 @@ +# 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: stp40.js diff --git a/vendor/senzemo/stp40.js b/vendor/senzemo/stp40.js new file mode 100644 index 0000000000..8abd3120dd --- /dev/null +++ b/vendor/senzemo/stp40.js @@ -0,0 +1,111 @@ +/* + + _____ _____ __ _ __ + / ___/___ ____ ____ ___ ____ ___ ____ / ___/___ ____ _____/ /_(_)____/ /__ + \__ \/ _ \/ __ \/_ / / _ \/ __ `__ \/ __ \\__ \/ _ \/ __ \/ ___/ __/ / ___/ //_/ + ___/ / __/ / / / / /_/ __/ / / / / / /_/ /__/ / __/ / / (__ ) /_/ / /__/ ,< +/____/\___/_/ /_/ /___/\___/_/ /_/ /_/\____/____/\___/_/ /_/____/\__/_/\___/_/|_| + + Senstick STP40 HW 4.0 - FW 1.0 +*/ + + +function decodeUplink(input) +{ + const bytes = input.bytes; + const port = input.fPort; + + var Status; + var Temperature; + var Battery; + + // Alarm Packet + if (port == 1) + { + if (bytes.length == 1) + { + Status = bytes[0]; + + return { + data: { + Status: Status + }, + warnings: [], + errors: [] + }; + } + } + + // Data Packet + else if (port == 2) + { + if (bytes.length == 4) + { + Temperature = (bytes[0] << 8) + bytes[1]; + Battery = (bytes[2] << 8) + bytes[3]; + + return { + data: { + Temperature: Temperature/100, + Battery: Battery + }, + warnings: [], + errors: [] + }; + } + + else if (bytes.length == 5) + { + Status = bytes[0]; + Temperature = (bytes[1] << 8) + bytes[2]; + Battery = (bytes[3] << 8) + bytes[4]; + + return { + data: { + Status: Status, + Temperature: Temperature/100, + Battery: Battery + }, + warnings: [], + errors: [] + }; + } + } + + // If Config packet + else if (port == 3) + { + if (bytes.length == 10) + { + Status = bytes[0]; + var SendPeriod = bytes[1]; + var MoveThr = bytes[2]; + var PacketConfirm = bytes[3]; + var DataRatePlusADR = bytes[4]; + var FamilyId = bytes[5]; + var ProductId = bytes[6]; + var HW = bytes[7]; + var FW = bytes[8]; + + var ADRon = Boolean(DataRatePlusADR & (1 << 7)); + var DataRate = (DataRatePlusADR & 0x7F); + + return { + data: { + Status: Status, + SendPeriod: SendPeriod, + MoveThr:MoveThr, + PacketConfirm: PacketConfirm, + DataRate: DataRate, + ADRon: ADRon, + FamilyId: FamilyId, + ProductId: ProductId, + HW: HW/10, + FW: FW/10 + }, + warnings: [], + errors: [] + }; + } + } +} \ No newline at end of file diff --git a/vendor/senzemo/stp40.png b/vendor/senzemo/stp40.png new file mode 100644 index 0000000000..0ca7083e6c Binary files /dev/null and b/vendor/senzemo/stp40.png differ diff --git a/vendor/senzemo/stp40.yaml b/vendor/senzemo/stp40.yaml new file mode 100644 index 0000000000..389485350d --- /dev/null +++ b/vendor/senzemo/stp40.yaml @@ -0,0 +1,166 @@ +name: stp40 - Senstick Temperature Probe +description: Industrial LoRaWAN® probe sensor, STP40 measures temperature and is suitable for different industries. +# Hardware versions (optional, use when you have revisions) +hardwareVersions: + - version: '4.0' + numeric: 40 + partNumber: stp40 + +# Firmware versions (at least one is mandatory) +firmwareVersions: + - # Firmware version + version: '1.0' + numeric: 10 + # 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: profile-eu868 + lorawanCertified: false + codec: stp40-codec + AS923: + id: profile-as923 + lorawanCertified: false + codec: stp40-codec + US902-928: + id: profile-us915 + lorawanCertified: false + codec: stp40-codec + AU915-928: + id: profile-au915 + lorawanCertified: false + codec: stp40-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, +# digital output, dissolved oxygen, distance, dust, energy, gps, gyroscope, h2s, hall effect, humidity, iaq, infrared, leaf wetness, level, +# light, lightning, link, magnetometer, moisture, motion, nfc, no, no2, o3, occupancy, optical meter, particulate matter, ph, pir, +# pm2.5, pm10, potentiometer, power, precipitation, pressure, proximity, pulse count, pulse frequency, radar, rainfall, reed switch, rssi, +# sap flow, smart valve, smoke, snr, so2, solar radiation, sound, strain, surface temperature, switch, temperature, tilt, time, turbidity, +# tvoc, uv, vapor pressure, velocity, vibration, voltage, water potential, water, weight, wifi ssid, wind direction, wind speed. +sensors: + + +# Dimensions in mm (optional) +# Use width, height, length and/or diameter +dimensions: + width: 25 + length: 105 + height: 25 + +# Weight in grams (optional) +weight: 90 + +# Battery information (optional) +battery: + replaceable: true + type: ER14505 + +# Operating conditions (optional) +operatingConditions: + # Temperature (Celsius) + temperature: + min: -40 + max: 85 + # Relative humidity (fraction of 1) + relativeHumidity: + min: 0 + max: 1.00 + +# IP rating (optional) +ipCode: IP67 + +# Key provisioning (optional) +# Valid values are: custom (user can configure keys), join server and manifest. +keyProvisioning: + - custom + - join server + +# Key security (optional) +# Valid values are: none, read protected and secure element. +keySecurity: none + +# Product and data sheet URLs (optional) +productURL: https://senzemo.com/products/temperature-probe-sensor/ +dataSheetURL: https://senzemo.com/wp-content/uploads/2023/08/Senstick-STP40_Datasheet_1v0.pptx.pdf +resellerURLs: + - name: 'Sensational Systems' + region: + - United Kingdom + url: https://sensational.systems/ + - name: 'Arcsgroup' + region: + - Australia + url: https://thearcsgroup.com/ + - name: Choovio + region: + - United States + url: https://www.choovio.com/iot-online-shop/brand/senzemo-distributor/ + - name: IrysIoT + region: + - United States + url: https://irysiot.com/ + - name: IoT Shop (Alpha-Omega Gmbh.) + region: + - European Union + url: https://iot-shop.de/en/shop/category/brand-senzemo-945 + - name: M2M Germany + region: + - European Union + url: https://www.m2mgermany.de/ + - name: Allnet + region: + - European Union + url: https://www.allnet.de/ + - name: IoT Systems + region: + - European Union + url: https://www.iot-systems.at/ + - name: AgroID + region: + - European Union + url: https://www.agroid.it/ + - name: EdgeIoT + region: + - Brazil + url: https://www.edgeiot.com.br/ + - name: ES Canada + region: + - Canada + url: https://www.es-canada.com/ + + +# Photos +photos: + main: stp40.png + + +# Youtube or Vimeo Video (optional) + +# Regulatory compliances (optional) +compliances: + safety: + - body: IEC + norm: EN + standard: 62368-1 + radioEquipment: + - body: ETSI + norm: EN + standard: 303 446-1 + - body: ETSI + norm: EN + standard: 303 446-2 + - body: ETSI + norm: EN + standard: 301 489-17 + - body: ETSI + norm: EN + standard: 61000-6-1 + - body: IEC + norm: EN + standard: 61000-6-2