BrickSchema / Brick

Uniform metadata schema for buildings
http://brickschema.org/
BSD 3-Clause "New" or "Revised" License
293 stars 79 forks source link

RFC: Access control systems #379

Open jbkoh opened 2 years ago

jbkoh commented 2 years ago

(This is WIP. 90% done. I will add an example graph in a diagram with the proposed concepts below to finalize it. Happy to receive comments from the current status too.)

Access control system is one of the key concepts in building systems providing information about occupants movement as well as managing security policies in buildings.

Example systems:

Example use cases:

How to model?

Let's start with some floor plan with possible configuration.

example floor plan Assumptions

We can exemplify answers for the above use case.

Those observations bring several new concepts to be added. We need to model:

Each of the new concepts has their own challenges.

Door

Door is a new concept to Brick. Let's check how other ontologies model it.

Our requirements for doors are

I'm proposing those:

An example graph out of this

:door4 a brick:Door.
:opening4 a brick:Opening.
:entry4_1 a brick:Entry;
  brick:isPartOf brick:opening4;
  brick:isPartOf brikc:space3.
:entry4_2 a brick:Entry;
  brick:isPartOf brick:opening4;
  brick:isPartOf brikc:space2.

Access Control Zone

We need to model a collection of location that are accessible through an access control device. It's analogous to a VAV feeding air to an HVAC Zone which may consists of several spaces. The difference is that an access control device is controlling only an entry other than the entire set of spaces. Still, it'd make sense to group spaces as a single Access Control Zone other than letting users traverse associated spaces, which is hard to model anyway.

I'm proposing those:

:acz3 brick:hasPart :entry4_1.

:opening4 doesn't belong to any access control zones.



### Equipment
I propose those:
- `brick:Lock`: This is a part of a Door and can be controlled by a Relay.
    - `brick:ControllableLock` may be useful in case a user needs to model manual locks as well.
- `brick:Relay`: A electronic circuit switching the status of a device. It's analogous to VFDs for motor-based equipment. In case a lock is controlled by a relay, Lock hasPart Relay (again, analogous to Fan hasPart VFD)
- `brick:Access_Card_Reader`: A badge reader to activate the associated lock for permitted tenants. 
- `brick:Access_Control_Unit`: A virtual/physical unit dedicated to control an Entry, analogous to HVAC terminal units. Unlike boxed equipment like VAVs, access control units are often not a standalone single device, but rather some parts like a lock, a relay, a card reader, and a controller. Even in some cases, a controller controls locks and card readers for multiple doors. However, I do see a value of defining a standalone device for collecting those parts, especially for defining a relationship of those parts with actual entry (analogous to a VAV feeding a Zone.)
- `brick:controlsAccess` between an Access_Control_Unit and an Entry. I'm not tied to this specific wording but couldn't find a better one. This is analogous to feeds.

### Points
- `brick:Contact_Sensor`: Detect whether a door is closed or not.
- `brick:Relay_Command`: Controls a Relay controlling the Lock.
- `brick:Access_Activity_Status`: Logs tenants access to the Entry. Each activity contains a tenant and whether they were approved or not for the access.
gtfierro commented 2 years ago

Thanks for the detailed proposal! I will review over the next couple days, but I wonder if we can build on the BOT or REC ontology for many of the door-related components? I didn't see any justification for why we aren't using those models. I could also see the building topology you are modeling here as part of an extension to Brick, rather than part of the Brick core (at least for v1.3) -- what do you think?

jbkoh commented 2 years ago

Those other ontologies are described above, but let me clarify the reasoning here a bit more

jbkoh commented 2 years ago

I don't mind skipping this in 1.3.0 release, though I'd like to have an agreeable outcome out of this discussion. I think it should be a part of core Brick though. Access control systems are one of the common subsystems in buildings.

nikosandronikos commented 2 years ago

Great to see the addition of Relay equipment. These will also form a core part of lighting control systems and included in Lighting Zones. For example, in retro fits where the existing dumb luminaires are to be kept and controlled by newer hardware via Relay.

nlk-jan commented 2 years ago

Interesting stuff indeed. Just found out that this group exists.

My 2 cents: The concept of access control is to have two zones with different access levels. Access control is about managing the flow in both directions (which can be individually controlled). The side of the door as a concept is not necessary. The equipment is related to the space where it is located. The schema sample Door 2, has two sides: Space 1 and Space 2, Door 2:Space1, and Door 2: Space 2 are having the equipment needed. To be able to model the situation fully I would suggest starting from general Space 0 which is currently not displayed, but it is needed as it is the baseline.

epaulson commented 1 year ago

Getting back to this after a long summer and fall.

Just FYI, we already have a brick:Access_Reader - it was added in #121 though we didn't explicitly say 'access_card_reader' as the name, but 'control' is a tag. (The skos definition got dropped when we moved everything into the definitions.csv file, I'll fix that). I also left in the comments of equipment.py a placeholder for a brick:Access_Control_Panel which I think is what you mean by 'Access control unit'? (there's a bunch of other things in equipment.py as TODOs as well)

I assume brick:controlsAccess is not equipment but is a new relationship, which does seem like we're going to need.

I think I like brick:Access_Activity_Status, because we don't really have a good 'point' for any of these things but they're certainly going to be spewing out telemetry data (on MQTT streams or something else), but I could also be OK with a generic new relationship of 'telemetry data' that points at a ref:ExternalReference of some kind - something that we can hang off of anything even if it's not a traditional 'point', but that might be getting kind of radical.