Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing sensors and add device types #772

Merged
merged 25 commits into from May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
89e1247
add device_type
LDannijs Apr 4, 2024
2def65c
add devicetype to csv
LDannijs Apr 4, 2024
0f89d52
add type converter
LDannijs Apr 5, 2024
5e46138
add coveragetester
LDannijs Apr 5, 2024
14c3eae
update more devices & add some sensors
LDannijs Apr 5, 2024
f883570
Merge branch 'TheThingsNetwork:master' into device_type
LDannijs Apr 8, 2024
a6586c9
update some more devices
LDannijs Apr 8, 2024
d0c6bfd
photos mandatory
LDannijs Apr 8, 2024
888ef10
update valid sensor values
LDannijs Apr 8, 2024
8d85e51
update netvox
LDannijs Apr 9, 2024
6b743b0
update radio-bridge
LDannijs Apr 9, 2024
004197d
update tektelic
LDannijs Apr 9, 2024
15bff8a
Merge branch 'master' into device_type
LDannijs Apr 9, 2024
2de2e41
Merge branch 'master' into device_type
LDannijs Apr 11, 2024
98f4e53
remove digital output
LDannijs Apr 11, 2024
1a2214d
Merge branch 'master' into device_type
LDannijs Apr 12, 2024
4f9c899
Merge branch 'device_type' of https://github.com/LDannijs/lorawan-dev…
LDannijs Apr 12, 2024
28cb26e
remove some devicetypes & add missing bridgeInterfaces
LDannijs Apr 15, 2024
fa26a96
Merge branch 'master' into device_type
LDannijs Apr 16, 2024
4467c14
change to devkit, module, cots
LDannijs Apr 16, 2024
61b3993
lowerCamelCase
LDannijs Apr 17, 2024
825fcdf
change to deviceType
LDannijs Apr 19, 2024
6ad6866
Merge branch 'master' into device_type
LDannijs Apr 24, 2024
9dd8e49
Merge branch 'master' into device_type
LDannijs May 2, 2024
fdfd7e1
Merge branch 'master' into device_type
Jaime-Trinidad May 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 || '';
LDannijs marked this conversation as resolved.
Show resolved Hide resolved
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 All @@ -976,8 +979,10 @@
"gps",
"gyroscope",
"h2s",
"hall effect",
"humidity",
"iaq",
"infrared",
"leaf wetness",
"level",
"light",
Expand All @@ -986,9 +991,11 @@
"magnetometer",
"moisture",
"motion",
"nfc",
"no",
"no2",
"o3",
"occupancy",
"optical meter",
"particulate matter",
"ph",
Expand All @@ -1004,15 +1011,18 @@
"pulse frequency",
"radar",
"rainfall",
"reed switch",
"rssi",
"sap flow",
"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