Anyone can advise on this? I am still stuck in doing it. Best if someone can provide a sample on how to do it.
Regards,
WenJun
Anyone can advise on this? I am still stuck in doing it. Best if someone can provide a sample on how to do it.
Regards,
WenJun
Hi there,
I am kinda confuse on this and would be glad if someone can en-light me on this.
@Valter Henrique said:
@mlohbihler said:
I don't think so, but it's not hard. The only trick is that you need to know the instance id of the device.RemoteDevice rd = new RemoteDevice(...); localDevice.addRemoteDevice(rd); // This may not actually be necessary localDevice.send(rd, myRequest);
Where "myRequest" is, say, a read property with pid of objectList. If your setting are correct, you should get the object list of the remote device.
I found the id of my device, it's 101, but I have some doubts about it :
public static void main(String[] args) throws Exception { // How to initialize the LocalDevice ? LocalDevice ld = new LocalDevice (???); // let's say my ip is : 1.2.3.4, is this correct ? RemoteDevice rd = new RemoteDevice(101, new Address(new byte[] { (byte) 1, (byte) 2, 3, (byte) 4 }, 47808), null); ld.addRemoteDevice(rd); // now I have the remote device, in the localDevice, now I should be able to use the method 'getObjectList()' ? // how to use this 'myRequest' (I don't understand what you said about it ) ? localDevice.send(rd, myRequest); ... }
Hi mlohbihler ,
Can u give an example of how u instantiate myRequest?
Regards,
WenJun
@Valter Henrique said:
Get the information from your point then verify if match with what you understand the is 'on fire' then send your message to the client software.
Hi Valter,
Thank you for your reply. Do u have a sample .java which i can take a look on how it worked?
Thanks,
WenJun
Hi there,
As mention above can someone explain how to to archieve via BACNET4J?
THanks,
WenJun
Hi there,
As mention above can someone explain how to to archieve via BACNET4J?
THanks,
WenJun
Hi there,
I am building a Servlet that will be connecting to many BACnet Controller. I want to know if there is anyway that i can identify which BACnet Object is under which BACnet Controller and how can i go about doing it?
Thanks.
WenJun
Hi there,
I am building a Servlet that will be connecting to many BACnet Controller. I want to know if there is anyway that i can identify which BACnet Object is under which BACnet Controller and how can i go about doing it?
Thanks.
WenJun
Hi there,
I am currently working on BACnet4J and is able to retrieve data SlaveDeviceTest.java into a JSP via Servlet. Next thing i would to know is how or is there any example on how BACnet Change Of Value (COV) work in BACnet4J.
Anyone care to enlight me on that.
Regards,
WenJun
Hi there,
I am currently working on BACnet4J and is able to retrieve data SlaveDeviceTest.java into a JSP via Servlet. Next thing i would to know is how or is there any example on how BACnet Change Of Value (COV) work in BACnet4J.
Anyone care to enlight me on that.
Regards,
WenJun
Hi mlohbihler,
Maybe if u r interested i can send u my web project for u to take a look?
Regards,
WenJun
@mlohbihler said:
If you're using the most recent source, then that code would be looking for org.apache.commons.lang3.ObjectUtils instead of the serotonin version. Make sure you have the latest, and then ensure that both seroUtils.jar and commons-lang3-3.0.jar are in your classpath.
Hi mlohbihler,
Can u tell me where i can get the commons-lang3-3.0.jar?
Regards,
WenJun
Attachment: download link
@mlohbihler said:
Make sure you are using the most recent bacnet4J.jar too.
Hi mlohbihler,
Thank you for your reply. I actually imported the whole bacnet4j/src downloaded from your side instead of adding bacnet4j.jar as a classpath.
Will that cause any error?
Regards,
WenJun
@mlohbihler said:
You need to include seroUtils.jar in your class path.
Hi mlohbihler,
I have already included it in the class path. Any advice? Previously I try to build it around a Java Swing and was successful but when i try it out in a Servlet, it return me the above mention error.
Regards,
WenJun
Hi there, i am trying to set up a servlet(ReadAllAvailableProperties.java) to communicated with BACnet devices(SlaveDeviceTests.java). But all i get is the following error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: Servlet execution threw an exception
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:532)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:440)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.NoClassDefFoundError: com/serotonin/util/ObjectUtils
com.serotonin.bacnet4j.obj.BACnetObject.setPropertyImpl(BACnetObject.java:264)
com.serotonin.bacnet4j.obj.BACnetObject.setProperty(BACnetObject.java:188)
com.serotonin.bacnet4j.obj.BACnetObject.<init>(BACnetObject.java:81)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:154)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:142)
com.serotonin.bacnet4j.test.ReadAllAvailableProperties.<init>(ReadAllAvailableProperties.java:72)
com.gelement.bacnet.servlet.ReadAllAvailablePropertiesRequestServlet.doGet(ReadAllAvailablePropertiesRequestServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: com.serotonin.util.ObjectUtils
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
com.serotonin.bacnet4j.obj.BACnetObject.setPropertyImpl(BACnetObject.java:264)
com.serotonin.bacnet4j.obj.BACnetObject.setProperty(BACnetObject.java:188)
com.serotonin.bacnet4j.obj.BACnetObject.<init>(BACnetObject.java:81)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:154)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:142)
com.serotonin.bacnet4j.test.ReadAllAvailableProperties.<init>(ReadAllAvailableProperties.java:72)
com.gelement.bacnet.servlet.ReadAllAvailablePropertiesRequestServlet.doGet(ReadAllAvailablePropertiesRequestServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
Anyone have any idea on this? I am @ a loss. :(
EDIT: Manage to fix the problem by right click on the warning message on seroUtils.jar then click on Quick Fix -> Mark the associated raw classpath entry as publish/export dependency.
Hi there, i am trying to set up a servlet(ReadAllAvailableProperties.java) to communicated with BACnet devices(SlaveDeviceTests.java). But all i get is the following error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: Servlet execution threw an exception
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:532)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:440)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.NoClassDefFoundError: com/serotonin/util/ObjectUtils
com.serotonin.bacnet4j.obj.BACnetObject.setPropertyImpl(BACnetObject.java:264)
com.serotonin.bacnet4j.obj.BACnetObject.setProperty(BACnetObject.java:188)
com.serotonin.bacnet4j.obj.BACnetObject.<init>(BACnetObject.java:81)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:154)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:142)
com.serotonin.bacnet4j.test.ReadAllAvailableProperties.<init>(ReadAllAvailableProperties.java:72)
com.gelement.bacnet.servlet.ReadAllAvailablePropertiesRequestServlet.doGet(ReadAllAvailablePropertiesRequestServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: com.serotonin.util.ObjectUtils
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
com.serotonin.bacnet4j.obj.BACnetObject.setPropertyImpl(BACnetObject.java:264)
com.serotonin.bacnet4j.obj.BACnetObject.setProperty(BACnetObject.java:188)
com.serotonin.bacnet4j.obj.BACnetObject.<init>(BACnetObject.java:81)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:154)
com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:142)
com.serotonin.bacnet4j.test.ReadAllAvailableProperties.<init>(ReadAllAvailableProperties.java:72)
com.gelement.bacnet.servlet.ReadAllAvailablePropertiesRequestServlet.doGet(ReadAllAvailablePropertiesRequestServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
Anyone have any idea on this? I am @ a loss. :(
EDIT: Manage to fix the problem by right click on the warning message on seroUtils.jar then click on Quick Fix -> Mark the associated raw classpath entry as publish/export dependency.
hi there, i am currently working on a way to retrieve information from a bacnet object if there are changes. Can anyone guide me on how this can be done or is there any sample for me to understand it?
Thanks in advance! :)
Hi guys, i manage to set up the stuff but when I try to run the DiscoveryTest.java (with SlaveDeviceTest.java running) an error below show up in the console:
Exception in thread "main" java.net.BindException: Address already in use: Cannot bind
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.PlainDatagramSocketImpl.bind(Unknown Source)
at java.net.DatagramSocket.bind(Unknown Source)
at java.net.DatagramSocket.<init>(Unknown Source)
at java.net.DatagramSocket.<init>(Unknown Source)
at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.initialize(IpMessageControl.java:156)
at com.serotonin.bacnet4j.LocalDevice.initialize(LocalDevice.java:211)
at com.serotonin.bacnet4j.test.DiscoveryTest.main(DiscoveryTest.java:48
Anyone can advice on this?
Hi there, i am sorry for asking such a question but i couldn't find any form of guide or tutorial on how i can use BACnet4J. I have try to creat a Java project in eclipse and and imported your bacnet4J-src.zip in the src folder and also the seroUtils.jar. But when i try to run the DiscoveryTest.java and SlaveDeviceTest.java, Nothing was being output on the console.
Btw, i am trying to figure up how to setup mock bacnet devices and a bacnet client to detect this devices all on the same machine.
Hi there, i am sorry for asking such a question but i couldn't find any form of guide or tutorial on how i can use BACnet4J. I have try to creat a Java project in eclipse and and imported your bacnet4J-src.zip in the src folder and also the seroUtils.jar. But when i try to run the DiscoveryTest.java and SlaveDeviceTest.java, Nothing was being output on the console.
Btw, i am trying to figure up how to setup mock bacnet devices and a bacnet client to detect this devices all on the same machine.