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
Support for BACnet server functionality #12
Comments
Hey @amrnablus, Inspired by your inquiry I made a small test and managed to get it running. See code below.
Below is a proof it actually works as designed: Enjoy! |
Thanks @splatch, that's pretty much what i did, the tricky part was accepting writes from YABE to my backend server, i ended up with something like this:
My adapter gets triggered whenever there is a change on the properties. That said, if you plan on wrapping the server code let me know, i might be able to contribute to that. |
Thanks for feedback and contribution proposal. Having server functionality is definitely interesting, but currently not yet in roadmap, if you don't mind I will mark issue as feature request. In some undefined future I hope to port this facade to rely on BACnet support provided by Apache PLC4X project. It has Apache license by default, uses netty and NIO making at least java part closer to usual routine. It is also a bit more complex in some areas as it does more things than just a building automation. Currently Apache PLC4X offers support for "passive" mode - meaning replaying PCAPs with bacnet traffic, but I made my first experiments with live connection which prove that library, witch some glitches, is working. Obviously it is fresh and lacks many of bacnet4j features such as segmentation, server side handling, but it also has certain advantages coming from young codebase. Here is abstract notation of protocol frames (messages): And here is brief logic of passive handling of protocol (notice this is available in develop/snapshot version): Please feel yourself invited to plc4x community! |
Interesting, if i may suggest, why not create a generic wrapper with backend options being bacnet4j or plc4x (kinda like JPA but for bacnet). Either way i'll keep an eye on the work here and i'll be happy to help. |
What you propose is really neat idea. I actually did a brief attempt two years ago with d28e838 commit (2.0.x branch). Overall idea was to bring ASLv2 API and use BACnet4J as an implementation detail. |
Yep, that looks exactly like what i have in mind, we can start by writing a generic interface which later a facade can be written for each provider in order to have it be "JBA (Java Bacnet API)?" compatible |
JBA sounds awesome. I like it a lot because it will not confuse people who come from Niagara/Tridium and know what their BAJA shortcut stands for (Building Automation Java Architecture). |
Hey @baardl, would you be interested in such functionality for your experiments? This will allow to make a bridge between your lab devices and rest of existing |
Yes, @splatch 😀 |
Hello, I am also implementing a bacnet server. I am wondering what these values do :
Thank you for any help |
I can't remember exactly why these values got in. Timeout is in ms (I suppose), its mostly there for debugging purposes because transport thread/threads are being used to dispatch events to callbacks you implement. Segmentation timeout is probably in seconds and its extra long for that reason too. You should be fine without these values or reverted to reasonable levels. The plc4x work is a bit forward from where it was, however its still not even close to bacnet4j. Later one is full blown sdk, whereas plc4x is still at the library level for bacnet. If you look closer at plc4x sources, there is updated code which answers for bacnet whois requests, but not much more than that. Also, there is very little structuring behind (i.e. |
Thank you for the very quick response I'll use default values for my testing. |
Hello and thanks for your great work,
I was wondering if you have any example of building a bacnet server with writable properties.
Thanks
The text was updated successfully, but these errors were encountered: