From 6d07ad4c5e5aa9055dce323eac5402a88ee7dc3a Mon Sep 17 00:00:00 2001 From: barnstee Date: Mon, 25 Nov 2024 12:25:58 +0100 Subject: [PATCH] Added BACnet NuGet and sample, added S7 OPC UA sample and updated NuGets, --- Samples/BACNet.tm.jsonld | 77 ++++++++++++++++++ Samples/s7.td.jsonld | 80 +++++++++++++++++++ UAEdgeTranslator.csproj | 2 + .../WoTThingModelGenerator.csproj | 2 +- 4 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 Samples/BACNet.tm.jsonld create mode 100644 Samples/s7.td.jsonld diff --git a/Samples/BACNet.tm.jsonld b/Samples/BACNet.tm.jsonld new file mode 100644 index 0000000..407ea85 --- /dev/null +++ b/Samples/BACNet.tm.jsonld @@ -0,0 +1,77 @@ +{ + "@context": [ + "https://www.w3.org/2022/wot/td/v1.1", + { + "bacv": "https://example.org/bacnet", + "qudt": "http://qudt.org/vocab/quantitykind/", + "brick": "https://brickschema.org/schema/Brick#", + "elem": "http://w3id.org/elementary#" + }, + "https://www.w3.org/2022/wot/discovery" + ], + "id": "urn:plugfest-room-thermostat", + "@type": [ + "brick:Thermostat", + "Thing" + ], + "elem:hostsProgram": { + "id": "urn:temperature-controller", + "elem:hasInput": ":temperature" + }, + "brick:isPartOf": { + "id": "urn:plugfest-room", + "@type": "brick:Room", + "rdfs:label": "plugfest-room" + }, + "securityDefinitions": { + "nosec_sc": { + "scheme": "nosec" + } + }, + "properties": { + "temperature_setpoint": { + "type": [ + "brick:Cooling_Zone_Air_Temperature_Setpoint", + "number" + ], + "elem:influences": ":temperature", + "brick:hasQuantityKind": "brick:Temperature", + "readOnly": false, + "forms": [ + { + "bacv:hasDataType": { + "@type": "bacv:Real" + }, + "bacv:usesService": "ReadProperty", + "op": "readproperty", + "href": "bacnet://1005/1,85" + } + ] + }, + "temperature": { + "type": [ + "brick:Zone_Air_Temperature_Sensor", + "number" + ], + "brick:hasQuantityKind": "brick:Temperature", + "readOnly": true, + "forms": [ + { + "bacv:hasDataType": { + "@type": "bacv:Real" + }, + "bacv:usesService": "ReadProperty", + "op": "readproperty", + "href": "bacnet://5/0,85" + } + ] + } + }, + "security": "nosec_sc", + "title": "Thermostat in plugfest room", + "registration": { + "created": "2024-11-25T10:42:34.155016+00:00", + "modified": "2024-11-25T10:42:34.155016+00:00", + "retrieved": "2024-11-25T10:44:46.930439+00:00" + } +} diff --git a/Samples/s7.td.jsonld b/Samples/s7.td.jsonld new file mode 100644 index 0000000..b505a35 --- /dev/null +++ b/Samples/s7.td.jsonld @@ -0,0 +1,80 @@ +{ + "@context": [ + "https://www.w3.org/2019/wot/td/v1", + { + "opc": "http://opcfoundation.org/UA/", + "iec61360": "https://webstore.iec.ch/publication/5381", + "eclass": "https://www.eclasscontent.com/owl/v11.1", + "@language": "en" + } + ], + "id": "urn:siemens:demo:case:lamp", + "title": "Demo Lamp Case", + "@type": "eclass:IRDI_0173-1#01-ADP410#010", + "securityDefinitions": { + "nosec_sc": { + "scheme": "nosec" + } + }, + "security": "nosec_sc", + "base": "opc.tcp://192.168.120.237:4840/", + "properties": { + "lampOnOff": { + "title": "Set lamp status", + "description": "True=Lamp is on; False=Lamp is off", + "eclass:IRDI_0173-1#01-ADN292#009": { + "eclass:IRDI_0173-1#02-AAC314#002": "K" + }, + "writeOnly": true, + "type": "boolean", + "@type": [ + "opc:Boolean", + "iec61360:BooleanType" + ], + "forms": [ + { + "op": "writeproperty", + "href": "ns=3;s=\"LED\".\"State\"", + "contentType": "application/x.opcua-binary", + "opc:method": "WRITE" + } + ] + }, + "lampStatus": { + "title": "Provides lamp status", + "description": "True=Lamp is on; False=Lamp is off", + "readOnly": true, + "type": "boolean", + "@type": [ + "opc:Boolean", + "iec61360:BooleanType" + ], + "forms": [ + { + "op": "readproperty", + "href": "ns=3;s=\"LED\".\"State\"", + "contentType": "application/x.opcua-binary", + "opc:method": "READ" + } + ] + }, + "beltOnOff": { + "title": "beltOnOff", + "observable": false, + "readOnly": false, + "description": "Start/stop belt", + "type": "boolean", + "opc:dataType": "Boolean", + "forms": [ + { + "op": [ + "writeproperty", + "readproperty" + ], + "href": "ns=3;s=\"Conveyor\".\"BlockOnConveyor\"", + "contentType": "application/x.opcua-binary" + } + ] + } + } +} \ No newline at end of file diff --git a/UAEdgeTranslator.csproj b/UAEdgeTranslator.csproj index b1b82d0..e85a512 100644 --- a/UAEdgeTranslator.csproj +++ b/UAEdgeTranslator.csproj @@ -32,7 +32,9 @@ + + diff --git a/WoTThingModelGenerator/WoTThingModelGenerator.csproj b/WoTThingModelGenerator/WoTThingModelGenerator.csproj index 7418876..ddc3b7e 100644 --- a/WoTThingModelGenerator/WoTThingModelGenerator.csproj +++ b/WoTThingModelGenerator/WoTThingModelGenerator.csproj @@ -44,7 +44,7 @@ - +