Compare commits

..

2 commits

Author SHA1 Message Date
tyeth
3a155d50ba Add SGP30 custom properties and schema validation 2024-11-05 21:00:03 +00:00
tyeth
b5b1f3b424 Add example for feed suffix and multi light types 2024-11-05 14:46:04 +00:00
69 changed files with 161 additions and 557 deletions

View file

@ -15,14 +15,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
componentType: [pin, i2c, i2c_output, servo, ds18x20, pwm, pixel, uart]
componentType: [pin, i2c, servo, ds18x20, pwm, pixel, uart]
name: Validate ${{ matrix.componentType }} Component Definition Files
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/checkout@v3
- name: Validate ${{ matrix.componentType }} Components
uses: lorennorman/validate-json-action@ec276364a73f1f64e14706fa43462cf84c5829a1
uses: lorennorman/validate-json-action@master
with:
schema: /components/${{ matrix.componentType }}/schema.json
jsons: components/${{ matrix.componentType }}/*/definition.json
@ -34,17 +34,11 @@ jobs:
# All files that were Added, Copied, Modified, or Renamed
files: ${{ steps.list-changed-files.outputs.all_changed_files }} ${{ steps.list-all-files.outputs.all_files }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/checkout@v3
- name: List All Changed Files
if: ${{ !inputs.all_files }}
id: list-changed-files
run: |
# also fetch main to diff against
git fetch --depth=1 origin main
# list Added, Copied, Modified, and Renamed files
ACMR_FILES=`git diff origin/main --name-only --diff-filter=ACMR | xargs`
# GitHub Actions output ritual
echo "all_changed_files=$ACMR_FILES" >> "$GITHUB_OUTPUT"
uses: tj-actions/changed-files@v37
- name: List All Component Files
if: ${{ inputs.all_files }}
id: list-all-files
@ -57,7 +51,7 @@ jobs:
# Extract the permission for later jobs to use
has-write-permission: ${{ steps.set-permission.outputs.has-permission }}
steps:
- uses: octokit/request-action@05a2312de9f8207044c4c9e41fe19703986acc13
- uses: octokit/request-action@v2.x
id: fetch-permissions
with:
route: GET /repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission
@ -78,16 +72,16 @@ jobs:
CAN_WRITE_TO_REPO: ${{ needs.check-user-permissions.outputs.has-write-permission }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/checkout@v3
- name: Validate Only Expected Filenames
run: |
EXIT_VALUE=0
# external contributors can modify some files
EXTERNAL_REGEX="^components\/(pin|i2c|servo|ds18x20|pwm|pixel|uart|i2c_output)\/.*\/(definition\.json|image\.(png|jpe?g|gif))$"
EXTERNAL_REGEX="^components\/(pin|i2c|servo|ds18x20|pwm|pixel|uart)\/.*\/(definition\.json|image\.(png|jpe?g|gif))$"
# folks with write access to the repo (Adafruit team) can change more sensitive files
INTERNAL_REGEX="^(\.github\/.*|components\/(sensors.json|(pin|i2c|servo|ds18x20|pwm|pixel|uart|i2c_output)\/(schema.json|.*\/(definition\.json|image\.(png|jpe?g|gif)))))$"
INTERNAL_REGEX="^(\.github\/.*|components\/(sensors.json|(pin|i2c|servo|ds18x20|pwm|pixel|uart)\/(schema.json|.*\/(definition\.json|image\.(png|jpe?g|gif)))))$"
# apply the appropriate regex based on permissions of the user
if [[ $CAN_WRITE_TO_REPO ]]; then
@ -133,7 +127,7 @@ jobs:
env:
FILES: ${{ needs.gather-relevant-files.outputs.files }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/checkout@v3
- name: Validate Image File Extension<->Mimetype Agreement
run: |
EXIT_VALUE=0
@ -189,8 +183,8 @@ jobs:
env:
FILES: ${{ needs.gather-relevant-files.outputs.files }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: mfinelli/setup-imagemagick@9b725c21ddff33dd8f153c821514c61eabfa7d8f
- uses: actions/checkout@v3
- uses: mfinelli/setup-imagemagick@v2
- name: Validate Image Dimensions
run: |
EXIT_VALUE=0
@ -207,8 +201,8 @@ jobs:
fi
# use imagemagick to pull the dimensions
WIDTH=`magick identify -ping -format "%w" ${FILE}[0]`
HEIGHT=`magick identify -ping -format "%h" ${FILE}[0]`
WIDTH=`identify -ping -format "%w" ${FILE}[0]`
HEIGHT=`identify -ping -format "%h" ${FILE}[0]`
EXPECTED_HEIGHT=$(("$WIDTH"*3/4))
NOT_4_3_RATIO=false
@ -264,7 +258,7 @@ jobs:
env:
FILES: ${{ needs.gather-relevant-files.outputs.files }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/checkout@v3
- name: Validate Image File Sizes
run: |
EXIT_VALUE=0

View file

@ -1,8 +0,0 @@
{
"vendor": "ASAIR",
"documentationURL": "http://www.aosong.com/en/products-60.html",
"displayName": "AHT21",
"published": true,
"i2cAddresses": [ "0x38"],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity"]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View file

@ -1,16 +0,0 @@
{
"displayName": "AS5600 Magnetic Angle",
"vendor": "ams",
"productURL": "https://www.adafruit.com/product/6357",
"documentationURL": "https://learn.adafruit.com/adafruit-as5600-magnetic-angle-sensor",
"description": "Magnetic angle (0-359) I2C sensor with 0.1° precision and 0.4° accuracy",
"published": true,
"i2cAddresses": [ "0x36" ],
"subcomponents": [
{
"displayName": "Angle",
"defaultPeriod": 5,
"sensorType": "raw"
}
]
}

View file

@ -0,0 +1,40 @@
{
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/3779",
"documentationURL": "https://learn.adafruit.com/adafruit-as7262-6-channel-visible-light-sensor",
"displayName": "AS7262",
"published": true,
"i2cAddresses": [ "0x49" ],
"subcomponents": [
{
"displayName": "Violet / Magenta",
"sensorType": "light",
"feedSuffix": "violet"
},
{
"displayName": "Blue",
"sensorType": "light",
"feedSuffix": "blue"
},
{
"displayName": "Green",
"sensorType": "light",
"feedSuffix": "green"
},
{
"displayName": "Yellow",
"sensorType": "light",
"feedSuffix": "yellow"
},
{
"displayName": "Orange",
"sensorType": "light",
"feedSuffix": "orange"
},
{
"displayName": "Red",
"sensorType": "light",
"feedSuffix": "red"
}
]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/2652",
"documentationURL": "https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/3660",
"documentationURL": "https://learn.adafruit.com/adafruit-bme680-humidity-temperature-barometic-pressure-voc-gas",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude", "gas-resistance" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/5046",
"documentationURL": "https://learn.adafruit.com/adafruit-bme680-humidity-temperature-barometic-pressure-voc-gas",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude", "gas-resistance" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/2651",
"documentationURL": "https://learn.adafruit.com/adafruit-bmp280-barometric-pressure-plus-temperature-sensor-breakout",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/3966",
"documentationURL": "https://learn.adafruit.com/adafruit-bmp388-bmp390-bmp3xx",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4816",
"documentationURL": "https://learn.adafruit.com/adafruit-bmp388-bmp390-bmp3xx",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ]
}

View file

@ -1,27 +0,0 @@
{
"displayName": "D6T-1A Thermal Sensor",
"description": "Non-contact MEMS thermal infrared sensor for precise temperature detection (D6T-1A-01/D6T-1A-02)",
"vendor": "OMRON",
"productURL": "https://www.digikey.com/en/products/detail/omron-electronics-inc-emc-div/D6T-1A-02/8602566",
"documentationURL": "https://omronfs.omron.com/en_US/ecb/products/pdf/en_D6T_users_manual.pdf",
"published": true,
"i2cAddresses": ["0x0A"],
"subcomponents": [
{
"displayName": "Ambient Temperature (°C)",
"sensorType": "ambient-temp"
},
{
"displayName": "Ambient Temperature (°F)",
"sensorType": "ambient-temp-fahrenheit"
},
{
"displayName": "Measured Object Temp (°C)",
"sensorType": "object-temp"
},
{
"displayName": "Measured Object Temp (°F)",
"sensorType": "object-temp-fahrenheit"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4494",
"documentationURL": "https://learn.adafruit.com/adafruit-dps310-precision-barometric-pressure-sensor",
"published": true,
"i2cAddresses": [ "0x77", "0x76" ],
"i2cAddresses": [ "0x76", "0x77" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure" ]
}

View file

@ -1,8 +1,8 @@
{
"displayName": "HTU31D",
"vendor": "TE Connectivity",
"vendor": "Measurement Specialties",
"productURL": "https://www.adafruit.com/product/2857",
"documentationURL": "https://www.adafruit.com/product/4832",
"documentationURL": "https://learn.adafruit.com/adafruit-sht31-d-temperature-and-humidity-sensor-breakout/",
"published": true,
"i2cAddresses": [ "0x40", "0x41" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity" ]

View file

@ -1,10 +0,0 @@
{
"displayName": "INA228",
"vendor": "Texas Instruments",
"productURL": "https://www.adafruit.com/product/5832",
"documentationURL": "https://learn.adafruit.com/adafruit-ina228-i2c-power-monitor",
"description": "85V, 20-bit, ultra-high-precision power monitor (max 10A, 0.05% gain error)",
"published": true,
"i2cAddresses": [ "0x40", "0x41", "0x44", "0x45" ],
"subcomponents": [ "voltage", "current" ]
}

View file

@ -1,10 +0,0 @@
{
"displayName": "INA237",
"vendor": "Texas Instruments",
"productURL": "https://www.adafruit.com/product/6340",
"documentationURL": "https://learn.adafruit.com/adafruit-ina237-dc-current-voltage-power-monitor",
"description": "85V, 16-bit, good-precision power monitor (up to 10A, 0.3% gain error)",
"published": true,
"i2cAddresses": [ "0x40", "0x41", "0x44", "0x45" ],
"subcomponents": [ "voltage", "current" ]
}

View file

@ -1,10 +0,0 @@
{
"displayName": "INA238",
"vendor": "Texas Instruments",
"productURL": "https://www.adafruit.com/product/6349",
"documentationURL": "https://learn.adafruit.com/adafruit-ina238-dc-current-voltage-power-monitor",
"description": "85V, 16-bit, high-precision power monitor (up to 10A, 0.1% gain error)",
"published": true,
"i2cAddresses": [ "0x40", "0x41", "0x44", "0x45" ],
"subcomponents": [ "voltage", "current" ]
}

View file

@ -1,9 +0,0 @@
{
"displayName": "INA260",
"vendor": "Texas Instruments",
"productURL": "https://www.adafruit.com/product/4226",
"documentationURL": "https://learn.adafruit.com/adafruit-ina260-current-voltage-power-sensor-breakout",
"published": true,
"i2cAddresses": [ "0x40", "0x41", "0x44", "0x45" ],
"subcomponents": [ "voltage", "current" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4633",
"documentationURL": "https://learn.adafruit.com/adafruit-lps25-pressure-sensor",
"published": true,
"i2cAddresses": [ "0x5D", "0x5C" ],
"i2cAddresses": [ "0x5C", "0x5D" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4530",
"documentationURL": "https://learn.adafruit.com/adafruit-lps25-pressure-sensor",
"published": true,
"i2cAddresses": [ "0x5D", "0x5C" ],
"i2cAddresses": [ "0x5C", "0x5D" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure" ]
}

View file

@ -1,10 +0,0 @@
{
"displayName": "LPS28DFW",
"vendor": "STMicroelectronics",
"productURL": "https://www.adafruit.com/product/6067",
"documentationURL": "https://learn.adafruit.com/adafruit-lps28-pressure-sensor",
"description": "From 260 to 4060 hPa, this is our largest range pressure sensor (24bit).",
"published": true,
"i2cAddresses": [ "0x5C", "0x5D" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure" ]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4414",
"documentationURL": "https://learn.adafruit.com/lps35hw-water-resistant-pressure-sensor",
"published": true,
"i2cAddresses": [ "0x5D", "0x5C" ],
"i2cAddresses": [ "0x5C", "0x5D" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure" ]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4258",
"documentationURL": "https://learn.adafruit.com/lps35hw-water-resistant-pressure-sensor",
"published": true,
"i2cAddresses": [ "0x5D", "0x5C" ],
"i2cAddresses": [ "0x5C", "0x5D" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure" ]
}

View file

@ -12,7 +12,7 @@
},
{
"displayName": "Infrared",
"sensorType": "raw"
"sensorType": "light"
}
]
}

View file

@ -12,7 +12,7 @@
},
{
"displayName": "Infrared",
"sensorType": "raw"
"sensorType": "light"
}
]
}

View file

@ -5,7 +5,7 @@
"documentationURL": "https://learn.adafruit.com/adafruit-mcp9601",
"description": "Thermocouple / ambient temperature sensor. *Note* Needs hotplugging after i2c scans + selecting component!",
"published": false,
"i2cAddresses": [ "0x67", "0x66", "0x65", "0x64", "0x63", "0x62", "0x61", "0x60"],
"i2cAddresses": [ "0x60", "0x61", "0x62", "0x63", "0x64", "0x65", "0x66", "0x67"],
"subcomponents": [
{
"displayName": "Ambient Temperature (°C)",

View file

@ -1,27 +0,0 @@
{
"displayName": "MLX90632-B (Standard)",
"description": "Non-contact far-infrared temperature sensor (standard range + accuracy)",
"vendor": "Melexis",
"productURL": "https://www.digikey.com/en/products/detail/melexis-technologies-nv/MLX90632SLD-BCB-000-RE/8259656",
"documentationURL": "https://cdn-shop.adafruit.com/product-files/6403/MLX90632-Datasheet-Melexis.PDF",
"published": true,
"i2cAddresses": ["0x3A", "0x3B"],
"subcomponents": [
{
"displayName": "Ambient Temperature (°C)",
"sensorType": "ambient-temp"
},
{
"displayName": "Ambient Temperature (°F)",
"sensorType": "ambient-temp-fahrenheit"
},
{
"displayName": "Measured Object Temp (°C)",
"sensorType": "object-temp"
},
{
"displayName": "Measured Object Temp (°F)",
"sensorType": "object-temp-fahrenheit"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View file

@ -1,27 +0,0 @@
{
"displayName": "MLX90632 (Extended Mode)",
"description": "Non-contact far-infrared temperature sensor (extended range + lower accuracy)",
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/6403",
"documentationURL": "https://cdn-shop.adafruit.com/product-files/6403/MLX90632-Datasheet-Melexis.PDF",
"published": true,
"i2cAddresses": ["0x3A", "0x3B"],
"subcomponents": [
{
"displayName": "Ambient Temperature (°C)",
"sensorType": "ambient-temp"
},
{
"displayName": "Ambient Temperature (°F)",
"sensorType": "ambient-temp-fahrenheit"
},
{
"displayName": "Measured Object Temp (°C)",
"sensorType": "object-temp"
},
{
"displayName": "Measured Object Temp (°F)",
"sensorType": "object-temp-fahrenheit"
}
]
}

View file

@ -1,27 +0,0 @@
{
"displayName": "MLX90632",
"description": "Non-contact far-infrared temperature sensor (medical range + higher accuracy).",
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/6403",
"documentationURL": "https://cdn-shop.adafruit.com/product-files/6403/MLX90632-Datasheet-Melexis.PDF",
"published": true,
"i2cAddresses": ["0x3A", "0x3B"],
"subcomponents": [
{
"displayName": "Ambient Temperature (°C)",
"sensorType": "ambient-temp"
},
{
"displayName": "Ambient Temperature (°F)",
"sensorType": "ambient-temp-fahrenheit"
},
{
"displayName": "Measured Object Temp (°C)",
"sensorType": "object-temp"
},
{
"displayName": "Measured Object Temp (°F)",
"sensorType": "object-temp-fahrenheit"
}
]
}

View file

@ -4,6 +4,6 @@
"productURL": "https://www.adafruit.com/product/4369",
"documentationURL": "https://learn.adafruit.com/adafruit-pct2075-temperature-sensor",
"published": true,
"i2cAddresses": [ "0x37", "0x36", "0x35", "0x2F", "0x2E", "0x2D", "0x2C", "0x2B", "0x2A", "0x29", "0x28", "0x77", "0x76", "0x75", "0x74", "0x73", "0x72", "0x71", "0x70", "0x4F", "0x4E", "0x4D", "0x4C", "0x4B", "0x4A", "0x49", "0x48" ],
"i2cAddresses": [ "0x48", "0x49", "0x4A", "0x4B", "0x4C", "0x4D", "0x4E", "0x4F", "0x70", "0x71", "0x72", "0x73", "0x74", "0x75", "0x76", "0x77", "0x28", "0x29", "0x2A", "0x2B", "0x2C", "0x2D", "0x2E", "0x2F", "0x35", "0x36", "0x37" ],
"subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit" ]
}

View file

@ -4,7 +4,7 @@
"productURL": "https://www.adafruit.com/product/4991",
"documentationURL": "https://learn.adafruit.com/adafruit-i2c-qt-rotary-encoder",
"published": false,
"i2cAddresses": ["0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"],
"i2cAddresses": ["0x36", "0x37", "0x38", "0x39", "0x3A", "Ox3B", "0x3C", "0x3D"],
"subcomponents": [
{
"displayName": "Rotary Encoder Value",

View file

@ -13,7 +13,7 @@
"description": "The human-friendly name of this sensor.",
"type": "string",
"minLength": 3,
"maxLength": 30
"maxLength": 24
},
"type": {
"description": "A unique string used to look up this sensor's definition, and its parent component's definition.",
@ -21,6 +21,12 @@
"minLength": 3,
"maxLength": 24
},
"feedSuffix": {
"description": "A unique string used to create the feed name for this sub-component, e.g.'red' suffix and type='light' would give ws-001-light-red.",
"type": "string",
"minLength": 1,
"maxLength": 24
},
"sensorType": {
"description": "One of the supported I2C sensor type strings (found in README).",
"type": "string",
@ -29,7 +35,7 @@
"defaultPeriod": {
"description": "What period to the form should default to for this sensor.",
"type": "number",
"minimum": 1,
"minimum": 30,
"maximum": 86400
}
}
@ -81,6 +87,63 @@
"description": "List of sensors on this I2C component.",
"type": "array",
"items": { "$ref": "#/$defs/subcomponent" }
},
"customProperties": {
"description": "A list of custom properties that this component supports.",
"type": "array",
"items": {
"type": "object",
"required": [ "name", "type", "description", "default", "displayed" ],
"properties": {
"name": {
"description": "The name and key of the custom property.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"type": {
"description": "The type of the custom property.",
"type": "string",
"pattern": "^(color|string|number|boolean|range|list)$"
},
"description": {
"description": "A brief description of the custom property.",
"type": "string",
"minLength": 3,
"maxLength": 255
},
"default": {
"description": "The default value of the custom property.",
"type": ["string", "number", "boolean"]
},
"displayed": {
"description": "If true, this custom property will be displayed in the UI.",
"type": "boolean"
},
"displayName": {
"description": "The human-friendly name of this custom property.",
"type": "string",
"minLength": 3,
"maxLength": 150
},
"displayOptions": {
"description": "Options or values for the custom property.",
"type": "object",
"optionalProperties": {
"min": { "type": "number" },
"max": { "type": "number" },
"step": { "type": "number" },
"values": {
"type": "array",
"items": {
"type": "object",
"required": [ "key", "displayText" ]
}
}
}
}
}
}
}
}
}

View file

@ -1,21 +0,0 @@
{
"displayName": "SEN66",
"vendor": "Sensirion",
"productURL": "https://www.adafruit.com/product/6331",
"documentationURL": "https://sensirion.com/media/documents/FAFC548D/6731FFFA/Sensirion_Datasheet_SEN6x.pdf",
"published": true,
"i2cAddresses": [
"0x6B"
],
"subcomponents": [
"ambient-temp",
"ambient-temp-fahrenheit",
"humidity",
"pm10-std",
"pm25-std",
"pm100-std",
"voc-index",
"nox-index",
"co2"
]
}

View file

@ -5,5 +5,27 @@
"documentationURL": "https://learn.adafruit.com/adafruit-sgp30-gas-tvoc-eco2-mox-sensor",
"published": true,
"i2cAddresses": [ "0x58" ],
"subcomponents": [ "eco2", "tvoc" ]
"subcomponents": [ "eco2", "tvoc" ],
"customProperties": [
{
"name": "input-temp",
"displayName": "Reference Ambient Temperature (°C)",
"type": "number",
"default": 20,
"description": "The reference ambient temperature in degrees Celsius.",
"displayed": true
},
{
"name": "input-humidity",
"displayName": "Reference Relative Humidity (%)",
"type": "number",
"default": 50,
"description": "The reference relative humidity in percent.",
"displayed": true,
"displayOptions": {
"min": 0,
"max": 100
}
}
]
}

View file

@ -1,10 +0,0 @@
{
"displayName": "VCNL4200",
"vendor": "Vishay",
"productURL": "https://www.adafruit.com/product/6064",
"documentationURL": "https://learn.adafruit.com/adafruit-vcnl4200-long-distance-ir-proximity-and-light-sensor",
"description": "Proximity sensor works from 0 to 1.5m (about 59 inches) & light sensor with range of 0.003 to 1570 lux",
"published": true,
"i2cAddresses": [ "0x51" ],
"subcomponents": [ "light", "proximity" ]
}

View file

@ -1,12 +0,0 @@
{
"displayName": "7-Segment LED Matrix",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/878",
"documentationURL": "https://learn.adafruit.com/adafruit-led-backpack/0-dot-56-seven-segment-backpack",
"description": "7-Segment LED Matrix with I2C Backpack",
"i2cAddresses": [ "0x70", "0x71", "0x72", "0x73", "0x74", "0x75", "0x76", "0x77" ],
"outputType": "7SEG",
"ledBackpackAlignment": "RIGHT",
"ledBackpackBrightness": 8
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

View file

@ -1,12 +0,0 @@
{
"displayName": "16x2 Character Display",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/1447",
"documentationURL": "https://learn.adafruit.com/i2c-spi-lcd-backpack",
"description": "Standard 16x2 HD44780 character display with I2C backpack",
"i2cAddresses": [ "0x20", "0x21", "0x22", "0x23", "0x24", "0x25", "0x26", "0x27" ],
"outputType": "CHARLCD",
"charLcdColumns": 16,
"charLcdRows": 2
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

View file

@ -1,12 +0,0 @@
{
"displayName": "20x4 Character Display",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/198",
"documentationURL": "https://learn.adafruit.com/i2c-spi-lcd-backpack",
"description": "Standard 20x4 HD44780 character display with I2C backpack",
"i2cAddresses": [ "0x20", "0x21", "0x22", "0x23", "0x24", "0x25", "0x26", "0x27" ],
"outputType": "CHARLCD",
"charLcdColumns": 20,
"charLcdRows": 4
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View file

@ -1,13 +0,0 @@
{
"displayName": "128x32 OLED'wing (Small)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/2900",
"documentationURL": "https://learn.adafruit.com/adafruit-oled-featherwing",
"description": "Monochrome 128x32 OLED featherwing display with the default font size (SSD1306)",
"i2cAddresses": [ "0x3C" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 32,
"textSize": "SZ_DEFAULT"
}

View file

@ -1,13 +0,0 @@
{
"displayName": "128x32 OLED'wing (Large)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/2900",
"documentationURL": "https://learn.adafruit.com/adafruit-oled-featherwing",
"description": "Monochrome 128x32 OLED featherwing display with a larger font size (SSD1306)",
"i2cAddresses": [ "0x3C" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 32,
"textSize": "SZ_LARGE"
}

View file

@ -1,13 +0,0 @@
{
"displayName": "128x64 OLED'wing (Small)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/4650",
"documentationURL": "https://learn.adafruit.com/adafruit-128x64-oled-featherwing",
"description": "Monochrome 128x64 OLED featherwing display with the default font size (SH1107)",
"i2cAddresses": [ "0x3D", "0x3C" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 64,
"textSize": "SZ_DEFAULT"
}

View file

@ -1,13 +0,0 @@
{
"displayName": "128x64 OLED'wing (Large)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/4650",
"documentationURL": "https://learn.adafruit.com/adafruit-128x64-oled-featherwing",
"description": "Monochrome 128x64 OLED featherwing display with the default font size (SH1107)",
"i2cAddresses": [ "0x3D", "0x3C" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 64,
"textSize": "SZ_LARGE"
}

View file

@ -1,13 +0,0 @@
{
"displayName": "128x32 OLED (Default)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/4440",
"documentationURL": "https://learn.adafruit.com/monochrome-oled-breakouts",
"description": "Monochrome 128x32 OLED graphic display with the default font size. (SSD1306)",
"i2cAddresses": [ "0x3C", "0x3D" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 32,
"textSize": "SZ_DEFAULT"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

View file

@ -1,13 +0,0 @@
{
"displayName": "128x32 OLED (Large Font)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/4440",
"documentationURL": "https://learn.adafruit.com/monochrome-oled-breakouts",
"description": "Monochrome 128x32 I2C OLED Display with a larger font size (SSD1306).",
"i2cAddresses": [ "0x3C", "0x3D" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 32,
"textSize": "SZ_LARGE"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

View file

@ -1,13 +0,0 @@
{
"displayName": "128x64 OLED (Default)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/938",
"documentationURL": "https://learn.adafruit.com/monochrome-oled-breakouts",
"description": "Monochrome 128x64 I2C OLED Display with the default font size (SSD1306)",
"i2cAddresses": [ "0x3D", "0x3C" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 64,
"textSize": "SZ_DEFAULT"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View file

@ -1,13 +0,0 @@
{
"displayName": "128x64 OLED (Large Font)",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/938",
"documentationURL": "https://learn.adafruit.com/monochrome-oled-breakouts",
"description": "Monochrome 128x64 I2C OLED Display with a larger font size (SSD1306)",
"i2cAddresses": [ "0x3D", "0x3C" ],
"outputType": "OLED",
"oledWidth": 128,
"oledHeight": 64,
"textSize": "SZ_LARGE"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View file

@ -1,13 +0,0 @@
{
"displayName": "64x32 OLED (Small Font)",
"published": true,
"vendor": "Generic",
"productURL": "https://www.digikey.com/en/products/detail/midas-displays/MDOB064032AV-WI/18088023",
"documentationURL": "https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/4808/MDOB064032AV-WI.pdf",
"description": "Monochrome 64x32 I2C OLED Display with the default font size. (SSD1306)",
"i2cAddresses": [ "0x3D", "0x3C" ],
"outputType": "OLED",
"oledWidth": 64,
"oledHeight": 32,
"textSize": "SZ_DEFAULT"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View file

@ -1,13 +0,0 @@
{
"displayName": "64x32 OLED (Large Font)",
"published": true,
"vendor": "Generic",
"productURL": "https://www.digikey.com/en/products/detail/midas-displays/MDOB064032AV-WI/18088023",
"documentationURL": "https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/4808/MDOB064032AV-WI.pdf",
"description": "Monochrome 64x32 I2C OLED Display with a larger font size. (SSD1306)",
"i2cAddresses": [ "0x3D", "0x3C" ],
"outputType": "OLED",
"oledWidth": 64,
"oledHeight": 32,
"textSize": "SZ_LARGE"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View file

@ -1,12 +0,0 @@
{
"displayName": "Quad Alphanum. Display",
"published": true,
"vendor": "Adafruit",
"productURL": "https://www.adafruit.com/product/1911",
"documentationURL": "https://learn.adafruit.com/adafruit-led-backpack/0-54-alphanumeric",
"description": "Quad Alphanumeric Display 0.54\" Digits w/ I2C Backpack - STEMMA QT / Qwiic",
"i2cAddresses": [ "0x70", "0x71", "0x72", "0x73", "0x74", "0x75", "0x76", "0x77" ],
"outputType": "ALPHANUM",
"ledBackpackAlignment": "RIGHT",
"ledBackpackBrightness": 8
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

View file

@ -1,94 +0,0 @@
{
"title": "I2C Output Component Definition",
"description": "I2C Output component for use in Adafruit IO",
"type": "object",
"required": [ "displayName", "vendor", "outputType", "i2cAddresses"],
"additionalProperties": false,
"properties": {
"displayName": {
"description": "The human-friendly name of this component.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"published": {
"description": "If True, this component is supported by the current firmware version and will be displayed to all users. Otherwise, it is hidden behind a developer toggle so that contributors can still work on it against the production site.",
"type": "boolean"
},
"description": {
"description": "A brief description describing this component's capabilities.",
"type": "string",
"minLength": 3,
"maxLength": 255
},
"productURL": {
"description": "Link to this component's homepage.",
"type": "string",
"format": "uri"
},
"documentationURL": {
"description": "Link to this component's documentation.",
"type": "string",
"format": "uri"
},
"vendor": {
"description": "Name of the company that makes this component.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"i2cAddresses": {
"description": "List of supported I2C addresses for this component.",
"type": "array",
"items": {
"type": "string",
"pattern": "^0x[0-9A-Fa-f]{2}$"
}
},
"outputType": {
"description": "The type of i2c output component. Corresponds to `I2cOutputAdd` in i2c.proto",
"type": "string",
"pattern": "^(CHARLCD|7SEG|ALPHANUM|OLED)$"
},
"charLcdColumns": {
"description": "The number of columns for a character LCD. Corresponds to `CharLCDConfig` in i2c.proto.",
"type": "number",
"minimum": 0,
"maximum": 128
},
"charLcdRows": {
"description": "The number of rows for a character LCD. Corresponds to `CharLCDConfig` in i2c.proto.",
"type": "number",
"minimum": 0,
"maximum": 16
},
"ledBackpackAlignment": {
"description": "The alignment for the LED backpack. Corresponds to `LedBackpackConfig` in i2c.proto. Defaults to RIGHT.",
"type": "string",
"pattern": "^(LEFT|RIGHT)$"
},
"ledBackpackBrightness": {
"description": "The brightness of a LED backpack. Corresponds to `CharLCDConfig` in i2c.proto.",
"type": "number",
"minimum": 0,
"maximum": 15
},
"oledWidth": {
"description": "The width of an OLED display, in pixels.",
"type": "number",
"minimum": 0,
"maximum": 128
},
"oledHeight": {
"description": "The height of an OLED display, in pixels.",
"type": "number",
"minimum": 0,
"maximum": 64
},
"textSize": {
"description": "The font magnification size for a OLED display. Corresponds to `SSD1306TextSize` in i2c.proto.",
"type": "string",
"pattern": "^(SZ_DEFAULT|SZ_LARGE)$"
}
}
}

View file

@ -2,7 +2,6 @@
"vendor": "Generic",
"productURL": "https://www.adafruit.com/product/2168",
"documentationURL": "https://learn.adafruit.com/ir-breakbeam-sensors",
"description": "Break beam sensor for detecting interruption of an invisible infrared light beam between emitter and receiver",
"displayName": "Beam Sensor",
"published": true,
"autoSelectString": "beam",

View file

@ -3,7 +3,6 @@
"vendor": "Generic",
"productURL": "https://www.adafruit.com/product/189",
"documentationURL": "https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/overview",
"description": "Passive Infra-Red (PIR) motion sensor for detecting presence and movement through infrared thermal changes",
"published": true,
"autoSelectString": "pir",
"mode": "DIGITAL",

View file

@ -3,7 +3,6 @@
"vendor": "Generic",
"productURL": "https://www.adafruit.com/product/375",
"documentationURL": "https://learn.adafruit.com/no-code-iot-door-alarm-with-wippersnapper",
"description": "A Magnetic Contact Switch (Door/Window Sensor), with Normally Open (NO) or Closed (NC) contacts",
"published": true,
"autoSelectString": "reed",
"mode": "DIGITAL",

View file

@ -1,16 +0,0 @@
{
"displayName": "Simple Soil Sensor",
"published": true,
"vendor": "Adafruit",
"description": "Resistive style soil moisture sensor, measuring the conductivity between the two prongs (Analog signal)",
"productURL": "https://www.adafruit.com/product/6362",
"autoSelectString": "JST",
"mode": "ANALOG",
"direction": "INPUT",
"defaultPeriod": 30,
"analogReadMode": "PIN_VALUE",
"selectReadMode": true,
"visualization": {
"type": "slider"
}
}

View file

@ -1,12 +0,0 @@
{
"displayName": "PWM Output",
"vendor": "Generic",
"description": "A Pulse-Width-Modulated component with fixed frequency. Duty cycle can be set from 0-255",
"productURL": "https://www.adafruit.com/product/301",
"documentationURL": "https://learn.adafruit.com/improve-brushed-dc-motor-performance/pwm-and-brushed-dc-motors",
"published": true,
"pwmSetting": "fixedFrequency",
"visualization": {
"type": "slider-pwm"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB