Skip to content

Commit

Permalink
Fix missing sensors and add device types (#772)
Browse files Browse the repository at this point in the history
* add device_type

* add devicetype to csv

* add type converter

* add coveragetester

* update more devices & add some sensors

* update some more devices

* photos mandatory

* update valid sensor values

* update netvox

* update radio-bridge

* update tektelic

* remove digital output

* remove some devicetypes & add missing bridgeInterfaces

* change to devkit, module, cots

* lowerCamelCase

* change to deviceType

---------

Co-authored-by: Jaime Trinidad <81958808+Jaime-Trinidad@users.noreply.github.com>
  • Loading branch information
LDannijs and Jaime-Trinidad committed May 2, 2024
1 parent 14190b7 commit 3aa4c61
Show file tree
Hide file tree
Showing 290 changed files with 863 additions and 722 deletions.
5 changes: 3 additions & 2 deletions bin/csv.js
Expand Up @@ -37,6 +37,7 @@ const extractData = (filePath, vendor) => {
const name = data.name;
const vendorname = vendorNamesMap.get(vendor) || vendor; // Fallback to the vendor ID if no name is found
const description = data.description.replace(/"/g, "'");
const deviceType = data.deviceType || '';
const sensors = Array.isArray(data.sensors) ? `"${data.sensors.join(', ')}"` : '';
const imageUrl = data.photos?.main ? `"${baseUrl}/${vendor}/${data.photos.main}"` : '';
const additionalRadios = Array.isArray(data.additionalRadios) ? `"${data.additionalRadios.join(', ')}"` : '';
Expand Down Expand Up @@ -76,7 +77,7 @@ const extractData = (filePath, vendor) => {
});
});

