Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: BACnet support for events #379

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fennibay
Copy link
Contributor

@fennibay fennibay commented Jul 30, 2024

Bring support for BACnet Events (used interchangeably with Alarms) to WoT BACnet Protocol Binding.

My general approach in this PR is to allow WoT Consumers to interact with EventAffordances in a certain way. I didn't try to cover all features and options of BACnet. I find it better to start simple and add features as they become necessary.

This PR bases on #377, so that one should be merged first.

Preview of rendered doc: https://deploy-preview-379--wot-binding-templates.netlify.app/bindings/protocols/bacnet/index.html#event-mappings

@fennibay fennibay requested a review from egekorkan July 30, 2024 13:23
Copy link

netlify bot commented Jul 30, 2024

Deploy Preview for wot-binding-templates ready!

Name Link
🔨 Latest commit 14e3c7f
🔍 Latest deploy log https://app.netlify.com/sites/wot-binding-templates/deploys/66c35ff9519d700008e8865f
😎 Deploy Preview https://deploy-preview-379--wot-binding-templates.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@egekorkan egekorkan added enhancement bacnet related to bacnet protocol binding labels Jul 30, 2024
@egekorkan
Copy link
Contributor

https://deploy-preview-379--wot-binding-templates.netlify.app/bindings/protocols/bacnet/index.html#event-mappings can be used for seeing the rendered version

"moreEvents": false
}
</pre>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback @egekorkan -> add a real-life scenario, e.g. about an AHU, here

</td>
</tr>
<tr>
<td>AcknowledgeEvent: ActionAffordance.input</td>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback @egekorkan -> indicate that this is separate from the low-level acknowledge (confirmation)

Copy link
Member

@ektrah ektrah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good to me, although I haven't checked all the details in the new tables.

However, I think a few more points should be added to make this work within the conceptual framework of WoT. In general, WoT tries to abstract away from the exact protocols used; for a TD consumer, it should not matter whether they use BACnet or another underlying protocol; the drivers take care of the protocol-specific details.

This PR essentially defines a layer above the BACnet Protocol Binding that allows BACnet alarms to be distributed to TD consumers and for them to acknowledge these alarms. While I am not against the BACnet Protocol Binding and this higher layer being specified in the same document, they should be clearly separated and decoupled. Even though the higher layer will usually be used with the BACnet Protocol Binding, it could in principle also be used with the MQTT Protocol Binding, for example.

Let's say a TD consumer sees an event in a TD and it does not look at the contained form(s):

  • How does the consumer recognize that this event delivers BACnet events?
    • Should the consumer have the specified data schema hard-coded and compare it to the data schema in the TD, and if they are (almost?) identical, then it's BACnet events?
  • How does the consumer recognize that it can/must acknowledge these events?
  • How does the consumer know which action to use for confirmation?
    • Should the consumer have the identifier of the action hard-coded?

Let's say I'm implementing a WoT/BACnet driver:

  • How does the driver know which BACnet protocol element goes into which key-value pair in the JSON data schema? Is this purely based on the key names?
  • I suppose the data schema might evolve with future revisions of the document. What should a driver do if there are newly specified key-value pairs in the data schema that it doesn't yet know about, or if pairs that are currently specified are missing?

Nit:

  • You wrote that the terms "BACnet Event" and "BACnet Alarm" can be used interchangeably. I would suggest using "BACnet Alarm" throughout the document to avoid any confusion with WoT events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bacnet related to bacnet protocol binding enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants