Skip to content

Commit

Permalink
Quandify CubicMeter 1.1 support (#824)
Browse files Browse the repository at this point in the history
* Added cubicmeter plastic

* Added cubicmeter copper

* Name change

* Added decoder for copper

* Combined decoder to one js file

* Added normalized formatter

* Added more errors and removed unused fields from decoded data struct

* Fixed decoded temperature return to be number not string

* Added leak type and battery warning to warning

* Altered the data structure of normalized output
  • Loading branch information
peter-quandify committed Sep 20, 2024
1 parent 76f4658 commit 41f0da9
Show file tree
Hide file tree
Showing 10 changed files with 434 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"type": "object",
"properties": {
"leak": {
"type": "boolean",
"type": ["boolean", "string"],
"description": "Leak detected"
}
},
Expand Down
4 changes: 4 additions & 0 deletions vendor/quandify/cubicmeter-1-1-copper-codec.yaml
Original file line number Diff line number Diff line change
@@ -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: cubicmeter-1-1-uplink.js
Binary file added vendor/quandify/cubicmeter-1-1-copper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 122 additions & 0 deletions vendor/quandify/cubicmeter-1-1-copper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: CubicMeter 1.1 Copper
description: Non-invasive water meter and leakage sensor

# Hardware versions (optional)
hardwareVersions:
- version: '1.0'
numeric: 1

# Firmware versions (at least one is mandatory)
firmwareVersions:
- # Firmware version
version: '1.0'
numeric: 1
# Supported hardware versions (optional)
hardwareVersions:
- '1.0' # Must refer to hardwareVersions declared above
# LoRaWAN Device Profiles per region
# Supported regions: EU863-870, US902-928, AU915-928, AS923, CN779-787, EU433, CN470-510, KR920-923, IN865-867, RU864-870
profiles:
EU863-870:
id: cubicmeter-1-1-profile-eu868
lorawanCertified: true
codec: cubicmeter-1-1-copper-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:
- battery
- temperature
- water

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
# additionalRadios:
# -

# Bridge interfaces (optional)
# Valid values are: modbus, m-bus, can bus, rs-485, sdi-12, analog.
# bridgeInterfaces:
# -

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
dimensions:
width: 39
length: 86
height: 82

# Weight in grams (optional)
weight: 260

# Battery information (optional)
battery:
replaceable: false
type: 3.6V Li-SOCI2

# Operating conditions (optional)
operatingConditions:
# Temperature (Celsius)
temperature:
min: 5
max: 30
# Relative humidity (fraction of 1)
# relativeHumidity:
# min:
# max:

# IP rating (optional)
# ipCode:

# Key provisioning (optional)
# Valid values are: custom (user can configure keys), join server and manifest.
# keyProvisioning:
# -

# Key programming (optional)
# Valid values are: bluetooth, nfc, wifi, serial (when the user has a serial interface to set the keys)
# and firmware (when the user should change the firmware to set the keys).
# keyProgramming:
# -

# Key security (optional)
# Valid values are: none, read protected and secure element.
# keySecurity:

# Firmware programming (optional)
# Valid values are: serial (when the user has a serial interface to update the firmware), fuota lorawan (when the device
# supports LoRaWAN FUOTA via standard interfaces) and fuota other (other wireless update mechanism).
# firmwareProgramming:
# -

# Product and data sheet URLs (optional)
productURL: https://quandify.com/cubicmeter
# dataSheetURL:

# Photos (MAKE SURE THE IMAGE HAS A TRANSPARENT BACKGROUND)
photos:
main: cubicmeter-1-1-copper.png
# Youtube or Vimeo Video (optional)
# videos:
# main:

# Regulatory compliances (optional)
# compliances:
# safety:
# - body:
# norm:
# standard:
# radioEquipment:
# - body:
# norm:
# standard:
# version:
# - body:
# norm:
# standard:
# version:
4 changes: 4 additions & 0 deletions vendor/quandify/cubicmeter-1-1-plastic-codec.yaml
Original file line number Diff line number Diff line change
@@ -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: cubicmeter-1-1-uplink.js
Binary file added vendor/quandify/cubicmeter-1-1-plastic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 122 additions & 0 deletions vendor/quandify/cubicmeter-1-1-plastic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: CubicMeter 1.1 Plastic
description: Non-invasive water meter and leakage sensor

# Hardware versions (optional)
hardwareVersions:
- version: '1.0'
numeric: 1

# Firmware versions (at least one is mandatory)
firmwareVersions:
- # Firmware version
version: '1.0'
numeric: 1
# Supported hardware versions (optional)
hardwareVersions:
- '1.0' # Must refer to hardwareVersions declared above
# LoRaWAN Device Profiles per region
# Supported regions: EU863-870, US902-928, AU915-928, AS923, CN779-787, EU433, CN470-510, KR920-923, IN865-867, RU864-870
profiles:
EU863-870:
id: cubicmeter-1-1-profile-eu868
lorawanCertified: true
codec: cubicmeter-1-1-plastic-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:
- battery
- temperature
- water

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
# additionalRadios:
# -

# Bridge interfaces (optional)
# Valid values are: modbus, m-bus, can bus, rs-485, sdi-12, analog.
# bridgeInterfaces:
# -

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
dimensions:
width: 39
length: 86
height: 82

# Weight in grams (optional)
weight: 260

# Battery information (optional)
battery:
replaceable: false
type: 3.6V Li-SOCI2

# Operating conditions (optional)
operatingConditions:
# Temperature (Celsius)
temperature:
min: 5
max: 30
# Relative humidity (fraction of 1)
# relativeHumidity:
# min:
# max:

# IP rating (optional)
# ipCode:

# Key provisioning (optional)
# Valid values are: custom (user can configure keys), join server and manifest.
# keyProvisioning:
# -

# Key programming (optional)
# Valid values are: bluetooth, nfc, wifi, serial (when the user has a serial interface to set the keys)
# and firmware (when the user should change the firmware to set the keys).
# keyProgramming:
# -

# Key security (optional)
# Valid values are: none, read protected and secure element.
# keySecurity:

# Firmware programming (optional)
# Valid values are: serial (when the user has a serial interface to update the firmware), fuota lorawan (when the device
# supports LoRaWAN FUOTA via standard interfaces) and fuota other (other wireless update mechanism).
# firmwareProgramming:
# -

# Product and data sheet URLs (optional)
productURL: https://quandify.com/cubicmeter
# dataSheetURL:

# Photos (MAKE SURE THE IMAGE HAS A TRANSPARENT BACKGROUND)
photos:
main: cubicmeter-1-1-plastic.png
# Youtube or Vimeo Video (optional)
# videos:
# main:

# Regulatory compliances (optional)
# compliances:
# safety:
# - body:
# norm:
# standard:
# radioEquipment:
# - body:
# norm:
# standard:
# version:
# - body:
# norm:
# standard:
# version:
47 changes: 47 additions & 0 deletions vendor/quandify/cubicmeter-1-1-profile-eu868.yaml
Original file line number Diff line number Diff line change
@@ -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.2
# 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, RP002-1.0.1, RP002-1.0.2, RP002-1.0.3 or RP002-1.0.4
# 1.1: RP001-1.1-RevA or RP001-1.1-RevB
regionalParametersVersion: RP001-1.0.2-RevB

# 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
Loading

0 comments on commit 41f0da9

Please sign in to comment.