-
Notifications
You must be signed in to change notification settings - Fork 98
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
How to handle events coming from a notification object? #75
Comments
Hi @cemremengu I've just started recently to tackle the whole alarming and eventing topic (see here), as I don't have too much experience with it. I'm not really sure, what BACNET service you mean with that, but I assume you either using var bacnet = require('bacstack');
const client = new bacnet();
client.on('eventNotify', (package) => {
console.log(`Received 'eventNotify' from device: ${package.address} - Payload:`);
console.log(eventData);
}); Let me know if this helps. Cheers |
Sorry for the late reply, I was on holidays In order to be able to receive event notifications, I need to be able to assign a How to do this is not very obvious from documentation and code (at least for me). Could you please provide some assistance if possible? |
No worries, me too 😄
This doesn't really sounds like "BACNET eventing" at all, but more like you try to implement a BACNET device, wich supports the
There is currently no documentation for the service handling part of most functions (see https://github.com/fh1ch/node-bacstack#features), as there still marked as unstable. However, I've used those functions in one of my other projects (see https://github.com/fh1ch/node-bacstack-device/blob/master/index.js#L30), where I try to implement a BACNET device (server) in JavaScript. |
Yes, your assumption is correct. In order to receive event notifications, you need to register a device in automation server (controller). After that, you can select your device to receive events from a notification class. WhoIs/IAm is required at registration step for device discovery. |
@cemremengu Did you managed it? It would be awesome if you could share your code and also maybe check if it works with https://github.com/BiancoRoyal/node-bacstack (which is an updated fork of this library). We also started to provide some example scripts ... maybe we could add such an event notify receiver there as example? |
Unfortunately, it has been a long time and I no longer work with the project 😞 |
As the title says, if I setup a bacnet server and set the notification object in my controller to forward the messages to my server, how do I handle those events?
I searched but couldnt see anything in the docs or code. Is it possible?
The text was updated successfully, but these errors were encountered: