From eb45beba23624e86bdd221918aa0a51f1fdc9d50 Mon Sep 17 00:00:00 2001 From: Sebastian Kaebisch Date: Wed, 8 Jun 2022 11:37:09 +0200 Subject: [PATCH 1/2] fixes ediTDor TMs --- .../TD/TDs/siemens-LED.td.jsonld | 78 ++++ ...istanceSensor-Extends-VortoModel.td.jsonld | 41 ++ .../siemens-MyLight-Extends-LwM2M.td.jsonld | 31 ++ .../siemens-Smart-Coffee-Machine-TD.td.jsonld | 442 ++++++++++++++++++ .../TD/TDs/siemens-SmartVentilator.td.jsonld | 43 ++ .../TD/TDs/siemens-Ventilator.td.jsonld | 45 ++ .../TD/TMs/siemens-BottleCapping.tm.jsonld | 21 + .../TD/TMs/siemens-BottleFilling.tm.jsonld | 21 + .../TMs/siemens-BottleFillingLine.tm.jsonld | 44 ++ .../TD/TMs/siemens-LED.tm.jsonld | 38 ++ .../siemens-LwM2M-Light-Control-TM.tm.jsonld | 58 +++ ...istanceSensor-Extends-VortoModel.tm.jsonld | 28 ++ .../siemens-MyLight-Extends-LwM2M.tm.jsonld | 27 ++ .../siemens-Smart-Coffee-Machine-TM.tm.jsonld | 223 +++++++++ .../TD/TMs/siemens-SmartVentilator.tm.jsonld | 23 + .../TD/TMs/siemens-Sprayhead.tm.jsonld | 21 + .../TD/TMs/siemens-Ventilator.tm.jsonld | 19 + 17 files changed, 1203 insertions(+) create mode 100644 events/2022.06.Online/TD/TDs/siemens-LED.td.jsonld create mode 100644 events/2022.06.Online/TD/TDs/siemens-MyDistanceSensor-Extends-VortoModel.td.jsonld create mode 100644 events/2022.06.Online/TD/TDs/siemens-MyLight-Extends-LwM2M.td.jsonld create mode 100644 events/2022.06.Online/TD/TDs/siemens-Smart-Coffee-Machine-TD.td.jsonld create mode 100644 events/2022.06.Online/TD/TDs/siemens-SmartVentilator.td.jsonld create mode 100644 events/2022.06.Online/TD/TDs/siemens-Ventilator.td.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-BottleCapping.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-BottleFilling.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-BottleFillingLine.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-LED.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-LwM2M-Light-Control-TM.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-MyDistanceSensor-Extends-VortoModel.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-MyLight-Extends-LwM2M.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-Smart-Coffee-Machine-TM.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-SmartVentilator.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-Sprayhead.tm.jsonld create mode 100644 events/2022.06.Online/TD/TMs/siemens-Ventilator.tm.jsonld diff --git a/events/2022.06.Online/TD/TDs/siemens-LED.td.jsonld b/events/2022.06.Online/TD/TDs/siemens-LED.td.jsonld new file mode 100644 index 00000000..a973940f --- /dev/null +++ b/events/2022.06.Online/TD/TDs/siemens-LED.td.jsonld @@ -0,0 +1,78 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "title": "LED Thing Model", + "securityDefinitions": { + "basic_sc": { + "scheme": "basic", + "in": "header" + } + }, + "security": "basic_sc", + "links": [ + { + "rel": "collection", + "href": "./SmartVentilation.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "type", + "href": "./LED.tm.jsonld", + "type": "application/tm+json" + } + ], + "properties": { + "R": { + "type": "number", + "description": "Red color", + "forms": [ + { + "href": "http://127.0.13.211:4563/R" + } + ] + }, + "G": { + "type": "number", + "description": "Green color", + "forms": [ + { + "href": "http://127.0.13.211:4563/G" + } + ] + }, + "B": { + "type": "number", + "description": "Blue color", + "forms": [ + { + "href": "http://127.0.13.211:4563/B" + } + ] + } + }, + "actions": { + "fadeIn": { + "title": "fadeIn", + "input": { + "type": "number", + "description": "fadeIn in ms" + }, + "forms": [ + { + "href": "http://127.0.13.211:4563/fadeIn" + } + ] + }, + "fadeOut": { + "title": "fadeOut", + "input": { + "type": "number", + "description": "fadeOut in ms" + }, + "forms": [ + { + "href": "http://127.0.13.211:4563/fadeOut" + } + ] + } + } +} diff --git a/events/2022.06.Online/TD/TDs/siemens-MyDistanceSensor-Extends-VortoModel.td.jsonld b/events/2022.06.Online/TD/TDs/siemens-MyDistanceSensor-Extends-VortoModel.td.jsonld new file mode 100644 index 00000000..29b8a6d1 --- /dev/null +++ b/events/2022.06.Online/TD/TDs/siemens-MyDistanceSensor-Extends-VortoModel.td.jsonld @@ -0,0 +1,41 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type" : "Thing", + "title" : "My DistanceSensor", + "description": "DistanceSensor unit", + "links" :[{ + "rel" : "type", + "href": "https://raw.githubusercontent.com/w3c/wot-testing/main/events/2021.06.Online/TD/TMs/Siemens/MyDistanceSensor-Extends-VortoModel.tm.jsonld", + "type": "application/jsonld" + }], + "securityDefinitions": { + "nosec_sc": { + "scheme": "nosec" + } + }, + "security": ["nosec_sc"], + "properties": { + "distance.currentMeasured": { + "title": "currentMeasured", + "type": "integer", + "forms" : [{ + "href": "mqtt://127.0.0.1:1883/DistanceSensor/currentMeasured" + }] + }, + "distance.minMeasured": { + "title": "minMeasured", + "type": "integer", + "minumum" : 0, + "forms" : [{ + "href": "mqtt://127.0.0.1:1883/DistanceSensor/currentMeasured" + }] + }, + "distance.maxMeasured": { + "title": "maxMeasured", + "type": "integer", + "forms" : [{ + "href": "mqtt://127.0.0.1:1883/DistanceSensor/currentMeasured" + }] + } + } +} \ No newline at end of file diff --git a/events/2022.06.Online/TD/TDs/siemens-MyLight-Extends-LwM2M.td.jsonld b/events/2022.06.Online/TD/TDs/siemens-MyLight-Extends-LwM2M.td.jsonld new file mode 100644 index 00000000..36461fc2 --- /dev/null +++ b/events/2022.06.Online/TD/TDs/siemens-MyLight-Extends-LwM2M.td.jsonld @@ -0,0 +1,31 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type": "ThingModel", + "title": "MyLight Control Device", + "links" : [{ + "rel": "type", + "href": "https://raw.githubusercontent.com/w3c/wot-testing/main/events/2021.06.Online/TD/TMs/Siemens/MyLight-Extends-LwM2M.tm.jsonld", + "type" : "application/jsonld" + }], + "securityDefinitions": { + "nosec_sc": { + "scheme": "nosec" + } + }, + "security": ["nosec_sc"], + "properties": { + "On_Off": { + "title": "OnOff", + "description": "On/off control. Boolean value where True is On and False is Off.", + "type": "boolean", + "forms":[{"href": "coap://example.com/onOff"}] + }, + "Status" : { + "title" : "Current Lamp status", + "description" : "Shows status information (on, off, error)", + "type" : "string", + "enum" : ["on", "off", "error"], + "forms":[{"href": "coap://example.com/Status"}] + } + } +} \ No newline at end of file diff --git a/events/2022.06.Online/TD/TDs/siemens-Smart-Coffee-Machine-TD.td.jsonld b/events/2022.06.Online/TD/TDs/siemens-Smart-Coffee-Machine-TD.td.jsonld new file mode 100644 index 00000000..ed89a6b8 --- /dev/null +++ b/events/2022.06.Online/TD/TDs/siemens-Smart-Coffee-Machine-TD.td.jsonld @@ -0,0 +1,442 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + "https://www.w3.org/2022/wot/td/v1.1", + { + "@language": "en" + } + ], + "title": "Smart-Coffee-Machine", + "description": "A smart coffee machine with a range of capabilities.\nA complementary tutorial is available at http://www.thingweb.io/smart-coffee-machine.html.", + "support": "git://github.com/eclipse/thingweb.node-wot.git", + "version": {"instance": "0.5.1", "model": "1.0.0"}, + "links": [{"rel": "type", "href":"https://raw.githubusercontent.com/w3c/wot-testing/main/events/2021.06.Online/TD/TMs/Siemens/Smart-Coffee-Machine-TM.tm.jsonld","type": "application/jsonld" }], + "properties": { + "allAvailableResources": { + "type": "object", + "description": "Current level of all available resources given as an integer percentage for each particular resource.\nThe data is obtained from the machine's sensors but can be set manually via the availableResourceLevel property in case the sensors are broken.", + "readOnly": true, + "properties": { + "water": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "milk": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "chocolate": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "coffeeBeans": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + }, + "writeOnly": false, + "observable": false, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/allAvailableResources", + "contentType": "application/json", + "op": [ + "readproperty" + ], + "htv:methodName": "GET" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/allAvailableResources", + "contentType": "application/json", + "op": [ + "readproperty" + ] + } + ] + }, + "availableResourceLevel": { + "type": "number", + "description": "Current level of a particular resource. Requires resource id variable as uriVariables.\nThe property can also be overridden, which also requires resource id as uriVariables.", + "uriVariables": { + "id": { + "type": "string", + "enum": [ + "water", + "milk", + "chocolate", + "coffeeBeans" + ] + } + }, + "readOnly": false, + "writeOnly": false, + "observable": false, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/availableResourceLevel{?id}", + "contentType": "application/json", + "op": [ + "readproperty", + "writeproperty" + ] + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/availableResourceLevel", + "contentType": "application/json", + "op": [ + "readproperty", + "writeproperty" + ] + } + ] + }, + "possibleDrinks": { + "type": "array", + "description": "The list of possible drinks in general. Doesn't depend on the available resources.", + "readOnly": true, + "items": { + "type": "string" + }, + "writeOnly": false, + "observable": false, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/possibleDrinks", + "contentType": "application/json", + "op": [ + "readproperty" + ], + "htv:methodName": "GET" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/possibleDrinks", + "contentType": "application/json", + "op": [ + "readproperty" + ] + } + ] + }, + "servedCounter": { + "type": "integer", + "description": "The total number of served beverages.", + "minimum": 0, + "readOnly": false, + "writeOnly": false, + "observable": false, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/servedCounter", + "contentType": "application/json", + "op": [ + "readproperty", + "writeproperty" + ] + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/servedCounter", + "contentType": "application/json", + "op": [ + "readproperty", + "writeproperty" + ] + } + ] + }, + "maintenanceNeeded": { + "type": "boolean", + "description": "Shows whether a maintenance is needed. The property is observable. Automatically set to true when the servedCounter property exceeds 1000.", + "observable": true, + "readOnly": false, + "writeOnly": false, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/maintenanceNeeded", + "contentType": "application/json", + "op": [ + "readproperty", + "writeproperty" + ] + }, + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/maintenanceNeeded/observable", + "contentType": "application/json", + "op": [ + "observeproperty", + "unobserveproperty" + ], + "subprotocol": "longpoll" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/maintenanceNeeded", + "contentType": "application/json", + "op": [ + "readproperty", + "writeproperty", + "observeproperty", + "unobserveproperty" + ] + } + ] + }, + "schedules": { + "type": "array", + "description": "The list of scheduled tasks.", + "readOnly": true, + "items": { + "type": "object", + "properties": { + "drinkId": { + "type": "string", + "description": "Defines what drink to make, drinkId is one of possibleDrinks property values, e.g. latte." + }, + "size": { + "type": "string", + "description": "Defines the size of a drink, s = small, m = medium, l = large.", + "enum": [ + "s", + "m", + "l" + ] + }, + "quantity": { + "type": "integer", + "description": "Defines how many drinks to make, ranging from 1 to 5.", + "minimum": 1, + "maximum": 5 + }, + "time": { + "type": "string", + "description": "Defines the time of the scheduled task in 24h format, e.g. 10:00 or 21:00." + }, + "mode": { + "type": "string", + "description": "Defines the mode of the scheduled task, e.g. once or everyday. All the possible values are given in the enum field of this Thing Description.", + "enum": [ + "once", + "everyday", + "everyMo", + "everyTu", + "everyWe", + "everyTh", + "everyFr", + "everySat", + "everySun" + ] + } + } + }, + "writeOnly": false, + "observable": false, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/schedules", + "contentType": "application/json", + "op": [ + "readproperty" + ], + "htv:methodName": "GET" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/schedules", + "contentType": "application/json", + "op": [ + "readproperty" + ] + } + ] + } + }, + "actions": { + "makeDrink": { + "description": "Make a drink from available list of beverages. Accepts drink id, size and quantity as uriVariables.\nBrews one medium americano if no uriVariables are specified.", + "uriVariables": { + "drinkId": { + "type": "string", + "description": "Defines what drink to make, drinkId is one of possibleDrinks property values, e.g. latte." + }, + "size": { + "type": "string", + "description": "Defines the size of a drink, s = small, m = medium, l = large.", + "enum": [ + "s", + "m", + "l" + ] + }, + "quantity": { + "type": "integer", + "description": "Defines how many drinks to make, ranging from 1 to 5.", + "minimum": 1, + "maximum": 5 + } + }, + "output": { + "type": "object", + "description": "Returns true/false and a message when all invoked promises are resolved (asynchronous).", + "properties": { + "result": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/actions/makeDrink{?drinkId,size,quantity}", + "contentType": "application/json", + "op": [ + "invokeaction" + ], + "htv:methodName": "POST" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/actions/makeDrink", + "contentType": "application/json", + "op": "invokeaction" + } + ], + "idempotent": false, + "safe": false + }, + "setSchedule": { + "description": "Add a scheduled task to the schedules property. Accepts drink id, size, quantity, time and mode as body of a request.\nAssumes one medium americano if not specified, but time and mode are mandatory fields.", + "input": { + "type": "object", + "properties": { + "drinkId": { + "type": "string", + "description": "Defines what drink to make, drinkId is one of possibleDrinks property values, e.g. latte." + }, + "size": { + "type": "string", + "description": "Defines the size of a drink, s = small, m = medium, l = large.", + "enum": [ + "s", + "m", + "l" + ] + }, + "quantity": { + "type": "integer", + "description": "Defines how many drinks to make, ranging from 1 to 5.", + "minimum": 1, + "maximum": 5 + }, + "time": { + "type": "string", + "description": "Defines the time of the scheduled task in 24h format, e.g. 10:00 or 21:00." + }, + "mode": { + "type": "string", + "description": "Defines the mode of the scheduled task, e.g. once or everyday. All the possible values are given in the enum field of this Thing Description.", + "enum": [ + "once", + "everyday", + "everyMo", + "everyTu", + "everyWe", + "everyTh", + "everyFr", + "everySat", + "everySun" + ] + } + }, + "required": [ + "time", + "mode" + ] + }, + "output": { + "type": "object", + "description": "Returns true/false and a message when all invoked promises are resolved (asynchronous).", + "properties": { + "result": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/actions/setSchedule", + "contentType": "application/json", + "op": [ + "invokeaction" + ], + "htv:methodName": "POST" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/actions/setSchedule", + "contentType": "application/json", + "op": "invokeaction" + } + ], + "idempotent": false, + "safe": false + } + }, + "events": { + "outOfResource": { + "description": "Out of resource event. Emitted when the available resource level is not sufficient for a desired drink.", + "data": { + "type": "string" + }, + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/events/outOfResource", + "contentType": "application/json", + "subprotocol": "longpoll", + "op": [ + "subscribeevent", + "unsubscribeevent" + ] + }, + { + "href": "ws://plugfest.thingweb.io:8083/smart-coffee-machine/events/outOfResource", + "contentType": "application/json", + "op": "subscribeevent" + }, + { + "href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/events/outOfResource", + "contentType": "application/json", + "op": [ + "subscribeevent", + "unsubscribeevent" + ] + } + ] + } + }, + "@type": "Thing", + "security": [ + "nosec_sc" + ], + "id": "urn:uuid:55f01138-5c96-4b3d-a5d0-81319a2db677", + "forms": [ + { + "href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/all/properties", + "contentType": "application/json", + "op": [ + "readallproperties", + "readmultipleproperties", + "writeallproperties", + "writemultipleproperties" + ] + } + ], + "securityDefinitions": { + "nosec_sc": { + "scheme": "nosec" + } + } +} diff --git a/events/2022.06.Online/TD/TDs/siemens-SmartVentilator.td.jsonld b/events/2022.06.Online/TD/TDs/siemens-SmartVentilator.td.jsonld new file mode 100644 index 00000000..b810fbba --- /dev/null +++ b/events/2022.06.Online/TD/TDs/siemens-SmartVentilator.td.jsonld @@ -0,0 +1,43 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "title": "Smart Ventilator", + "securityDefinitions": { + "basic_sc": { + "scheme": "basic", + "in": "header" + } + }, + "security": "basic_sc", + "links": [ + { + "rel": "item", + "href": "./Ventilation.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "item", + "href": "./LED.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "type", + "href": "./SmartVentilator.tm.jsonld", + "type": "application/tm+json" + } + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "On", + "Off", + "Error" + ], + "forms": [ + { + "href": "http://127.0.13.232:4563/status" + } + ] + } + } +} diff --git a/events/2022.06.Online/TD/TDs/siemens-Ventilator.td.jsonld b/events/2022.06.Online/TD/TDs/siemens-Ventilator.td.jsonld new file mode 100644 index 00000000..2ca2eaea --- /dev/null +++ b/events/2022.06.Online/TD/TDs/siemens-Ventilator.td.jsonld @@ -0,0 +1,45 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "title": "Ventilator", + "securityDefinitions": { + "basic_sc": { + "scheme": "basic", + "in": "header" + } + }, + "security": "basic_sc", + "links": [ + { + "rel": "collection", + "href": "./SmartVentilation.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "type", + "href": "./Ventilation.tm.jsonld", + "type": "application/tm+json" + } + ], + "security": "basic_sc", + "properties": { + "switch": { + "type": "boolean", + "description": "True=On; False=Off", + "forms": [ + { + "href": "http://127.0.13.212:4563/switch" + } + ] + }, + "adjustRpm": { + "type": "number", + "minimum": 200, + "maximum": 1200, + "forms": [ + { + "href": "http://127.0.13.212:4563/adjustRpm" + } + ] + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-BottleCapping.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-BottleCapping.tm.jsonld new file mode 100644 index 00000000..bd266fda --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-BottleCapping.tm.jsonld @@ -0,0 +1,21 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + "https://www.w3.org/2022/wot/td/v1.1", + { + "saref": "https://w3id.org/saref#" + } + ], + "@type": "tm:ThingModel", + "title": "Bottle Capping TM", + "description": "Bottle Capper for 2 Bottle", + "properties": { + "operationCount": { + "@type": "saref:Measurement", + "readOnly": true, + "observable": true, + "description": "The amount of bottles processed", + "type": "number" + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-BottleFilling.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-BottleFilling.tm.jsonld new file mode 100644 index 00000000..b076d27e --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-BottleFilling.tm.jsonld @@ -0,0 +1,21 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + "https://www.w3.org/2022/wot/td/v1.1", + { + "saref": "https://w3id.org/saref#" + } + ], + "@type": "tm:ThingModel", + "title": "Bottle Filling TM", + "description": "Bottle filler for 4 bottles", + "properties": { + "operationCount": { + "@type": "saref:Measurement", + "readOnly": true, + "observable": true, + "description": "The amount of bottles processed", + "type": "number" + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-BottleFillingLine.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-BottleFillingLine.tm.jsonld new file mode 100644 index 00000000..36c5f7d9 --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-BottleFillingLine.tm.jsonld @@ -0,0 +1,44 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + "https://www.w3.org/2022/wot/td/v1.1", + { + "saref": "https://w3id.org/saref#" + } + ], + "@type": "tm:ThingModel", + "title": "Bottle filling line TM", + "links": [ + { + "rel": "tm:submodel", + "href": "BottleFill.tm.jsonld", + "type": "application/tm+json" + }, + { + "rel": "tm:submodel", + "href": "BottleCapping.tm.jsonld", + "type": "application/tm+json" + }, + { + "rel": "tm:submodel", + "href": "Sprayhead.tm.jsonld", + "type": "application/tm+json" + } + ], + "properties": { + "operatingState": { + "@type": "saref:MultiLevelState", + "description": "The current state of the system, possible states are 'Wait','In Progress'", + "readOnly": true, + "observable": true, + "type": "string" + }, + "productionCounter": { + "@type": "saref:Measurement", + "description": "The amount of bottles processed", + "readOnly": true, + "observable": true, + "type": "number" + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-LED.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-LED.tm.jsonld new file mode 100644 index 00000000..5974189b --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-LED.tm.jsonld @@ -0,0 +1,38 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type": "tm:ThingModel", + "title": "LED Thing Model", + "version": { + "model": "1.0.0" + }, + "properties": { + "R": { + "type": "number", + "description": "Red color" + }, + "G": { + "type": "number", + "description": "Green color" + }, + "B": { + "type": "number", + "description": "Blue color" + } + }, + "actions": { + "fadeIn": { + "title": "fadeIn", + "input": { + "type": "number", + "description": "fadeIn in ms" + } + }, + "fadeOut": { + "title": "fadeOut", + "input": { + "type": "number", + "description": "fadeOut in ms" + } + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-LwM2M-Light-Control-TM.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-LwM2M-Light-Control-TM.tm.jsonld new file mode 100644 index 00000000..92040612 --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-LwM2M-Light-Control-TM.tm.jsonld @@ -0,0 +1,58 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type": "tm:ThingModel", + "title": "OMA LwM2M Light Control (Object ID 3311)", + "tm:required": [ + "#/properties/On_Off" + ], + "properties": { + "On_Off": { + "title": "On_Off", + "description": "On/off control. Boolean value where True is On and False is Off.", + "type": "boolean" + }, + "Dimmer": { + "title": "Dimmer", + "description": "This resource represents a dimmer setting, which has an Integer value between 0 and 100 as a percentage.", + "type": "integer", + "unit": "/100", + "minimum": 0, + "maximum": 100 + }, + "On_time": { + "title": "On_time", + "description": "The time in seconds that the device has been on. Writing a value of 0 resets the counter.", + "type": "integer", + "unit": "s" + }, + "Cumulative_active_power": { + "title": "Cumulative_active_power", + "description": "The cumulative active power since the last cumulative energy reset or device start.", + "writable": false, + "type": "number", + "unit": "Wh" + }, + "Power_factor": { + "title": "Power_factor", + "description": "If applicable, the power factor of the current consumption.", + "writable": false, + "type": "number" + }, + "Colour": { + "title": "Colour", + "description": "A string representing a value in some color space.", + "type": "string" + }, + "Sensor_Units": { + "title": "Sensor_Units", + "description": "Measurement Units Definition.", + "writable": false, + "type": "string" + }, + "Application_Type": { + "title": "Application_Type", + "description": "The application type of the sensor or actuator as a string depending on the use case.", + "type": "string" + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-MyDistanceSensor-Extends-VortoModel.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-MyDistanceSensor-Extends-VortoModel.tm.jsonld new file mode 100644 index 00000000..f54bbdd9 --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-MyDistanceSensor-Extends-VortoModel.tm.jsonld @@ -0,0 +1,28 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type" : "tm:ThingModel", + "title" : "My DistanceSensor", + "description": "DistanceSensor unit", + "links" :[{ + "rel" : "tm:extend", + "href": "https://raw.githubusercontent.com/w3c/wot-testing/main/events/2021.03.Online/TMs/Vorto/DistanceSensor.json", + "type": "application/json" + }], + "tm:required": [ + "#/properties/distance.currentMeasured", + "#/properties/distance.minMeasured", + "#/properties/distance.maxMeasured" + ], + "properties": { + "distance.currentMeasured": { + "type": "integer" + }, + "distance.minMeasured": { + "type": "integer", + "minumum" : 0 + }, + "distance.maxMeasured": { + "type": "integer" + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-MyLight-Extends-LwM2M.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-MyLight-Extends-LwM2M.tm.jsonld new file mode 100644 index 00000000..9ae64668 --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-MyLight-Extends-LwM2M.tm.jsonld @@ -0,0 +1,27 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type": "tm:ThingModel", + "title": "MyLight Control Device", + "links": [ + { + "rel": "tm:extend", + "href": "https://raw.githubusercontent.com/w3c/wot-testing/main/events/2021.06.Online/TD/TMs/Siemens/LwM2M-Light-Control-TM.tm.jsonld", + "type": "application/jsonld" + } + ], + "properties": { + "On_Off": { + "title": "OnOff" + }, + "Status": { + "title": "Current Lamp status", + "description": "Shows status information (on, off, error)", + "type": "string", + "enum": [ + "on", + "off", + "error" + ] + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-Smart-Coffee-Machine-TM.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-Smart-Coffee-Machine-TM.tm.jsonld new file mode 100644 index 00000000..9a1e5bc5 --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-Smart-Coffee-Machine-TM.tm.jsonld @@ -0,0 +1,223 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + "https://www.w3.org/2022/wot/td/v1.1", + { + "@language": "en" + } + ], + "@type": "tm:ThingModel", + "title": "Smart-Coffee-Machine Model - {{GLOBAL_TITLE}}", + "description": "A smart coffee machine with a range of capabilities. {{GLOBAL_DESCRIPTION}}", + "support": "git://github.com/eclipse/thingweb.node-wot.git", + "version": { + "model": "1.0.0" + }, + "tm:required": [ + "#/properties/allAvailableResources", + "#/properties/allAvailableResources", + "#/properties/availableResourceLevel", + "#/properties/possibleDrinks", + "#/properties/maintenanceNeeded", + "#/properties/schedules", + "#/properties/maintenanceNeeded", + "#/actions/makeDrink", + "#/actions/setSchedule", + "#/events/outOfResource" + ], + "properties": { + "allAvailableResources": { + "type": "object", + "description": "Current level of all available resources given as an integer percentage for each particular resource.\nThe data is obtained from the machine's sensors but can be set manually via the availableResourceLevel property in case the sensors are broken.", + "readOnly": true, + "properties": "{{RESOURCES_DEFINITION}}" + }, + "availableResourceLevel": { + "type": "number", + "description": "Current level of a particular resource. Requires resource id variable as uriVariables.\nThe property can also be overridden, which also requires resource id as uriVariables.", + "uriVariables": { + "id": { + "type": "string" + } + } + }, + "possibleDrinks": { + "type": "array", + "description": "The list of possible drinks in general. Doesn't depend on the available resources.", + "readOnly": true, + "items": { + "type": "string" + }, + "writeOnly": false, + "observable": false + }, + "servedCounter": { + "type": "integer", + "description": "The total number of served beverages.", + "minimum": 0 + }, + "maintenanceNeeded": { + "type": "boolean", + "description": "Shows whether a maintenance is needed. The property is observable. Automatically set to true when the servedCounter property exceeds 1000.", + "observable": true, + "readOnly": false, + "writeOnly": false + }, + "schedules": { + "type": "array", + "description": "The list of scheduled tasks.", + "readOnly": true, + "items": { + "type": "object", + "properties": { + "drinkId": { + "type": "string", + "description": "Defines what drink to make, drinkId is one of possibleDrinks property values, e.g. latte." + }, + "size": { + "type": "string", + "description": "Defines the size of a drink, s = small, m = medium, l = large.", + "enum": [ + "s", + "m", + "l" + ] + }, + "quantity": { + "type": "integer", + "description": "Defines how many drinks to make, ranging from 1 to 5.", + "minimum": 1, + "maximum": 5 + }, + "time": { + "type": "string", + "description": "Defines the time of the scheduled task in 24h format, e.g. 10:00 or 21:00." + }, + "mode": { + "type": "string", + "description": "Defines the mode of the scheduled task, e.g. once or everyday. All the possible values are given in the enum field of this Thing Description.", + "enum": [ + "once", + "everyday", + "everyMo", + "everyTu", + "everyWe", + "everyTh", + "everyFr", + "everySat", + "everySun" + ] + } + } + } + } + }, + "actions": { + "makeDrink": { + "description": "Make a drink from available list of beverages. Accepts drink id, size and quantity as uriVariables.\nBrews one medium americano if no uriVariables are specified.", + "uriVariables": { + "drinkId": { + "type": "string", + "description": "Defines what drink to make, drinkId is one of possibleDrinks property values, e.g. latte." + }, + "size": { + "type": "string", + "description": "Defines the size of a drink, s = small, m = medium, l = large.", + "enum": [ + "s", + "m", + "l" + ] + }, + "quantity": { + "type": "integer", + "description": "Defines how many drinks to make, ranging from 1 to 5.", + "minimum": 1, + "maximum": 5 + } + }, + "output": { + "type": "object", + "description": "Returns true/false and a message when all invoked promises are resolved (asynchronous).", + "properties": { + "result": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + } + }, + "setSchedule": { + "description": "Add a scheduled task to the schedules property. Accepts drink id, size, quantity, time and mode as body of a request.\nAssumes one medium americano if not specified, but time and mode are mandatory fields.", + "input": { + "type": "object", + "properties": { + "drinkId": { + "type": "string", + "description": "Defines what drink to make, drinkId is one of possibleDrinks property values, e.g. latte." + }, + "size": { + "type": "string", + "description": "Defines the size of a drink, s = small, m = medium, l = large.", + "enum": [ + "s", + "m", + "l" + ] + }, + "quantity": { + "type": "integer", + "description": "Defines how many drinks to make, ranging from 1 to 5.", + "minimum": 1, + "maximum": 5 + }, + "time": { + "type": "string", + "description": "Defines the time of the scheduled task in 24h format, e.g. 10:00 or 21:00." + }, + "mode": { + "type": "string", + "description": "Defines the mode of the scheduled task, e.g. once or everyday. All the possible values are given in the enum field of this Thing Description.", + "enum": [ + "once", + "everyday", + "everyMo", + "everyTu", + "everyWe", + "everyTh", + "everyFr", + "everySat", + "everySun" + ] + } + }, + "required": [ + "time", + "mode" + ] + }, + "output": { + "type": "object", + "description": "Returns true/false and a message when all invoked promises are resolved (asynchronous).", + "properties": { + "result": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + } + } + }, + "events": { + "outOfResource": { + "description": "Out of resource event. Emitted when the available resource level is not sufficient for a desired drink.", + "data": { + "type": "string" + } + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-SmartVentilator.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-SmartVentilator.tm.jsonld new file mode 100644 index 00000000..571a70bc --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-SmartVentilator.tm.jsonld @@ -0,0 +1,23 @@ + { + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type": "tm:ThingModel", + "title": "Smart Ventilator Thing Model", + "version" : { "model" : "1.0.0" }, + "links": [ + { + "rel": "tm:submodel", + "href": "./Ventilation.tm.jsonld", + "type": "application/tm+json", + "instanceName": "ventilation" + }, + { + "rel": "tm:submodel", + "href": "./LED.tm.jsonld", + "type": "application/tm+json", + "instanceName": "led" + } + ], + "properties" : { + "status" : {"type": "string", "enum": ["On", "Off", "Error"]} + } + } diff --git a/events/2022.06.Online/TD/TMs/siemens-Sprayhead.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-Sprayhead.tm.jsonld new file mode 100644 index 00000000..ef84822a --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-Sprayhead.tm.jsonld @@ -0,0 +1,21 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + "https://www.w3.org/2022/wot/td/v1.1", + { + "saref": "https://w3id.org/saref#" + } + ], + "@type": "tm:ThingModel", + "title": "Sprayhead TM", + "description": "Provide labels for the bottles", + "properties": { + "operationCount": { + "@type": "saref:Measurement", + "readOnly": true, + "observable": true, + "description": "The amount of produced labels", + "type": "number" + } + } +} diff --git a/events/2022.06.Online/TD/TMs/siemens-Ventilator.tm.jsonld b/events/2022.06.Online/TD/TMs/siemens-Ventilator.tm.jsonld new file mode 100644 index 00000000..1aa3e9d9 --- /dev/null +++ b/events/2022.06.Online/TD/TMs/siemens-Ventilator.tm.jsonld @@ -0,0 +1,19 @@ +{ + "@context": ["https://www.w3.org/2019/wot/td/v1","https://www.w3.org/2022/wot/td/v1.1"], + "@type": "tm:ThingModel", + "title": "Ventilator Thing Model", + "version": { + "model": "1.0.0" + }, + "properties": { + "switch": { + "type": "boolean", + "description": "True=On; False=Off" + }, + "adjustRpm": { + "type": "number", + "minimum": 200, + "maximum": 1200 + } + } +} From 78a6087de525592c11cf02696d9a30be0e70533c Mon Sep 17 00:00:00 2001 From: Sebastian Kaebisch Date: Wed, 8 Jun 2022 11:42:46 +0200 Subject: [PATCH 2/2] batValidation.sh update --- events/2022.06.Online/TD/batchValidation.sh | 84 ++++++++++++++++----- 1 file changed, 65 insertions(+), 19 deletions(-) diff --git a/events/2022.06.Online/TD/batchValidation.sh b/events/2022.06.Online/TD/batchValidation.sh index d5cf5506..33bbe94a 100755 --- a/events/2022.06.Online/TD/batchValidation.sh +++ b/events/2022.06.Online/TD/batchValidation.sh @@ -1,33 +1,79 @@ #!/bin/bash -# Note: this needs to be updated for where you have installed thingweb-playground -#PLAYGROUNDLOCATION=~/git/thingweb-playground/ -PLAYGROUNDLOCATION=~/Dev/thingweb-playground/ +PLAYGROUNDLOCATION=~/git/thingweb-playground/ # Ditto IMPLEMENTATION=Ditto -# node $PLAYGROUNDLOCATION/packages/cli/index.js -t TM -i $IMPLEMENTATION/TMs/ -o Results/$IMPLEMENTATION-TM -a -m $IMPLEMENTATION/$IMPLEMENTATION.csv -# node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION-TD -a -m $IMPLEMENTATION/$IMPLEMENTATION.csv -# node $PLAYGROUNDLOCATION/packages/cli/index.js --merge-only Results/$IMPLEMENTATION-TM.csv Results/$IMPLEMENTATION-TD.csv -o Results/$IMPLEMENTATION -# rm Results/$IMPLEMENTATION-TM.csv -# rm Results/$IMPLEMENTATION-TD.csv +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TM -i $IMPLEMENTATION/TMs/ -o Results/$IMPLEMENTATION-TM -a -m $IMPLEMENTATION/$IMPLEMENTATION.csv +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION-TD -a -m $IMPLEMENTATION/$IMPLEMENTATION.csv +node $PLAYGROUNDLOCATION/packages/cli/index.js --merge-only Results/$IMPLEMENTATION-TM.csv Results/$IMPLEMENTATION-TD.csv -o Results/$IMPLEMENTATION +rm Results/$IMPLEMENTATION-TM.csv +rm Results/$IMPLEMENTATION-TD.csv # ECLASS -# IMPLEMENTATION=ECLASS -# node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a +IMPLEMENTATION=ECLASS +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a -# saywot -# IMPLEMENTATION=saywot -# node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a -m $IMPLEMENTATION/$IMPLEMENTATION.csv +# EDITDOR +# ERRORS +IMPLEMENTATION=editdor +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TM -i $IMPLEMENTATION/TMs/ -o Results/$IMPLEMENTATION-TM -a +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION-TD -a +node $PLAYGROUNDLOCATION/packages/cli/index.js --merge-only Results/$IMPLEMENTATION-TM.csv Results/$IMPLEMENTATION-TD.csv -o Results/$IMPLEMENTATION +rm Results/$IMPLEMENTATION-TM.csv +rm Results/$IMPLEMENTATION-TD.csv + +# # flask-tum +IMPLEMENTATION=flask-tum +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# Fujitsu +IMPLEMENTATION=Fujitsu +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# hitachi-esp-idf +IMPLEMENTATION=hitachi-esp-idf +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# hitachi-node-red +IMPLEMENTATION=hitachi-node-red +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a # intel-nodejs IMPLEMENTATION=intel-nodejs -echo "$IMPLEMENTATION" -node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a -m $IMPLEMENTATION/TDs/manual.csv +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a # intel-proxy -# JUST a manual.csv, no TDs, so just copy it over, already named after implementation -IMPLEMENTATION=intel-proxy -echo "$IMPLEMENTATION" -cp $IMPLEMENTATION/$IMPLEMENTATION.csv Results/$IMPLEMENTATION.csv +# only a csv file? + +# manual tms from TUM +IMPLEMENTATION=manual-tms +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TM -i $IMPLEMENTATION/TMs/ -o Results/$IMPLEMENTATION -a + +# NHK +IMPLEMENTATION=NHK +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# node-wot +IMPLEMENTATION=node-wot +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# Oracle +IMPLEMENTATION=Oracle +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# Philips Hue +IMPLEMENTATION=philips-hue +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a + +# saywot +IMPLEMENTATION=saywot +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a -m $IMPLEMENTATION/$IMPLEMENTATION.csv + +# WebThings +IMPLEMENTATION=WebThings +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a +# Logilabs (TDD) +IMPLEMENTATION=logilab +node $PLAYGROUNDLOCATION/packages/cli/index.js -t TD -i $IMPLEMENTATION/TDs/ -o Results/$IMPLEMENTATION -a