$id: "https://docs.exosite.io/schema/config-io-schema.yaml" # $schema: "http://json-schema.org/draft-06/schema#" title: "Config-IO" description: "" type: "object" required: [ last_edited, channels ] properties: last_edited: type: string description: "e.g. 2018-03-28T13:27:39+00:00 or 1638311186313" last_editor: type: string description: String to mark as last editor, Person user name, "user", or "device" meta: type: string description: "This is an open section for manufacturers to include useful meta info about the channels if they see fit" locked: type: boolean description: "marks config as not editable by UI, assume false if not present" default: false channels: type: object describe: "" patternProperties: # "^[a-zA-Z0-9_]+$": # This is what I'd like. "^[-+#%()\t \/0-9:A-Z_a-z]+$": # This is what is on PROD type: object description: "A channel" required: [ display_name, properties ] properties: display_name: type: string description: "Human readable channel name" description: type: string description: "One-liner description" properties: type: object description: "" required: [ data_type ] properties: data_type: type: string description: See "types" section - in this case it could be "BOOLEAN" or "TEMPERATURE" pattern: '^[A-Z_]+$' primitive_type: type: string description: See "types" section - in this case it would be "BOOLEAN" or "NUMERIC" enum: - BOOLEAN - NUMERIC - STRING - JSON data_unit: type: [string, 'null'] description: Enumerated lookup to unit types for the given type pattern: '^[A-Z_]+$' precision: type: [integer, 'null'] description: precision_number_of decimal_places optional but recommended, example value is 2 locked: type: boolean description: marks as not editable by UI, defaults to false if not present control: type: boolean description: defaults to false, whether channel is used for device control min: type: [number, 'null'] description: channel expected value min, applies to numberic type only max: type: [number, 'null'] description: channel expected value max, applies to numberic type only device_diagnostic: type: boolean description: Tells ExoSense that this is a “meta” signal that describes an attribute of the devices health protocol_config: type: object description: if used by device client properties: sample_rate: type: integer description: device client's sample rate for sensor in ms report_rate: type: integer description: optional but recommended - rate at which data sent to platform in ms timeout: type: [integer, 'null'] description: optional but recommended - used by application to provide timeout indication, typically several times expected report rate in ms report_on_change: type: boolean description: default false (always report on start-up) down_sample: type: string description: Minimum in window, Maximum in window, running average in window, or actual value (assume report rate = sample rate) enum: - MIN - MAX - AVG - ACT application: type: string description: fieldbus_logger_application_name, e.g. "Modbus_RTU" interface: type: [string, 'null'] description: optional but required if using "application" e.g. "/dev/tty0/" app_specific_config: type: object description: optional but maybe be required depending on "application" input_raw: type: object description: used to pre-transform data type/unit from raw sensor to channel type, example voltage or bits (ADC) to Pressure properties: max: type: number description: use with max property to convert data format on edge min: type: number description: use with min property to convert data format on edge unit: type: number description: e.g. "mA", reference only multiplier: type: number description: used to pre-transform data type/unit from raw sensor to channel type, example 4-20 mA to Temperature offset: type: number description: used to pre-transform data type/unit from raw sensor to channel type, example 4-20 mA to Temperature control_properties: type: object description: Optional - used to specify control parameters properties: range: type: object description: for Numeric types only properties: min: type: [number, 'null'] description: expected_minimum_value max: type: [number, 'null'] description: expected_maximum_value enum: type: array description: provide a list of acceptable values items: type: string