return `"${id}","${name}","${vendorname}","${description}",${imageUrl},${sensors},${additionalRadios},${height},${width},${length},${weight},"${ipCode}","${battery_replace}","${battery_type}","${productURL}","${dataSheetURL}","${highestMacVersion}",${regionalParametersVersion},${supportsClassB},${supportsClassC}\n`;
return `"${id}","${name}","${vendorname}","${description}",${imageUrl},${sensors},${deviceType},${additionalRadios},${height},${width},${length},${weight},"${ipCode}","${battery_replace}","${battery_type}","${productURL}","${dataSheetURL}","${highestMacVersion}",${regionalParametersVersion},${supportsClassB},${supportsClassC}\n`;
}
} catch (e) {
console.error(`Failed to process ${filePath}: ${e}`);
Expand All @@ -103,7 +104,7 @@ const walkSync = (dir, vendor = '', csvContent = '') => {

// Initialize CSV data
let csvHeader =
'ID,Name,Vendor,Description,Image,Sensor,Radios,Height,Width,Length,Weight,IP Rating,Battery Replaceable?,Battery Type,Product URL,Datasheet URL,MAC Version,Regional Parameter Version,Supports Class B?, Supports Class C?\n';
'ID,Name,Vendor,Description,Image,Sensor,Device Type,Radios,Height,Width,Length,Weight,IP Rating,Battery Replaceable?,Battery Type,Product URL,Datasheet URL,MAC Version,Regional Parameter Version,Supports Class B?, Supports Class C?\n';
let csvData = walkSync(startPath);

// Save to CSV file
Expand Down
3 changes: 3 additions & 0 deletions bin/validate.js
Expand Up @@ -422,6 +422,9 @@ vendors.vendors.forEach((v) => {
});
});
}
} else {
console.error(`${key}: image is missing.`);
process.exit(1);
}
});
});
Expand Down
10 changes: 10 additions & 0 deletions schema.json
Expand Up @@ -951,6 +951,9 @@
"description": "Instructions for finding firmware version",
"examples": ["In the WebFig configuration panel, the firmware version is stated in the top left (e.g RouterOS v6.47.9)"]
},
"deviceType": {
"enum": ["devkit", "module", "cots"]
},
"sensors": {
"type": "array",
"items": {
Expand Down Expand Up @@ -978,8 +981,10 @@
"gps",
"gyroscope",
"h2s",
"hall effect",
"humidity",
"iaq",
"infrared",
"leaf wetness",
"level",
"light",
Expand All @@ -988,9 +993,11 @@
"magnetometer",
"moisture",
"motion",
"nfc",
"no",
"no2",
"o3",
"occupancy",
"optical meter",
"particulate matter",
"ph",
Expand All @@ -1006,16 +1013,19 @@
"pulse frequency",
"radar",
"rainfall",
"reed switch",
"rssi",
"sap flow",
"salinity",
"smart valve",
"smoke",
"snr",
"so2",
"solar radiation",
"sound",
"strain",
"surface temperature",
"switch",
"temperature",
"tilt",
"time",
Expand Down
2 changes: 2 additions & 0 deletions vendor/abeeway/abeeway-geolocation-module.yaml
Expand Up @@ -40,6 +40,8 @@ firmwareVersions:
id: abeeway-geolocation-module-profile
lorawanCertified: true

deviceType: module

# Sensors that this device features (optional)
# Valid values are:
# accelerometer, altitude, analog input, auxiliary, barometer, battery, button, bvoc, co2, current, digital input,
Expand Down
2 changes: 2 additions & 0 deletions vendor/adeunis/ftd-network-tester.yaml
Expand Up @@ -23,6 +23,8 @@ firmwareVersions:
id: ftd-profile-eu868
lorawanCertified: true

deviceType: cots

# Sensors that this device features (optional)
# Valid values are:
# 4-20 ma, accelerometer, altitude, analog input, auxiliary, barometer, battery, button, bvoc, co, co2, conductivity,
Expand Down
4 changes: 3 additions & 1 deletion vendor/adeunis/modbus.yaml
Expand Up @@ -68,7 +68,9 @@ firmwareVersions:
# vibration, voltage, water potential, water, weight, wifi ssid, wind direction, wind speed.
sensors:
- pulse count
# modbus

bridgeInterfaces:
- modbus

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
Expand Down
2 changes: 2 additions & 0 deletions vendor/arduino/mkr-wan-1310.yaml
Expand Up @@ -50,6 +50,8 @@ firmwareVersions:
lorawanCertified: false
codec: mkrwan1310-codec

deviceType: devkit

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
dimensions:
Expand Down
2 changes: 2 additions & 0 deletions vendor/arduino/portenta-max-carrier.yaml
Expand Up @@ -50,6 +50,8 @@ firmwareVersions:
lorawanCertified: false
codec: portentamaxcarrier-codec

deviceType: devkit

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
dimensions:
Expand Down
2 changes: 2 additions & 0 deletions vendor/atim/acw-tst.yaml
Expand Up @@ -37,6 +37,8 @@ firmwareVersions:
lorawanCertified: true
codec: codec2

deviceType: cots

# Sensors that this device features (optional)
# Valid values are:
# 4-20 ma, accelerometer, altitude, analog input, auxiliary, barometer, battery, button, bvoc, co, co2, conductivity,
Expand Down
4 changes: 2 additions & 2 deletions vendor/browan/l0010.yaml
Expand Up @@ -22,8 +22,8 @@ firmwareVersions:
lorawanCertified: true
codec: l0010-codec

#sensors:
# - gasmatic sensor
sensors:
- iaq

dimensions:
width: 180
Expand Down
2 changes: 2 additions & 0 deletions vendor/cotx/cotxpetfon.yaml
Expand Up @@ -47,6 +47,8 @@ firmwareVersions:
# 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:
- gps

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
Expand Down
7 changes: 4 additions & 3 deletions vendor/dragino/lt22222-l.yaml
Expand Up @@ -138,6 +138,7 @@ firmwareVersions:
id: ru864-c-abp-profile
lorawanCertified: true
codec: lt22222-l-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,
Expand All @@ -146,9 +147,9 @@ firmwareVersions:
# power, precipitation, pressure, proximity, pulse count, pulse frequency, radar, rainfall, rssi, snr, 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:
# - wind direction
# - wind speed
sensors:
- digital input
- analog input

# Battery information (optional)
#battery:
Expand Down
7 changes: 4 additions & 3 deletions vendor/dragino/lt33222-l.yaml
Expand Up @@ -97,6 +97,7 @@ firmwareVersions:
id: ru864-c-abp-profile
lorawanCertified: true
codec: lt33222-l-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,
Expand All @@ -105,9 +106,9 @@ firmwareVersions:
# power, precipitation, pressure, proximity, pulse count, pulse frequency, radar, rainfall, rssi, snr, 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:
# - wind direction
# - wind speed
sensors:
- digital input
- analog input

# Battery information (optional)
#battery:
Expand Down
13 changes: 2 additions & 11 deletions vendor/dragino/rs485-bl.yaml
Expand Up @@ -52,17 +52,8 @@ firmwareVersions:
RU864-870:
id: ru864-a-abp-profile

# 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, snr, 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:
# - wind direction
# - wind speed
bridgeInterfaces:
- rs-485

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
Expand Down
14 changes: 3 additions & 11 deletions vendor/dragino/rs485-ln.yaml
Expand Up @@ -61,17 +61,9 @@ firmwareVersions:
id: kr920-c-abp-profile
RU864-870:
id: ru864-c-abp-profile
# 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, snr, 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:
# - wind direction
# - wind speed

bridgeInterfaces:
- rs-485

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
Expand Down
4 changes: 4 additions & 0 deletions vendor/dragino/sdi-12.yaml
Expand Up @@ -87,6 +87,7 @@ firmwareVersions:
id: ru864-a-abp-profile
lorawanCertified: true
codec: sdi-12-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,
Expand All @@ -98,6 +99,9 @@ firmwareVersions:
sensors:
- water

bridgeInterfaces:
- sdi-12

# Product and data sheet URLs (optional)
productURL: https://www.dragino.com/products/agriculture-weather-station/item/252-sdi-12-lb.html
dataSheetURL: https://www.dropbox.com/sh/g99v0fxcltn9r1y/AAAE_8hHxu8y2Ests4OlLB0ja/SDI-12-LB?dl=0&subfolder_nav_tracking=1
Expand Down
4 changes: 2 additions & 2 deletions vendor/elster/merlin-868.yaml
Expand Up @@ -30,8 +30,8 @@ firmwareVersions:
# 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:
# - optical
sensors:
- magnetometer

# Battery information (optional)
battery:
Expand Down
5 changes: 5 additions & 0 deletions vendor/elsys/elt-lite.yaml
Expand Up @@ -49,6 +49,11 @@ firmwareVersions:
lorawanCertified: true
codec: elt-2-codec

sensors:
- digital input
- analog input
- pulse count

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
additionalRadios:
Expand Down
2 changes: 1 addition & 1 deletion vendor/elsys/ems-desk.yaml
Expand Up @@ -61,7 +61,7 @@ sensors:
- temperature
- humidity
- accelerometer
#- occupancy
- occupancy

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
Expand Down
1 change: 1 addition & 0 deletions vendor/elsys/ers-co2.yaml
Expand Up @@ -57,6 +57,7 @@ sensors:
- light
- motion
- co2
- pir

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
Expand Down
2 changes: 1 addition & 1 deletion vendor/elsys/ers-eye.yaml
Expand Up @@ -62,7 +62,7 @@ sensors:
- humidity
- light
- motion
#- occupancy
- occupancy

# Additional radios that this device has (optional)
# Valid values are: ble, nfc, wifi, cellular.
Expand Down
10 changes: 1 addition & 9 deletions vendor/elv/elv-lw-int1.yaml
Expand Up @@ -37,15 +37,7 @@ firmwareVersions:
lorawanCertified: true
codec: elv-lw-int1-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:
deviceType: devkit

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
Expand Down
5 changes: 5 additions & 0 deletions vendor/elvaco/cmi4110.yaml
Expand Up @@ -33,3 +33,8 @@ firmwareVersions:
# lorawanCertified: true
# # This is the file name of the codec defintion and must have the .yaml extension.
# codec: device-a-codec

deviceType: module

photos:
main: cmi4110.jpeg
5 changes: 5 additions & 0 deletions vendor/elvaco/cmi4111.yaml
Expand Up @@ -33,3 +33,8 @@ firmwareVersions:
# lorawanCertified: true
# # This is the file name of the codec defintion and must have the .yaml extension.
# codec: device-a-codec

deviceType: module

photos:
main: cmi4111.jpeg
5 changes: 5 additions & 0 deletions vendor/elvaco/cmi4130.yaml
Expand Up @@ -33,3 +33,8 @@ firmwareVersions:
# lorawanCertified: true
# # This is the file name of the codec defintion and must have the .yaml extension.
# codec: device-a-codec

deviceType: module

photos:
main: cmi4130.jpeg
5 changes: 5 additions & 0 deletions vendor/elvaco/cmi4140.yaml
Expand Up @@ -33,3 +33,8 @@ firmwareVersions:
# lorawanCertified: true
# # This is the file name of the codec defintion and must have the .yaml extension.
# codec: device-a-codec

deviceType: module

photos:
main: cmi4140.jpeg
5 changes: 5 additions & 0 deletions vendor/elvaco/cmi4160.yaml
Expand Up @@ -33,3 +33,8 @@ firmwareVersions:
# lorawanCertified: true
# # This is the file name of the codec defintion and must have the .yaml extension.
# codec: device-a-codec

deviceType: module

photos:
main: cmi4160.jpeg
2 changes: 2 additions & 0 deletions vendor/embit/emb-lr1280-mpci-4x.yaml
Expand Up @@ -13,6 +13,8 @@ firmwareVersions:
# Unique identifier of the profile (lowercase, alphanumeric with dashes, max 36 characters)
id: emb-lrwl55-profile-eu868

deviceType: module

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
dimensions:
Expand Down
2 changes: 2 additions & 0 deletions vendor/embit/emb-lr1280s.yaml
Expand Up @@ -13,6 +13,8 @@ firmwareVersions:
# Unique identifier of the profile (lowercase, alphanumeric with dashes, max 36 characters)
id: emb-lr1280s-profile

deviceType: module

# Dimensions in mm (optional)
# Use width, height, length and/or diameter
dimensions:
Expand Down

0 comments on commit 3aa4c61

Please sign in to comment.