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

Initial commit for Cors System Organisation #801

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added vendor/corssystem/corssystem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 132 additions & 0 deletions vendor/corssystem/cortu-gen-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: CorTU Genesis 2 # Device name can not contain the vendor name
description: Remote Data Acquisition Board with Support for LoRaWAN and RF

# Hardware versions (optional, use when you have revisions)
hardwareVersions:
- version: '1.0'
numeric: 1
- version: '1.0-rev-A'
numeric: 2

# Firmware versions (at least one is mandatory)
firmwareVersions:
- # Firmware version
version: '1.0'
numeric: 1
# Corresponding hardware versions (optional)
hardwareVersions:
- '1.0'

# Firmware features (optional)
# Valid values are: remote rejoin (trigger a join from the application layer), transmission interval (configure how
# often he device sends a message).
features:
- remote rejoin
- transmission interval

# LoRaWAN Device Profiles per region
# Supported regions are EU863-870, US902-928, AU915-928, AS923, CN779-787, EU433, CN470-510, KR920-923, IN865-867,
# RU864-870
profiles:
EU863-870:
# Optional identifier of the vendor of the profile. When you specify the vendorID, the profile is loaded from
# the vendorID's folder. This allows you to reuse profiles from module or LoRaWAN end device stack vendors.
# If vendorID is empty, the current vendor ID is used. In this example, the vendorID is the current vendor ID,
# which is verbose.
# vendorID: example
# Identifier of the profile (lowercase, alphanumeric with dashes, max 36 characters)
id: cortugenesis-profile
# lorawanCertified: true
codec: cortugenesis-codec
US902-928:
id: cortugenesis-profile
# lorawanCertified: true
codec: cortugenesis-codec



# Type of device (optional)
# Valid values are: devkit, module, cots
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, 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:
- 4-20 ma
- analog input
- digital input

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

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

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

# Weight in grams (optional)
weight: 350

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

# IP rating (optional)
# ipCode: IP64

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

# Key programming (optional)
# Valid values are: bluetooth, nfc, wifi, ethernet (via a webpage), 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:
- serial
- firmware

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

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

# Product and data sheet URLs (optional)
productURL: https://corssystem.com/products/cortu-v1-0/


# Photos
photos:
main: cortugenesis.png # Image needs to have a transparent background
66 changes: 66 additions & 0 deletions vendor/corssystem/cortugenesis-codec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Uplink decoder decodes binary data uplink into a JSON object (optional)
# For documentation on writing encoders and decoders, see: https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/
uplinkDecoder:
fileName: cortugenesis.js
# Examples (optional)
examples:
patientenvy marked this conversation as resolved.
Show resolved Hide resolved
- description: 32 knots from the North
input:
fPort: 1
bytes: [0, 32]
output:
data:
direction: 'N'
speed: 32
# Normalized output, uses the normalizeUplink function (optional)
normalizedOutput:
data:
- wind:
speed: 16.4608
direction: 0
- description: 42 knots from the East
input:
fPort: 1
bytes: [1, 42]
output:
data:
direction: 'E'
speed: 42
- description: Unknown FPort
input:
fPort: 42
bytes: [1, 42]
output:
errors:
- unknown FPort

# Downlink encoder encodes JSON object into a binary data downlink (optional)
downlinkEncoder:
fileName: cortugenesis.js
examples:
- description: Turn green
input:
data:
led: green
output:
bytes: [1]
fPort: 2
- description: Invalid color
input:
data:
led: blue
output:
errors:
- invalid LED color

# Downlink decoder decodes the encoded downlink message (optional, must be symmetric with downlinkEncoder)
downlinkDecoder:
fileName: cortugenesis.js
examples:
- description: Turn green
input:
fPort: 2
bytes: [1]
output:
data:
led: green
18 changes: 18 additions & 0 deletions vendor/corssystem/cortugenesis-profile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# LoRaWAN MAC version: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4 or 1.1
macVersion: '1.0.3'
regionalParametersVersion: 'RP001-1.0.3-RevA'

# Whether the end device supports join (OTAA) or not (ABP)
supportsJoin: true

# Maximum EIRP
maxEIRP: 16
# Whether the end device supports 32-bit frame counters
supports32bitFCnt: false

# Whether the end device supports class B
supportsClassB: false

# Whether the end device supports class C
supportsClassC: false

68 changes: 68 additions & 0 deletions vendor/corssystem/cortugenesis.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains the decoder for the example wind sensor as well. Do you have your own decoder or?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made all the changes

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
var directions = ['N', 'E', 'S', 'W'];
var colors = ['red', 'green'];
var degrees = {
N: 0,
E: 90,
S: 180,
W: 270,
};

function decodeUplink(input) {
switch (input.fPort) {
case 1:
return {
// Decoded data
data: {
direction: directions[input.bytes[0]],
speed: input.bytes[1],
},
};
default:
return {
errors: ['unknown FPort'],
};
}
}

function normalizeUplink(input) {
return {
// Normalized data
data: {
wind: {
direction: degrees[input.data.direction], // letter to degrees
speed: input.data.speed * 0.5144, // knots to m/s
},
},
};
}

function encodeDownlink(input) {
var i = colors.indexOf(input.data.led);
if (i === -1) {
return {
errors: ['invalid LED color'],
};
}
return {
// LoRaWAN FPort used for the downlink message
fPort: 2,
// Encoded bytes
bytes: [i],
};
}

function decodeDownlink(input) {
switch (input.fPort) {
case 2:
return {
// Decoded downlink (must be symmetric with encodeDownlink)
data: {
led: colors[input.bytes[0]],
},
};
default:
return {
errors: ['invalid FPort'],
};
}
}
Binary file added vendor/corssystem/cortugenesis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions vendor/corssystem/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This example contains just one end device: windsensor. It is referenced here in the index.

endDevices:
# Unique identifier of the end device (lowercase, alphanumeric with dashes, max 36 characters)
- cortu-gen-2 # look in windsensor.yaml for the end device definition

# The profileIDs is a distinct value for every unique profile listed in the vendor's folder.
# This value can be freely issued by the vendor and is also used on the QR code for LoRaWAN devices, see
# https://lora-alliance.org/wp-content/uploads/2020/11/TR005_LoRaWAN_Device_Identification_QR_Codes.pdf#page=8
# It can either be a combo of device ID + hardware version + firmware version + region, or profile ID + codec ID
# NOTE: The profileIDs is different from the vendorID.
profileIDs:
'1':
endDeviceID: 'windsensor'
firmwareVersion: '1.0'
hardwareVersion: '1.0'
region: 'EU863-870'
patientenvy marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions vendor/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2069,3 +2069,12 @@ vendors:
social:
linkedin: https://www.linkedin.com/company/cicicom-ltd
facebook: https://www.facebook.com/cicicom

- id: corssystem
name: Cors System Technologies
description: Cors System Technologies is a Nigerian digital transformation company, with a focus in bringing existing industries into Industry 4.0.
logo: corssystem.png
website: https://corssystem.com/
social:
linkedin: https://www.linkedin.com/company/cors-system/
github: corssystem
Loading