From 978b8d0b692ac5229405ba3034d287a1bf872634 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Thu, 18 Dec 2025 09:58:23 -0700 Subject: [PATCH 1/7] adding automation groups --- bricksrc/collections.py | 15 +++++++++++++- bricksrc/definitions.csv | 1 + bricksrc/recpatches.ttl | 36 +++++++++++++++++----------------- bricksrc/root_class_shapes.ttl | 7 +++++-- 4 files changed, 38 insertions(+), 21 deletions(-) diff --git a/bricksrc/collections.py b/bricksrc/collections.py index 2da6e474..90b4fa2c 100644 --- a/bricksrc/collections.py +++ b/bricksrc/collections.py @@ -62,7 +62,9 @@ }, }, }, - "VRF_System": {"tags": [TAG.Variable, TAG.Refrigerant, TAG.Flow, TAG.System]}, + "VRF_System": { + "tags": [TAG.Variable, TAG.Refrigerant, TAG.Flow, TAG.System] + }, "Refrigeration_System": {"tags": [TAG.Refrigeration, TAG.System]}, "Steam_System": {"tags": [TAG.Steam, TAG.System]}, "Water_System": { @@ -173,6 +175,17 @@ ] }, }, + "Automation_Group": { + "tags": [TAG.Collection, TAG.Automation, TAG.Group], + "constraints": { + BRICK.hasPart: [ + BRICK.Equipment, + BRICK.Point, + BRICK.Automation_Group, + BRICK.Point_Group, + ] + }, + }, "Loop": { "tags": [TAG.Collection, TAG.Loop], "subclasses": loop_subclasses, diff --git a/bricksrc/definitions.csv b/bricksrc/definitions.csv index bef3dba1..8e5aca86 100644 --- a/bricksrc/definitions.csv +++ b/bricksrc/definitions.csv @@ -57,6 +57,7 @@ https://brickschema.org/schema/Brick#Automatic_Switch,An automatic switch operat https://brickschema.org/schema/Brick#Automatic_Tint_Window,A window with tint control., https://brickschema.org/schema/Brick#Automatic_Tint_Window_Array,An array of Automatic Tint Windows., https://brickschema.org/schema/Brick#Automatic_Transfer_Switch,An automatic transfer switch (ATS) is a device that automatically transfers a power supply from its primary source to a backup source when it senses a failure or outage in the primary source., +https://brickschema.org/schema/Brick#Automation_Group,"A collection of equipment, points, and other automation groups that are logically grouped together for the purpose of management, control, or organization within a building automation system. We encourage that you develop your own sub-classes of Automation_Group to represent specific groupings relevant to your use case.", https://brickschema.org/schema/Brick#Availability_Status,"Indicates if a piece of equipment, system, or functionality is available for operation", https://brickschema.org/schema/Brick#Average_Cooling_Demand_Sensor,Measures the average power consumed by a cooling process as the amount of power consumed over some interval, https://brickschema.org/schema/Brick#Average_Exhaust_Air_Static_Pressure_Sensor,The computed average static pressure of air in exhaust regions of an HVAC system over some period of time, diff --git a/bricksrc/recpatches.ttl b/bricksrc/recpatches.ttl index 0702285d..433d0100 100644 --- a/bricksrc/recpatches.ttl +++ b/bricksrc/recpatches.ttl @@ -1174,20 +1174,20 @@ brick:Switch_Room brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:DataServerRoom" ; brick:isReplacedBy rec:DataServerRoom ; . -brick:Collection - rdfs:subClassOf rec:Collection ; - sh:property [ - rdf:type sh:PropertyShape ; - sh:path rec:includes ; - sh:or ( - [ sh:class brick:Equipment ] - [ sh:class brick:Collection ] - ) ; - sh:minCount 1 ; - sh:name "includes" ; - sh:nodeKind sh:IRI ; - ] ; -. +#brick:Collection +# rdfs:subClassOf rec:Collection ; +# sh:property [ +# rdf:type sh:PropertyShape ; +# sh:path rec:includes ; +# sh:or ( +# [ sh:class brick:Equipment ] +# [ sh:class brick:Collection ] +# ) ; +# sh:minCount 1 ; +# sh:name "includes" ; +# sh:nodeKind sh:IRI ; +# ] ; +#. brick:Team_Room owl:deprecated "true"^^xsd:boolean ; brick:deprecatedInVersion "1.4.0" ; @@ -1581,7 +1581,7 @@ brick:ICT_Equipment sh:property [ a sh:PropertyShape ; sh:name "Standard"^^xsd:string ; sh:path rec:standard ] . -brick:Ethernet_Port sh:property +brick:Ethernet_Port sh:property [ a sh:PropertyShape ; sh:datatype xsd:float ; sh:description "The data rate of the port in Mib/s, i.e. mebibit (2^20 bit) per second."^^xsd:string ; @@ -1595,7 +1595,7 @@ brick:Ethernet_Port sh:property sh:name "PoE Type"^^xsd:string ; sh:path rec:poeType ] . -brick:Wireless_Access_Point sh:property [ +brick:Wireless_Access_Point sh:property [ a sh:PropertyShape ; sh:datatype xsd:string ; sh:in ( "WiFi4"^^xsd:string "WiFi5"^^xsd:string "WiFi6"^^xsd:string "WiFi6E"^^xsd:string "WiFi7"^^xsd:string ) ; @@ -1603,7 +1603,7 @@ brick:Wireless_Access_Point sh:property [ sh:name "Generation"^^xsd:string ; sh:path rec:generation ] . -brick:Sensor_Equipment sh:property +brick:Sensor_Equipment sh:property [ a sh:PropertyShape ; sh:datatype xsd:double ; sh:name "Battery Percentage"^^xsd:string ; @@ -1773,4 +1773,4 @@ rec:AudioVisualEquipment brick:deprecatedInVersion "1.4.0" ; brick:deprecationMitigationMessage "REC ICT classes are being phased out in favor of Brick classes. For a replacement, consider brick:Audio_Visual_Equipment" ; brick:isReplacedBy brick:Audio_Visual_Equipment ; -. \ No newline at end of file +. diff --git a/bricksrc/root_class_shapes.ttl b/bricksrc/root_class_shapes.ttl index f0b62a7c..b827b1ac 100644 --- a/bricksrc/root_class_shapes.ttl +++ b/bricksrc/root_class_shapes.ttl @@ -48,8 +48,11 @@ brick:Equipment a sh:NodeShape ; [ sh:class brick:EntityProperty ; sh:message "Instances of Equipment cannot be EntityProperties." ] ; sh:property [ sh:path brick:hasPart; - sh:class brick:Equipment; - sh:message "A piece of Equipment's parts should be always other Equipment." + sh:or ( + [ sh:class brick:Equipment ] + [ sh:class brick:Automation_Group ] + ) ; + sh:message "A piece of Equipment's parts should be always other Equipment or Collections" ]; sh:property [ sh:path brick:hasPoint ; From 444a0fd63b267ff92b78f5f4bc7054103ec3be25 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Thu, 18 Dec 2025 09:59:54 -0700 Subject: [PATCH 2/7] remove old rec def --- bricksrc/recpatches.ttl | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/bricksrc/recpatches.ttl b/bricksrc/recpatches.ttl index 433d0100..e0f876d8 100644 --- a/bricksrc/recpatches.ttl +++ b/bricksrc/recpatches.ttl @@ -1174,20 +1174,6 @@ brick:Switch_Room brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:DataServerRoom" ; brick:isReplacedBy rec:DataServerRoom ; . -#brick:Collection -# rdfs:subClassOf rec:Collection ; -# sh:property [ -# rdf:type sh:PropertyShape ; -# sh:path rec:includes ; -# sh:or ( -# [ sh:class brick:Equipment ] -# [ sh:class brick:Collection ] -# ) ; -# sh:minCount 1 ; -# sh:name "includes" ; -# sh:nodeKind sh:IRI ; -# ] ; -#. brick:Team_Room owl:deprecated "true"^^xsd:boolean ; brick:deprecatedInVersion "1.4.0" ; From a9ba9d91ca40c4524fcd35e596c4b6b647d73cd5 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Thu, 18 Dec 2025 10:00:00 -0700 Subject: [PATCH 3/7] fix message --- bricksrc/root_class_shapes.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bricksrc/root_class_shapes.ttl b/bricksrc/root_class_shapes.ttl index b827b1ac..9bbdafbb 100644 --- a/bricksrc/root_class_shapes.ttl +++ b/bricksrc/root_class_shapes.ttl @@ -52,7 +52,7 @@ brick:Equipment a sh:NodeShape ; [ sh:class brick:Equipment ] [ sh:class brick:Automation_Group ] ) ; - sh:message "A piece of Equipment's parts should be always other Equipment or Collections" + sh:message "A piece of Equipment's parts should be always other Equipment or Automation Groups" ]; sh:property [ sh:path brick:hasPoint ; From f2e34fb68d0d5d3821330291364a7dccf7af1f7e Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Thu, 18 Dec 2025 10:04:08 -0700 Subject: [PATCH 4/7] add automation group --- examples/collection/collection.ttl | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 examples/collection/collection.ttl diff --git a/examples/collection/collection.ttl b/examples/collection/collection.ttl new file mode 100644 index 00000000..976d7500 --- /dev/null +++ b/examples/collection/collection.ttl @@ -0,0 +1,37 @@ +@prefix brick: . +@prefix bldg: . +@prefix owl: . +@prefix rdf: . +@prefix mpo: . + + a owl:Ontology ; + owl:imports . + +# my custom class for frost detection group in my private ontology +mpo:FrostDetectionGroup a owl:Class ; + # Here, we did *not* define this as a subclass of brick:Automation_Group. + # For this reason, bldg:FrostDetection is explicitly typed as both. + # We can always subclass brick:Automation_Group if needed, and in that + # case we don't need the explicit rdf:type brick:Automation_Group below. + rdfs:label "Frost Detection Group" ; + rdfs:comment "An automation group that includes components for frost detection in an AHU." . + +bldg:Ahu a brick:AHU ; + brick:hasPart bldg:Hcl ; + brick:hasPart bldg:Fan ; + brick:hasPart bldg:FrostDetection . + +bldg:Hcl a brick:Heating_Coil . + +bldg:Fan a brick:Discharge_Fan . + +bldg:FrostDetection a brick:Automation_Group, mpo:FrostDetectionGroup ; + brick:hasPart bldg:FrostDetectionSensor ; + brick:hasPart bldg:FrostDetectionMonitoring . + +bldg:FrostDetectionSensor a brick:Sensor_Equipment ; + brick:hasPoint bldg:FrostDetected . + +bldg:FrostDetectionMonitoring a brick:Enable_Command . + +bldg:FrostDetected a brick:Frost_Sensor . From b20cf176435f36eadddbb3b0b16afb38659043d4 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Mon, 22 Dec 2025 17:49:15 -0800 Subject: [PATCH 5/7] define rdfs --- examples/collection/collection.ttl | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/collection/collection.ttl b/examples/collection/collection.ttl index 976d7500..7a514fcd 100644 --- a/examples/collection/collection.ttl +++ b/examples/collection/collection.ttl @@ -1,6 +1,7 @@ @prefix brick: . @prefix bldg: . @prefix owl: . +@prefix rdfs: . @prefix rdf: . @prefix mpo: . From f7f0db97f1aecd998623c3aec2492cf3e91c16b3 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Wed, 24 Dec 2025 10:58:18 -0800 Subject: [PATCH 6/7] Update examples/collection/collection.ttl Co-authored-by: Dogan Fennibay --- examples/collection/collection.ttl | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/collection/collection.ttl b/examples/collection/collection.ttl index 7a514fcd..75e732b1 100644 --- a/examples/collection/collection.ttl +++ b/examples/collection/collection.ttl @@ -3,6 +3,7 @@ @prefix owl: . @prefix rdfs: . @prefix rdf: . +@prefix rdfs: . @prefix mpo: . a owl:Ontology ; From c8f6b3d118993d28f8087dfedd294cd4944c347c Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Mon, 29 Dec 2025 19:12:07 -0800 Subject: [PATCH 7/7] fix other hasPart constraint --- bricksrc/equipment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bricksrc/equipment.py b/bricksrc/equipment.py index 544098e5..efd5a3ad 100644 --- a/bricksrc/equipment.py +++ b/bricksrc/equipment.py @@ -99,7 +99,7 @@ "HVAC_Equipment": { "tags": [TAG.HVAC, TAG.Equipment], "constraints": { - BRICK.hasPart: [BRICK.HVAC_Equipment, BRICK.Valve], + BRICK.hasPart: [BRICK.HVAC_Equipment, BRICK.Valve, BRICK.Automation_Group], BRICK.feeds: [BRICK.HVAC_Equipment, BRICK.Valve, REC.Space], }, },