|
| 1 | +{ |
| 2 | + "id": "http://openinterconnect.org/enoceanmapping/schemas/LightTemperatureOccupancySensor.A5_08_01.json#", |
| 3 | + "$schema": "http://json-schema.org/draft-04/schema#", |
| 4 | + "description" : "Copyright (c) 2019 Open Connectivity Foundation, Inc. All rights reserved.", |
| 5 | + "title": "Light, Temperature and Occupancy Sensor EEP A5-08-01", |
| 6 | + "definitions": { |
| 7 | + "A5_08_01": { |
| 8 | + "type": "object", |
| 9 | + "properties": { |
| 10 | + "PIR": { |
| 11 | + "type": "number", |
| 12 | + "description": "Occupancy", |
| 13 | + "x-ocf-conversion": { |
| 14 | + "x-ocf-alias": "oic.r.sensor.presence", |
| 15 | + "x-to-ocf": [ |
| 16 | + "if (PIR==0):", |
| 17 | + " oic.r.sensor.presence.value = true", |
| 18 | + "else:", |
| 19 | + " oic.r.sensor.presence.value = false" |
| 20 | + ], |
| 21 | + "x-from-ocf": [ |
| 22 | + "N/A" |
| 23 | + ] |
| 24 | + } |
| 25 | + }, |
| 26 | + "lightsensor": { |
| 27 | + "type": "number", |
| 28 | + "description": "Current Illuminance in Lux", |
| 29 | + "x-ocf-conversion": { |
| 30 | + "x-ocf-alias": "oic.r.sensor.illuminance", |
| 31 | + "x-to-ocf": [ |
| 32 | + "oic.r.sensor.illuminance.illuminance = lightsensor", |
| 33 | + "oic.r.sensor.illuminance.range = [0.0, 510.0]" |
| 34 | + ], |
| 35 | + "x-from-ocf": [ |
| 36 | + "N/A" |
| 37 | + ] |
| 38 | + } |
| 39 | + }, |
| 40 | + "temperature": { |
| 41 | + "type": "number", |
| 42 | + "description": "Current Temperature", |
| 43 | + "x-ocf-conversion": { |
| 44 | + "x-ocf-alias": "oic.r.temperature", |
| 45 | + "x-to-ocf": [ |
| 46 | + "oic.r.temperature.temperature = temperature", |
| 47 | + "oic.r.temperature.units = C", |
| 48 | + "oic.r.temperature.range = [0.0, 51.0]" |
| 49 | + ], |
| 50 | + "x-from-ocf": [ |
| 51 | + "N/A" |
| 52 | + ] |
| 53 | + } |
| 54 | + } |
| 55 | + |
| 56 | + } |
| 57 | + } |
| 58 | + }, |
| 59 | + "type": "object", |
| 60 | + "allOf": [ |
| 61 | + {"$ref": "#/definitions/A5_08_01"} |
| 62 | + ], |
| 63 | + "required": [ "PIR", "temperature", "lightsensor"] |
| 64 | +} |
0 commit comments