Read Objects and Properties from BACnet interface

1.4k views Asked by At

I am trying to read Objects and Properties from BACnet interface. We are using example code of BACnet4J where our client code is expected to communicate with BACnet interface provided by LumInsight Desktop(Propriety Software).

So, in our case the device discovery is complete but we are stuck in how to read Device level and Object level information from BACnet interface.

Here is the output I am getting currently:

SLF4J: Failed to load class

"org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. initialized Printing address...Address [networkNumber=0, macAddress=[a,2c,37,5,ba,c0]] RemoteDevice(instanceNumber=10001, address=Address [networkNumber=0, macAddress=[a,2c,37,5,ba,c0]]) ObjectIdentifier:Device 10001 getName:LumInsight Virtual Router getModelName:LIBI-01 Remote Device:RemoteDevice(instanceNumber=10001, address=Address [networkNumber=0, macAddress=[a,2c,37,5,ba,c0]]) User data: analog input:Analog Input 12 Analog Input 12 com.serotonin.bacnet4j.exception.PropertyValueException

Please find attached source code for your reference.

ObjectIdentifier ai3 = new ObjectIdentifier(ObjectType.analogInput,12);
            System.out.println("analog input:"+ai3);
            List<ObjectIdentifier> oids = new ArrayList<ObjectIdentifier>();
            oids.add(ai3);
           System.out.println(ai3);
            for (int i = 0; i < 10; i++) {
                PropertyValues pvs = RequestUtils.readOidPresentValues(localDevice1, d1, oids, null);
               // System.out.println(pvs);
                //System.out.println(pvs.get(ai3, PropertyIdentifier.presentValue));
                System.out.println(pvs.get(ai3, PropertyIdentifier.presentValue));
                Thread.sleep(5000);
            }
2

There are 2 answers

0
DennisVM-D2i On

I can't give a direct hand, but I would advise that you consider trying your test-case with the VTS (advanced & free) graphical tool too, for the benefit of contrast / matching one success with a failure to hopefully get you to having two successes / the success for your intended test case that little bit sooner.

There's also YABE that is a great tool.

(And Wireshark is good if you want to see the BACnet datagrams/network communication that is flying in & out of your machine; another tool good to consider as part of your diagnostic efforts.)

0
Anand Shrestha On

Please include a valid logging backend for slf4j (Simple logging facade for java) in your class path You will find the library here After extracting downloaded file you can include sl4j-api-(version).jar and sl4j-simple-(version).jar Sorry for late reply.