From a295055b963acf3507767b972cab4e3dd18f78c4 Mon Sep 17 00:00:00 2001 From: owlsketch Date: Tue, 3 Apr 2018 18:19:59 -0400 Subject: [PATCH] Initiation Web Of Things implementation/documentation --- wot/description.json | 112 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 wot/description.json diff --git a/wot/description.json b/wot/description.json new file mode 100644 index 0000000..e2cb5fe --- /dev/null +++ b/wot/description.json @@ -0,0 +1,112 @@ +{ + "name": "Pixel Wall", + "type": "thing", + "description": "A web connected LED display", + "properties": { + "on": { + "description": "Wether the display is turned on", + "type": "boolean" + }, + "brightness": { + "description": "The brightness of the LEDs", + "type": "number", + "minimum": 0, + "maximum": 255 + }, + "width": { + "description": "The width, in number of LEDs, of the display", + "type": "number", + "minimum": 1 + }, + "height": { + "description": "The height, in number of LEDs, of the display", + "type": "number", + "minimum": 1 + }, + "pixelColors": { + "description": "The colors assigned to all the RGB LEDs", + "type": "array", + "items": { + "type": "object", + "properties": { + "index": { + "type": "number", + "minimum": 0 + }, + "RColor": { + "type": "number", + "minimum": 0, + "maximum": 255 + }, + "GColor": { + "type": "number", + "minimum": 0, + "maximum": 255 + }, + "BColor": { + "type": "number", + "minimum": 0, + "maximum": 255 + } + } + } + } + }, + "actions": { + "power": { + "description": "Turn on/off the LED display", + "input": { + "type": "boolean" + } + }, + "setLed": { + "description": "Update the color of a single LED", + "input": { + "type": "object", + "properties": { + "index": { + "type": "number", + "minimum": 0 + }, + "RColor": { + "type": "number", + "minimum": 0, + "maximum": 255 + }, + "GColor": { + "type": "number", + "minimum": 0, + "maximum": 255 + }, + "BColor": { + "type": "number", + "minimum": 0, + "maximum": 255 + } + } + } + }, + "setBrightness": { + "description": "Set the brightness of the LED display", + "input": { + "type": "number", + "minimum": 0, + "maximum": 255 + } + }, + "setWidth": { + "description": "Set the width of the LED display", + "input": { + "type": "number", + "minimum": 0 + } + }, + "setHeight": { + "description": "Set the height of the LED display", + "input": { + "type": "number", + "minimum": 0 + } + } + } +}