bacpypes
bacpypes copied to clipboard
Implementing alarms
Hello,
I'm trying to implement bacnet alarms using bacpypes. Unfortunately I also lack context on what the proper implementation for alarms would be in bacnet itself, which is making the task rather difficult. Any help or further information pointers on this would be appreciated.
One of the main questions is whether I should be trying to use EventEnrollmentObject
or AlertEnrollmentObject
for the implementation. (Based on Alarm revision description (1) it does seem AlertEnrollmentObject
would be the newer one, but only used for alerts that do no accept acknowledgeing - are EventEnrollmentObject
then still to be used for alerts that do require an ack?)
Other questions include: Does the enrollment object need to have an associated bacnet object that is it an alert of, or can it be a freestanding alert? In an overview of bacnet alarms in a related alarm management document I found (2) it seems at least algorithmic alarms are connected to a property, but I'm not sure if this indicates whether this connection is just implied, or whether it has to be also indicated in the bacnet representation, or bacpypes.
I'm also having trouble seeing what level of concept the enrollment object itself represents - a collective point of potential alarms to happen, or a specific single alarm that has triggered? I would expect it to be a collective point through which alarm events trigger, but both AlertEnrollmentObject
and EventEnrollmentObject
also have a property eventState
which suggests it itself has a state instead of just collecting the alerts themselves. Also, if it does collect the alerts, how do I create the alerts themselves using bacpypes for the enrollment object?
Further, I'm not sure how I can confirm using Yabe whether the event object has been successfully created, or whether an alarm has been triggered. I have managed to create the enrollment objects with bacpypes without errors, but I do have have them displayed anywhere - perhaps I need to specifically attach them to the device somehow?
tl;dr How do I use bacpypes to create a potential alarm in bacnet, and then trigger and ack that alarm? What is the correct place in Yabe to confirm whether these are set up correctly?
References: (1) Isler, B., November 2011. "BACnet Alarming Revised" "BACnet Today" Supplement to ASHRAE Journal. Vol. 53, No. 11, p. B12-B17. http://www.bacnet.org/Bibliography/BACnet-Today-11/Isler-2011.pdf (2) ICONICS, Inc Application note October 2015 "BACnet - Alarm Management" https://tp.prosoft.ru/docs/shared/webdav_bizproc_history_get/130186/130186/
tl;dr I do not have an implementation in BACpypes for the Event Algorithms (Clause 13.3) or Fault Algorithms (Clause 13.4), the closest is the COV notifications (Clause 13.1). I can't answer your questions about Yabe, maybe other folks can.
It might help to scope out your project to a limited question; should this device support intrinsic reporting, algorithmic reporting, and/or alert reporting?
Intrinsic reporting is the simplest. Objects that support intrinsic reporting have all the properties they need within themselves to determine if they should be considered normal, off-normal, or fault-detected, along with a reference to a notification class that determines where notifications should go and if they need to be acknowledged (using a confirmed or unconfirmed service).
Algorithmic reporting (Event Enrollment Objects) are used when the objects themselves cannot report their condition themselves, but there is some other algorithm (indicated by the Event_Type property) that monitors an object and checks its condition, and that object may even be in some other device (for example, there could a device on an attached MS/TP network that has some simple objects but doesn't have the processing power to manage notifications so that functionality is associated with a supervisory controller).
Alert reporting is a way for a device to say "something interesting has happened or is happening and I'd like to tell you about it" but that something isn't covered by intrinsic or algorithmic reporting. I'm not aware of any instances of an Alert Enrollment Object, at least they haven't arrived on campus.
Does the enrollment object need to have an associated BACnet object that is it an alert of, or can it be a freestanding alert?
Yes, it must be associated with an object, the Object_Property_Reference property, Clause 12.12.8, is a required property.
...algorithmic alarms are connected to a property, but I'm not sure if this indicates whether this connection is just implied, or whether it has to be also indicated in the BACnet representation, or BACpypes.
There are a variety of algorithms, see Table 12-15. The only one with a single implicit parameter is Event_Type None which means it only checks the reliability, all of the others have multiple parameters where the parameter is mapped to a property. So in some sense the relationships are implied, but because all of the relationships are explicitly listed in the standard, is in indicated in BACnet and also in BACpypes.
...enrollment object itself represents - a collective point of potential alarms to happen, or a specific single alarm that has triggered?
It represents an instance of an algorithm, so if f(x) is the algorithm definition then the EEO g is a specific instance of f() that is associated with some object a, in Python that would be g = partial(f, a)
and g
is this happy little thing that runs all by itself.
... also have a property eventState which suggests it itself has a state instead of just collecting the alerts themselves.
Yes, the state of the object is essentially the state of the running algorithm, which may end up being be "broken" and might want to report that to someone. Note that it doesn't collect "alerts", that is up to the event notification recipient to manage, and BACnet doesn't make a judgment about which notifications should be considered "alarms" because that is typically up to the customer/site to decide if some condition needs to be acknowledged by a human.
The Event_Type parameter (eventType
in BACpypes), of type BACnetEventType (EventType
in BACpypes) is an enumeration that can be extended. So while the first 23 algorithms are defined, and the first 63 are reserved for ASHRAE, you can add your own enumeration value for your own algorithms. Other kinds of devices might not know what to do with the events that are generated, but they will be given a list of property/value pairs, so a good human user interface would at least be able to present some useful information, and relevant to your custom algorithm I presume!
Hello, Did you finish Alarm object implementation?
(sigh) no, it's still waiting for some time.
Hi, Did you finish the Alarm object implementation yet?