diff --git a/components/expanders/ads1015/definition.json b/components/expanders/ads1015/definition.json index 4181edcc..0e24cda9 100644 --- a/components/expanders/ads1015/definition.json +++ b/components/expanders/ads1015/definition.json @@ -6,6 +6,21 @@ "productURL": "https://www.adafruit.com/product/1083", "documentationURL": "https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/", "i2cAddresses": ["0x48", "0x49", "0x4A", "0x4B"], + "settings": { + "gain": { + "displayName": "Gain", + "description": "Programmable gain amplifier setting.", + "default": 0, + "options": [ + "2/3x (±6.144V)", + "1x (±4.096V)", + "2x (±2.048V)", + "4x (±1.024V)", + "8x (±0.512V)", + "16x (±0.256V)" + ] + } + }, "pins": [ {"displayName": "A0", "name": "0", "hasGPIO": false, "hasADC": true}, {"displayName": "A1", "name": "1", "hasGPIO": false, "hasADC": true}, diff --git a/components/expanders/ads1115/definition.json b/components/expanders/ads1115/definition.json index fba9f782..f6da8686 100644 --- a/components/expanders/ads1115/definition.json +++ b/components/expanders/ads1115/definition.json @@ -6,10 +6,25 @@ "productURL": "https://www.adafruit.com/product/1085", "documentationURL": "https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/", "i2cAddresses": ["0x48", "0x49", "0x4A", "0x4B"], + "settings": { + "gain": { + "displayName": "Gain", + "description": "Programmable gain amplifier setting.", + "default": 0, + "options": [ + "2/3x (±6.144V)", + "1x (±4.096V)", + "2x (±2.048V)", + "4x (±1.024V)", + "8x (±0.512V)", + "16x (±0.256V)" + ] + } + }, "pins": [ {"displayName": "A0", "name": "0", "hasGPIO": false, "hasADC": true}, {"displayName": "A1", "name": "1", "hasGPIO": false, "hasADC": true}, {"displayName": "A2", "name": "2", "hasGPIO": false, "hasADC": true}, {"displayName": "A3", "name": "3", "hasGPIO": false, "hasADC": true} ] -} \ No newline at end of file +} diff --git a/components/expanders/schema.json b/components/expanders/schema.json index 9b878b43..a64e127e 100644 --- a/components/expanders/schema.json +++ b/components/expanders/schema.json @@ -3,6 +3,37 @@ "description": "A GPIO/Peripheral Expander component for use in Adafruit IO", "type": "object", "$defs": { + "setting": { + "type": "object", + "description": "A configurable device setting. Firmware receives the selected option's 0-based index.", + "required": ["displayName", "options"], + "additionalProperties": false, + "properties": { + "displayName": { + "description": "Human-readable label shown in the UI.", + "type": "string", + "minLength": 1, + "maxLength": 30 + }, + "description": { + "description": "Optional helper text explaining what this setting controls.", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "default": { + "description": "Index of the default option (0-based). Defaults to 0 if omitted.", + "type": "integer", + "minimum": 0 + }, + "options": { + "description": "Ordered list of option labels. The selected index is sent to firmware.", + "type": "array", + "items": { "type": "string" }, + "minItems": 2 + } + } + }, "expanderPin": { "type": "object", "description": "A single pin exposed by a GPIO/peripheral expander.", @@ -94,6 +125,12 @@ "type": "string" } }, + "settings": { + "description": "Configurable device-level settings (e.g. gain, sample rate, integration time). Each key is the machine-readable name sent to firmware.", + "type": "object", + "propertyNames": { "pattern": "^[a-z][a-z0-9_]*$" }, + "additionalProperties": { "$ref": "#/$defs/setting" } + }, "pins": { "description": "List of pins exposed by this expander.", "type": "array", diff --git a/components/i2c/apds9999/definition.json b/components/i2c/apds9999/definition.json index a2cb5462..2b19ca4c 100644 --- a/components/i2c/apds9999/definition.json +++ b/components/i2c/apds9999/definition.json @@ -5,5 +5,51 @@ "documentationURL": "https://learn.adafruit.com/adafruit-apds9999-proximity-lux-light-color-sensor", "published": true, "i2cAddresses": ["0x52"], + "settings": { + "light_gain": { + "displayName": "Light Gain", + "description": "ALS gain.", + "default": 0, + "options": ["1x", "3x", "6x", "9x", "18x"] + }, + "light_resolution": { + "displayName": "Light Resolution", + "default": 0, + "options": [ + "20-bit (400ms)", + "19-bit (200ms)", + "18-bit (100ms)", + "17-bit (50ms)", + "16-bit (25ms)", + "13-bit (3.125ms)" + ] + }, + "light_meas_rate": { + "displayName": "Light Measurement Rate", + "default": 2, + "options": ["25ms", "50ms", "100ms", "200ms", "500ms", "1000ms", "2000ms"] + }, + "prox_resolution": { + "displayName": "Proximity Resolution", + "default": 0, + "options": ["8-bit", "9-bit", "10-bit", "11-bit"] + }, + "prox_meas_rate": { + "displayName": "Proximity Measurement Rate", + "description": "Actual measurement period is approximately 3x the programmed value.", + "default": 4, + "options": ["6.25ms", "12.5ms", "25ms", "50ms", "100ms", "200ms", "400ms"] + }, + "led_current": { + "displayName": "LED Current", + "default": 0, + "options": ["10mA", "25mA"] + }, + "led_frequency": { + "displayName": "LED Frequency", + "default": 0, + "options": ["60 kHz", "70 kHz", "80 kHz", "90 kHz", "100 kHz"] + } + }, "subcomponents": ["light", "proximity"] } diff --git a/components/i2c/bme280/definition.json b/components/i2c/bme280/definition.json index 2c8e6d68..fcd7b1d3 100644 --- a/components/i2c/bme280/definition.json +++ b/components/i2c/bme280/definition.json @@ -4,6 +4,23 @@ "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" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude" ] + "i2cAddresses": ["0x77", "0x76"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "humidity_oversampling": { + "displayName": "Humidity Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude"] } diff --git a/components/i2c/bme680/definition.json b/components/i2c/bme680/definition.json index 244d33af..7712a24c 100644 --- a/components/i2c/bme680/definition.json +++ b/components/i2c/bme680/definition.json @@ -4,6 +4,35 @@ "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" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude", "gas-resistance" ] + "i2cAddresses": ["0x77", "0x76"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "humidity_oversampling": { + "displayName": "Humidity Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": ["Off", "Size 1", "Size 3", "Size 7", "Size 15", "Size 31", "Size 63", "Size 127"] + } + }, + "subcomponents": [ + "ambient-temp", + "ambient-temp-fahrenheit", + "humidity", + "pressure", + "altitude", + "gas-resistance" + ] } diff --git a/components/i2c/bme688/definition.json b/components/i2c/bme688/definition.json index 7c290dc9..360a7b58 100644 --- a/components/i2c/bme688/definition.json +++ b/components/i2c/bme688/definition.json @@ -4,6 +4,35 @@ "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" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "humidity", "pressure", "altitude", "gas-resistance" ] + "i2cAddresses": ["0x77", "0x76"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "humidity_oversampling": { + "displayName": "Humidity Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": ["Off", "Size 1", "Size 3", "Size 7", "Size 15", "Size 31", "Size 63", "Size 127"] + } + }, + "subcomponents": [ + "ambient-temp", + "ambient-temp-fahrenheit", + "humidity", + "pressure", + "altitude", + "gas-resistance" + ] } diff --git a/components/i2c/bmp280/definition.json b/components/i2c/bmp280/definition.json index 0f54ecb2..0b65a400 100644 --- a/components/i2c/bmp280/definition.json +++ b/components/i2c/bmp280/definition.json @@ -4,6 +4,34 @@ "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" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ] + "i2cAddresses": ["0x77", "0x76"], + "settings": { + "mode": { + "displayName": "Mode", + "description": "Sets the measurement mode of the sensor.", + "default": 2, + "options": ["Sleep", "Forced", "Normal"] + }, + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["None", "1x", "2x", "4x", "8x", "16x"] + }, + "filter": { + "displayName": "Filter", + "default": 0, + "options": ["Off", "2x", "4x", "8x", "16x"] + }, + "standby": { + "displayName": "Standby Duration", + "default": 0, + "options": ["1ms", "62.5ms", "125ms", "250ms", "500ms", "1000ms", "2000ms", "4000ms"] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude"] } diff --git a/components/i2c/bmp388/definition.json b/components/i2c/bmp388/definition.json index 6ced421c..cb000eb0 100644 --- a/components/i2c/bmp388/definition.json +++ b/components/i2c/bmp388/definition.json @@ -4,6 +4,47 @@ "productURL": "https://www.adafruit.com/product/3966", "documentationURL": "https://learn.adafruit.com/adafruit-bmp388-bmp390-bmp3xx", "published": true, - "i2cAddresses": [ "0x77", "0x76" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ] + "i2cAddresses": ["0x77", "0x76"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["None", "2x", "4x", "8x", "16x", "32x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["None", "2x", "4x", "8x", "16x", "32x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": [ + "Off", + "Coeff 1", + "Coeff 3", + "Coeff 7", + "Coeff 15", + "Coeff 31", + "Coeff 63", + "Coeff 127" + ] + }, + "output_data_rate": { + "displayName": "Output Data Rate", + "default": 0, + "options": [ + "50 Hz", + "25 Hz", + "12.5 Hz", + "6.25 Hz", + "3.1 Hz", + "1.5 Hz", + "0.78 Hz", + "0.39 Hz", + "0.2 Hz" + ] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude"] } diff --git a/components/i2c/bmp390/definition.json b/components/i2c/bmp390/definition.json index cb32a30b..2a9a38eb 100644 --- a/components/i2c/bmp390/definition.json +++ b/components/i2c/bmp390/definition.json @@ -4,6 +4,47 @@ "productURL": "https://www.adafruit.com/product/4816", "documentationURL": "https://learn.adafruit.com/adafruit-bmp388-bmp390-bmp3xx", "published": true, - "i2cAddresses": [ "0x77", "0x76" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ] + "i2cAddresses": ["0x77", "0x76"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["None", "2x", "4x", "8x", "16x", "32x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["None", "2x", "4x", "8x", "16x", "32x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": [ + "Off", + "Coeff 1", + "Coeff 3", + "Coeff 7", + "Coeff 15", + "Coeff 31", + "Coeff 63", + "Coeff 127" + ] + }, + "output_data_rate": { + "displayName": "Output Data Rate", + "default": 0, + "options": [ + "50 Hz", + "25 Hz", + "12.5 Hz", + "6.25 Hz", + "3.1 Hz", + "1.5 Hz", + "0.78 Hz", + "0.39 Hz", + "0.2 Hz" + ] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude"] } diff --git a/components/i2c/bmp580/definition.json b/components/i2c/bmp580/definition.json index 78cd2887..d810172f 100644 --- a/components/i2c/bmp580/definition.json +++ b/components/i2c/bmp580/definition.json @@ -4,6 +4,60 @@ "productURL": "https://www.adafruit.com/product/6411", "documentationURL": "https://cdn-shop.adafruit.com/product-files/6411/BMP580.pdf", "published": true, - "i2cAddresses": [ "0x47", "0x46" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ] + "i2cAddresses": ["0x47", "0x46"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "16x", "32x", "64x", "128x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "16x", "32x", "64x", "128x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": [ + "Bypass", + "Coeff 1", + "Coeff 3", + "Coeff 7", + "Coeff 15", + "Coeff 31", + "Coeff 63", + "Coeff 127" + ] + }, + "output_data_rate": { + "displayName": "Output Data Rate", + "default": 0, + "options": [ + "50 Hz", + "45 Hz", + "40 Hz", + "35 Hz", + "30 Hz", + "25 Hz", + "20 Hz", + "15 Hz", + "10 Hz", + "5 Hz", + "4 Hz", + "3 Hz", + "2 Hz", + "1 Hz", + "0.5 Hz", + "0.25 Hz", + "0.125 Hz" + ] + }, + "power_mode": { + "displayName": "Power Mode", + "default": 1, + "options": ["Standby", "Normal", "Forced", "Continuous", "Deep Standby"] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude"] } diff --git a/components/i2c/bmp581/definition.json b/components/i2c/bmp581/definition.json index d08672c9..869e336a 100644 --- a/components/i2c/bmp581/definition.json +++ b/components/i2c/bmp581/definition.json @@ -4,6 +4,60 @@ "productURL": "https://www.adafruit.com/product/6407", "documentationURL": "https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp581-ds004.pdf", "published": true, - "i2cAddresses": [ "0x47", "0x46" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ] + "i2cAddresses": ["0x47", "0x46"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "16x", "32x", "64x", "128x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "16x", "32x", "64x", "128x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": [ + "Bypass", + "Coeff 1", + "Coeff 3", + "Coeff 7", + "Coeff 15", + "Coeff 31", + "Coeff 63", + "Coeff 127" + ] + }, + "output_data_rate": { + "displayName": "Output Data Rate", + "default": 0, + "options": [ + "50 Hz", + "45 Hz", + "40 Hz", + "35 Hz", + "30 Hz", + "25 Hz", + "20 Hz", + "15 Hz", + "10 Hz", + "5 Hz", + "4 Hz", + "3 Hz", + "2 Hz", + "1 Hz", + "0.5 Hz", + "0.25 Hz", + "0.125 Hz" + ] + }, + "power_mode": { + "displayName": "Power Mode", + "default": 1, + "options": ["Standby", "Normal", "Forced", "Continuous", "Deep Standby"] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude"] } diff --git a/components/i2c/bmp585/definition.json b/components/i2c/bmp585/definition.json index d4233cf8..f4b0010e 100644 --- a/components/i2c/bmp585/definition.json +++ b/components/i2c/bmp585/definition.json @@ -4,6 +4,60 @@ "productURL": "https://www.adafruit.com/product/6413", "documentationURL": "https://cdn-shop.adafruit.com/product-files/6413/bst-bmp585-ds003.pdf", "published": true, - "i2cAddresses": [ "0x47", "0x46" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude" ] + "i2cAddresses": ["0x47", "0x46"], + "settings": { + "temp_oversampling": { + "displayName": "Temperature Oversampling", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "16x", "32x", "64x", "128x"] + }, + "pressure_oversampling": { + "displayName": "Pressure Oversampling", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "16x", "32x", "64x", "128x"] + }, + "iir_filter": { + "displayName": "IIR Filter", + "default": 0, + "options": [ + "Bypass", + "Coeff 1", + "Coeff 3", + "Coeff 7", + "Coeff 15", + "Coeff 31", + "Coeff 63", + "Coeff 127" + ] + }, + "output_data_rate": { + "displayName": "Output Data Rate", + "default": 0, + "options": [ + "50 Hz", + "45 Hz", + "40 Hz", + "35 Hz", + "30 Hz", + "25 Hz", + "20 Hz", + "15 Hz", + "10 Hz", + "5 Hz", + "4 Hz", + "3 Hz", + "2 Hz", + "1 Hz", + "0.5 Hz", + "0.25 Hz", + "0.125 Hz" + ] + }, + "power_mode": { + "displayName": "Power Mode", + "default": 1, + "options": ["Standby", "Normal", "Forced", "Continuous", "Deep Standby"] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit", "pressure", "altitude"] } diff --git a/components/i2c/ens160/definition.json b/components/i2c/ens160/definition.json index 7fd27f79..92253a76 100644 --- a/components/i2c/ens160/definition.json +++ b/components/i2c/ens160/definition.json @@ -4,13 +4,18 @@ "productURL": "https://www.adafruit.com/product/5606", "documentationURL": "https://learn.adafruit.com/adafruit-ens160-mox-gas-sensor", "published": true, - "i2cAddresses": [ "0x52", "0x53" ], - "subcomponents": [ + "i2cAddresses": ["0x52", "0x53"], + "settings": { + "mode": { + "displayName": "Mode", + "description": "Sets the operating mode of the sensor.", + "default": 2, + "options": ["Deep Sleep", "Idle", "Standard", "Low Power"] + } + }, + "subcomponents": [ "tvoc", "eco2", - { - "displayName": "AQI", - "sensorType": "raw" - } + {"displayName": "AQI", "sensorType": "raw"} ] } diff --git a/components/i2c/ina219/definition.json b/components/i2c/ina219/definition.json index 0bb00279..b4c87316 100644 --- a/components/i2c/ina219/definition.json +++ b/components/i2c/ina219/definition.json @@ -4,6 +4,14 @@ "productURL": "https://www.adafruit.com/product/904", "documentationURL": "https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout", "published": true, - "i2cAddresses": [ "0x40", "0x41", "0x44", "0x45" ], - "subcomponents": [ "voltage", "current" ] -} \ No newline at end of file + "i2cAddresses": ["0x40", "0x41", "0x44", "0x45"], + "settings": { + "calibration": { + "displayName": "Calibration", + "description": "Sets the voltage range and max current measurement.", + "default": 0, + "options": ["32V, 2A", "32V, 1A", "16V, 400mA"] + } + }, + "subcomponents": ["voltage", "current"] +} diff --git a/components/i2c/ltr303/definition.json b/components/i2c/ltr303/definition.json index a29fed70..d2e74988 100644 --- a/components/i2c/ltr303/definition.json +++ b/components/i2c/ltr303/definition.json @@ -4,16 +4,28 @@ "productURL": "https://www.adafruit.com/product/5610", "documentationURL": "https://learn.adafruit.com/adafruit-ltr-329-ltr-303", "published": true, - "i2cAddresses": [ "0x29" ], - "subcomponents": [ - { - "displayName": "Ambient Light", - "sensorType": "light" + "i2cAddresses": ["0x29"], + "settings": { + "gain": { + "displayName": "Gain", + "description": "ALS gain.", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "48x", "96x"] + }, + "integration_time": { + "displayName": "Integration Time", + "description": "ALS integration time.", + "default": 1, + "options": ["50ms", "100ms", "150ms", "200ms", "250ms", "300ms", "350ms", "400ms"] }, - { - "displayName": "Infrared", - "sensorType": "raw" + "measurement_rate": { + "displayName": "Measurement Rate", + "default": 0, + "options": ["50ms", "100ms", "200ms", "500ms", "1000ms", "2000ms"] } + }, + "subcomponents": [ + {"displayName": "Ambient Light", "sensorType": "light"}, + {"displayName": "Infrared", "sensorType": "raw"} ] } - diff --git a/components/i2c/ltr329/definition.json b/components/i2c/ltr329/definition.json index 54996024..770312b5 100644 --- a/components/i2c/ltr329/definition.json +++ b/components/i2c/ltr329/definition.json @@ -4,15 +4,28 @@ "documentationURL": "https://learn.adafruit.com/adafruit-ltr-329-ltr-303", "displayName": "LTR-329", "published": true, - "i2cAddresses": [ "0x29" ], - "subcomponents": [ - { - "displayName": "Ambient Light", - "sensorType": "light" + "i2cAddresses": ["0x29"], + "settings": { + "gain": { + "displayName": "Gain", + "description": "ALS gain.", + "default": 0, + "options": ["1x", "2x", "4x", "8x", "48x", "96x"] + }, + "integration_time": { + "displayName": "Integration Time", + "description": "ALS integration time.", + "default": 1, + "options": ["50ms", "100ms", "150ms", "200ms", "250ms", "300ms", "350ms", "400ms"] }, - { - "displayName": "Infrared", - "sensorType": "raw" + "measurement_rate": { + "displayName": "Measurement Rate", + "default": 0, + "options": ["50ms", "100ms", "200ms", "500ms", "1000ms", "2000ms"] } + }, + "subcomponents": [ + {"displayName": "Ambient Light", "sensorType": "light"}, + {"displayName": "Infrared", "sensorType": "raw"} ] } diff --git a/components/i2c/max44009/definition.json b/components/i2c/max44009/definition.json index dc3560ef..4c2ed5a3 100644 --- a/components/i2c/max44009/definition.json +++ b/components/i2c/max44009/definition.json @@ -6,5 +6,24 @@ "description": "Ambient light sensor with ultra-wide 22bit dynamic range (0.045 to 188,000 lux)", "published": true, "i2cAddresses": ["0x4A", "0x4B"], + "settings": { + "mode": { + "displayName": "Mode", + "description": "Sets the operating mode of the sensor.", + "default": 0, + "options": [ + "Default (Auto, 800ms cycle)", + "Continuous (Auto, fast)", + "Manual (800ms cycle)", + "Manual Continuous (fast)" + ] + }, + "integration_time": { + "displayName": "Integration Time", + "description": "ALS integration time. Shorter times (50ms and below) require manual mode.", + "default": 3, + "options": ["800ms", "400ms", "200ms", "100ms", "50ms", "25ms", "12.5ms", "6.25ms"] + } + }, "subcomponents": ["lux"] } diff --git a/components/i2c/mcp9601/definition.json b/components/i2c/mcp9601/definition.json index 29b3144b..12cc60c3 100644 --- a/components/i2c/mcp9601/definition.json +++ b/components/i2c/mcp9601/definition.json @@ -1,26 +1,35 @@ -{ - "displayName": "MCP9601", - "vendor": "Microchip", - "productURL": "https://www.adafruit.com/product/5165", - "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"], - "subcomponents": [ - { - "displayName": "Ambient Temperature (°C)", - "sensorType": "ambient-temp", - "defaultPeriod": 30 - }, - { - "displayName": "Ambient Temperature (°F)", - "sensorType": "ambient-temp-fahrenheit", - "defaultPeriod": 30 - }, - { - "displayName": "Type K Thermocouple (°C)", - "sensorType": "raw", - "defaultPeriod": 30 - } - ] -} +{ + "displayName": "MCP9601", + "vendor": "Microchip", + "productURL": "https://www.adafruit.com/product/5165", + "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"], + "settings": { + "thermocouple_type": { + "displayName": "Thermocouple Type", + "default": 0, + "options": ["Type K", "Type J", "Type T", "Type N", "Type S", "Type E", "Type B", "Type R"] + }, + "adc_resolution": { + "displayName": "ADC Resolution", + "default": 0, + "options": ["18-bit", "16-bit", "14-bit", "12-bit"] + }, + "ambient_resolution": { + "displayName": "Ambient Resolution", + "default": 0, + "options": ["0.25°C", "0.125°C", "0.0625°C", "0.03125°C"] + } + }, + "subcomponents": [ + {"displayName": "Ambient Temperature (°C)", "sensorType": "ambient-temp", "defaultPeriod": 30}, + { + "displayName": "Ambient Temperature (°F)", + "sensorType": "ambient-temp-fahrenheit", + "defaultPeriod": 30 + }, + {"displayName": "Type K Thermocouple (°C)", "sensorType": "raw", "defaultPeriod": 30} + ] +} diff --git a/components/i2c/qmc5883p/definition.json b/components/i2c/qmc5883p/definition.json index eecc71cc..c522ea54 100644 --- a/components/i2c/qmc5883p/definition.json +++ b/components/i2c/qmc5883p/definition.json @@ -4,11 +4,36 @@ "productURL": "https://www.adafruit.com/product/6388", "documentationURL": "https://learn.adafruit.com/adafruit-qmc5883p-triple-axis-magnetometer", "published": true, - "i2cAddresses": [ "0x2C" ], - "subcomponents": [ - { - "displayName": "Magnetic Magnitude (gauss)", - "sensorType": "raw" + "i2cAddresses": ["0x2C"], + "settings": { + "mode": { + "displayName": "Mode", + "description": "Sets the operating mode of the sensor.", + "default": 3, + "options": ["Suspend", "Normal", "Single", "Continuous"] + }, + "output_data_rate": { + "displayName": "Output Data Rate", + "default": 0, + "options": ["10 Hz", "50 Hz", "100 Hz", "200 Hz"] + }, + "oversample_ratio": { + "displayName": "Over Sample Ratio", + "default": 0, + "options": ["8", "4", "2", "1"] + }, + "downsample_ratio": { + "displayName": "Down Sample Ratio", + "default": 0, + "options": ["1", "2", "4", "8"] + }, + "range": { + "displayName": "Field Range", + "default": 0, + "options": ["±30 Gauss", "±12 Gauss", "±8 Gauss", "±2 Gauss"] } + }, + "subcomponents": [ + {"displayName": "Magnetic Magnitude (gauss)", "sensorType": "raw"} ] } diff --git a/components/i2c/schema.json b/components/i2c/schema.json index dc75ca35..95a2e6e5 100644 --- a/components/i2c/schema.json +++ b/components/i2c/schema.json @@ -3,6 +3,37 @@ "description": "An I2C-based WipperSnapper component for use in Adafruit IO", "type": "object", "$defs": { + "setting": { + "type": "object", + "description": "A configurable device setting. Firmware receives the selected option's 0-based index.", + "required": ["displayName", "options"], + "additionalProperties": false, + "properties": { + "displayName": { + "description": "Human-readable label shown in the UI.", + "type": "string", + "minLength": 1, + "maxLength": 30 + }, + "description": { + "description": "Optional helper text explaining what this setting controls.", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "default": { + "description": "Index of the default option (0-based). Defaults to 0 if omitted.", + "type": "integer", + "minimum": 0 + }, + "options": { + "description": "Ordered list of option labels. The selected index is sent to firmware.", + "type": "array", + "items": { "type": "string" }, + "minItems": 2 + } + } + }, "subcomponent": { "type": ["string", "object"], "pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index|tvoc)$", @@ -77,6 +108,12 @@ "type": "string" } }, + "settings": { + "description": "Configurable device-level settings (e.g. gain, sample rate, integration time). Each key is the machine-readable name sent to firmware.", + "type": "object", + "propertyNames": { "pattern": "^[a-z][a-z0-9_]*$" }, + "additionalProperties": { "$ref": "#/$defs/setting" } + }, "subcomponents": { "description": "List of sensors on this I2C component.", "type": "array", diff --git a/components/i2c/sen50/definition.json b/components/i2c/sen50/definition.json index 3b3163a8..0acdfbc4 100644 --- a/components/i2c/sen50/definition.json +++ b/components/i2c/sen50/definition.json @@ -1,15 +1,9 @@ -{ - "displayName": "SEN50", - "vendor": "Sensirion", - "productURL": "https://www.digikey.com/en/products/filter/gas-sensors/530?s=N4IgjCBcoLQCxVAYygMwIYBsDOBTANCAPZQDa4ADFRQgLoC%2BjQA", - "documentationURL": "https://sensirion.com/media/documents/6791EFA0/62A1F68F/Sensirion_Datasheet_Environmental_Node_SEN5x.pdf", - "published": true, - "i2cAddresses": [ - "0x69" - ], - "subcomponents": [ - "pm10-std", - "pm25-std", - "pm100-std" - ] +{ + "displayName": "SEN50", + "vendor": "Sensirion", + "productURL": "https://www.digikey.com/en/products/filter/gas-sensors/530?s=N4IgjCBcoLQCxVAYygMwIYBsDOBTANCAPZQDa4ADFRQgLoC%2BjQA", + "documentationURL": "https://sensirion.com/media/documents/6791EFA0/62A1F68F/Sensirion_Datasheet_Environmental_Node_SEN5x.pdf", + "published": true, + "i2cAddresses": ["0x69"], + "subcomponents": ["pm10-std", "pm25-std", "pm100-std"] } \ No newline at end of file diff --git a/components/i2c/sen54/definition.json b/components/i2c/sen54/definition.json index b36780c2..ff041cc5 100644 --- a/components/i2c/sen54/definition.json +++ b/components/i2c/sen54/definition.json @@ -1,19 +1,17 @@ -{ - "displayName": "SEN54", - "vendor": "Sensirion", - "productURL": "https://www.digikey.com/en/products/filter/gas-sensors/530?s=N4IgjCBcoLQCxVAYygMwIYBsDOBTANCAPZQDa4ADFRQgLoC%2BjQA", - "documentationURL": "https://sensirion.com/media/documents/6791EFA0/62A1F68F/Sensirion_Datasheet_Environmental_Node_SEN5x.pdf", - "published": true, - "i2cAddresses": [ - "0x69" - ], - "subcomponents": [ - "ambient-temp", - "ambient-temp-fahrenheit", - "humidity", - "pm10-std", - "pm25-std", - "pm100-std", - "voc-index" - ] +{ + "displayName": "SEN54", + "vendor": "Sensirion", + "productURL": "https://www.digikey.com/en/products/filter/gas-sensors/530?s=N4IgjCBcoLQCxVAYygMwIYBsDOBTANCAPZQDa4ADFRQgLoC%2BjQA", + "documentationURL": "https://sensirion.com/media/documents/6791EFA0/62A1F68F/Sensirion_Datasheet_Environmental_Node_SEN5x.pdf", + "published": true, + "i2cAddresses": ["0x69"], + "subcomponents": [ + "ambient-temp", + "ambient-temp-fahrenheit", + "humidity", + "pm10-std", + "pm25-std", + "pm100-std", + "voc-index" + ] } \ No newline at end of file diff --git a/components/i2c/sen55/definition.json b/components/i2c/sen55/definition.json index f0a6bee3..4b66cce0 100644 --- a/components/i2c/sen55/definition.json +++ b/components/i2c/sen55/definition.json @@ -1,20 +1,18 @@ -{ - "displayName": "SEN55", - "vendor": "Sensirion", - "productURL": "https://www.digikey.com/en/products/filter/gas-sensors/530?s=N4IgjCBcoLQCxVAYygMwIYBsDOBTANCAPZQDa4ADFRQgLoC%2BjQA", - "documentationURL": "https://sensirion.com/media/documents/6791EFA0/62A1F68F/Sensirion_Datasheet_Environmental_Node_SEN5x.pdf", - "published": true, - "i2cAddresses": [ - "0x69" - ], - "subcomponents": [ - "ambient-temp", - "ambient-temp-fahrenheit", - "humidity", - "pm10-std", - "pm25-std", - "pm100-std", - "voc-index", - "nox-index" - ] +{ + "displayName": "SEN55", + "vendor": "Sensirion", + "productURL": "https://www.digikey.com/en/products/filter/gas-sensors/530?s=N4IgjCBcoLQCxVAYygMwIYBsDOBTANCAPZQDa4ADFRQgLoC%2BjQA", + "documentationURL": "https://sensirion.com/media/documents/6791EFA0/62A1F68F/Sensirion_Datasheet_Environmental_Node_SEN5x.pdf", + "published": true, + "i2cAddresses": ["0x69"], + "subcomponents": [ + "ambient-temp", + "ambient-temp-fahrenheit", + "humidity", + "pm10-std", + "pm25-std", + "pm100-std", + "voc-index", + "nox-index" + ] } \ No newline at end of file diff --git a/components/i2c/sen66/definition.json b/components/i2c/sen66/definition.json index 6052f29d..5ae0153c 100644 --- a/components/i2c/sen66/definition.json +++ b/components/i2c/sen66/definition.json @@ -4,9 +4,7 @@ "productURL": "https://www.adafruit.com/product/6331", "documentationURL": "https://sensirion.com/media/documents/FAFC548D/6731FFFA/Sensirion_Datasheet_SEN6x.pdf", "published": true, - "i2cAddresses": [ - "0x6B" - ], + "i2cAddresses": ["0x6B"], "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit", diff --git a/components/i2c/tmp117/definition.json b/components/i2c/tmp117/definition.json index 81271d02..4c972960 100644 --- a/components/i2c/tmp117/definition.json +++ b/components/i2c/tmp117/definition.json @@ -4,6 +4,25 @@ "productURL": "https://www.adafruit.com/product/4821", "documentationURL": "https://learn.adafruit.com/adafruit-tmp117-high-accuracy-i2c-temperature-monitor", "published": true, - "i2cAddresses": [ "0x48", "0x49", "0x4A", "0x4B" ], - "subcomponents": [ "ambient-temp", "ambient-temp-fahrenheit" ] + "i2cAddresses": ["0x48", "0x49", "0x4A", "0x4B"], + "settings": { + "averaged_samples": { + "displayName": "Averaged Samples", + "default": 0, + "options": ["1x", "8x", "32x", "64x"] + }, + "read_delay": { + "displayName": "Read Delay", + "description": "The minimum delay between new measurements.", + "default": 0, + "options": ["0ms", "125ms", "250ms", "500ms", "1000ms", "4000ms", "8000ms", "16000ms"] + }, + "mode": { + "displayName": "Mode", + "description": "Sets the measurement mode of the sensor.", + "default": 0, + "options": ["Continuous", "Shutdown", "One Shot"] + } + }, + "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit"] } diff --git a/components/i2c/tmp119/definition.json b/components/i2c/tmp119/definition.json index 4dadab6a..251745a8 100644 --- a/components/i2c/tmp119/definition.json +++ b/components/i2c/tmp119/definition.json @@ -5,5 +5,24 @@ "documentationURL": "https://learn.adafruit.com/adafruit-tmp119-high-precision-temperature-sensor", "published": true, "i2cAddresses": ["0x48", "0x49", "0x4A", "0x4B"], + "settings": { + "averaged_samples": { + "displayName": "Averaged Samples", + "default": 0, + "options": ["1x", "8x", "32x", "64x"] + }, + "read_delay": { + "displayName": "Read Delay", + "description": "The minimum delay between new measurements.", + "default": 0, + "options": ["0ms", "125ms", "250ms", "500ms", "1000ms", "4000ms", "8000ms", "16000ms"] + }, + "mode": { + "displayName": "Mode", + "description": "Sets the measurement mode of the sensor.", + "default": 0, + "options": ["Continuous", "Shutdown", "One Shot"] + } + }, "subcomponents": ["ambient-temp", "ambient-temp-fahrenheit"] } diff --git a/components/i2c/veml7700/definition.json b/components/i2c/veml7700/definition.json index 541563e2..a663eb91 100644 --- a/components/i2c/veml7700/definition.json +++ b/components/i2c/veml7700/definition.json @@ -4,6 +4,20 @@ "productURL": "https://www.adafruit.com/product/4162", "documentationURL": "https://learn.adafruit.com/adafruit-veml7700", "published": true, - "i2cAddresses": [ "0x10" ], - "subcomponents": [ "light" ] + "i2cAddresses": ["0x10"], + "settings": { + "gain": { + "displayName": "Gain", + "description": "ALS gain.", + "default": 0, + "options": ["1x", "2x", "1/8x", "1/4x"] + }, + "integration_time": { + "displayName": "Integration Time", + "description": "ALS integration time.", + "default": 2, + "options": ["25ms", "50ms", "100ms", "200ms", "400ms", "800ms"] + } + }, + "subcomponents": ["light"] }