• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. jeremie
    3. Posts

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 15
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by jeremie

    • COV for Analog Input

      Hi,

      In BACNet4J, COV is not allowed for Analog Input, whereas it should.
      I think we have to add :

             
          static {
              supportedObjectTypes.add(ObjectType.accessDoor);
      ...
              **supportedObjectTypes.add(ObjectType.analogInput);**
              
              supportedPropertyIdentifiers.add(PropertyIdentifier.presentValue);
      ...
          }
      
      
      

      in com.serotonin.bacnet4j.obj.ObjectCovSubscription class.

      Regards,

      Jérémie

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: COV for Analog Input

      Hi,

      In BACNet4J, COV is not allowed for Analog Input, whereas it should.
      I think we have to add :

             
          static {
              supportedObjectTypes.add(ObjectType.accessDoor);
      ...
              **supportedObjectTypes.add(ObjectType.analogInput);**
              
              supportedPropertyIdentifiers.add(PropertyIdentifier.presentValue);
      ...
          }
      
      
      

      in com.serotonin.bacnet4j.obj.ObjectCovSubscription class.

      Regards,

      Jérémie

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Help for bacnet and bacnet4J

      Thank for your SimpleSubscriptionClient test file :)
      Maybe you can add the unsubscribe code (because COV is done with an indefinite lifetime) :

      
      localDevice.send(d, new SubscribeCOVRequest(new UnsignedInteger(0), oid, null, null));
      
      
      posted in BACnet4J general discussion
      J
      jeremie
    • Remote devices of a local device

      Hi Matthew!,

      Playing with services, I have discovered a potential none expected behaviour, with the list of remote devices of a local device.

      First, this list can contain remotes devices doubles.
      For example, try this :

      
      localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));                        
      localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));
      for (RemoteDevice d : localDevice.getRemoteDevices()) {
            System.out.println("Device found : " + d);
      }
      
      

      Moreover, I do not think it is normal to always have the full remote devices list available, after a call of WhoHasRequest method :

      
      localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));
      localDevice.sendBroadcast(0xBAC0,new WhoHasRequest(null, new ObjectIdentifier(ObjectType.binaryInput, 4097)));
      
      for (RemoteDevice d : localDevice.getRemoteDevices()) {
            System.out.println("Device found : " + d);
      }
      
      

      In conclusion, we always add remote devices in the list.
      Therefore, can we imagine to add code for cleaning the remote devices list, before each call of WhoIsRequest, WhoHasRequest, etc. ?

      Thank you in advance!

      Jérémie

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Remote devices of a local device

      Hi Matthew!,

      Playing with services, I have discovered a potential none expected behaviour, with the list of remote devices of a local device.

      First, this list can contain remotes devices doubles.
      For example, try this :

      
      localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));                        
      localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));
      for (RemoteDevice d : localDevice.getRemoteDevices()) {
            System.out.println("Device found : " + d);
      }
      
      

      Moreover, I do not think it is normal to always have the full remote devices list available, after a call of WhoHasRequest method :

      
      localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));
      localDevice.sendBroadcast(0xBAC0,new WhoHasRequest(null, new ObjectIdentifier(ObjectType.binaryInput, 4097)));
      
      for (RemoteDevice d : localDevice.getRemoteDevices()) {
            System.out.println("Device found : " + d);
      }
      
      

      In conclusion, we always add remote devices in the list.
      Therefore, can we imagine to add code for cleaning the remote devices list, before each call of WhoIsRequest, WhoHasRequest, etc. ?

      Thank you in advance!

      Jérémie

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Help for bacnet and bacnet4J

      Hi,

      I think I have an idea what Ilyass tries to mean :

      when he uses COV on an object with a lifetime greater than 0, he receives correcty events when the PresentValue of the COVing object changes.

      But when he tries with a lifetime equals to 0 (no timeout for COV subscription), he catchs only one time the COV event.

      For information, in Mango, the point COVing mechanism is configure with a lifetime greather than 0 : you use COV for a certain time, and when this time is finished, you COV again. Have you got a reason to do this, instead of use a lifetime of 0?

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Exception reading the properties of an AccessDoor Bacnet Object

      I will :)

      In BACNet, reliability property for AccessDoor Object is always required.
      Therefore, I think the declaration is uncorrect in the ObjectProperties.java file (com.serotonin.bacnet4j.obj package) :

      add(ObjectType.accessDoor, PropertyIdentifier.reliability, Reliability.class, false, **false**, null);
      

      =>

      add(ObjectType.accessDoor, PropertyIdentifier.reliability, Reliability.class, false, **true**, null);
      
      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Exception reading the properties of an AccessDoor Bacnet Object

      Many thanks for your help Matthew!

      For your information, I have got an OpenSource BACNET Server for Linux (C/C++), embedded in a proprietary equipment.

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Exception reading the properties of an AccessDoor Bacnet Object

      Hi Matthew :)

      During the last call to the parseServiceDate() function (before the exception appears), serviceData has this value :

      [c,7,80,30,0,1e,29,4b,4e,c4,7,80,30,0,4f,29,4d,4e,75,c,0,4f,54,45,53,20,44,4f,
      4f,52,20,31,4f,29,4f,4e,91,1e,4f,29,55,4e,91,0,4f,29,6f,4e,82,4,0,4f,29,24,4e,
      91,0,4f,29,67,4e,91,0,4f,29,51,4e,10,4f,29,57,4e,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,4f,29,68,4e,91,0,4f,29,e7,4e,91,0,4f,29,e9,4e,91,0,4f,29,eb,4e,91,2,4f,29,
      e6,4e,1e,4f,29,e3,4e,64,4f,29,e5,4e,7,8,4f,29,1c,4e,75,c,0,4f,54,45,53,20,44,
      4f,4f,52,20,31,4f,29,e2,4e,91,0,4f,29,e4,4e,c4,1,0,20,0,4f,29,e8,4e,0,4f,29,ea,
      5e,91,2,91,20,5f,1f]

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Exception reading the properties of an AccessDoor Bacnet Object

      Not sure it helps... :

      Below the stack trace of the exception :

      Exception in thread "main" com.serotonin.bacnet4j.exception.BACnetErrorException: Property: Missing required parameter
      	at com.serotonin.bacnet4j.type.Encodable.popEnd(Encodable.java:157)
      	at com.serotonin.bacnet4j.type.Encodable.readWrapped(Encodable.java:388)
      	at com.serotonin.bacnet4j.type.Encodable.readEncodable(Encodable.java:349)
      	at com.serotonin.bacnet4j.type.constructed.ReadAccessResult$Result.<init>(ReadAccessResult.java:126)
      	at sun.reflect.GeneratedConstructorAccessor4.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:191)
      	at com.serotonin.bacnet4j.type.constructed.SequenceOf.<init>(SequenceOf.java:66)
      	at com.serotonin.bacnet4j.type.Encodable.readSequenceOf(Encodable.java:262)
      	at com.serotonin.bacnet4j.type.Encodable.readOptionalSequenceOf(Encodable.java:296)
      	at com.serotonin.bacnet4j.type.constructed.ReadAccessResult.<init>(ReadAccessResult.java:64)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:191)
      	at com.serotonin.bacnet4j.type.constructed.SequenceOf.<init>(SequenceOf.java:54)
      	at com.serotonin.bacnet4j.type.Encodable.readSequenceOf(Encodable.java:251)
      	at com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyMultipleAck.<init>(ReadPropertyMultipleAck.java:50)
      	at com.serotonin.bacnet4j.service.acknowledgement.AcknowledgementService.createAcknowledgementService(AcknowledgementService.java:48)
      	at com.serotonin.bacnet4j.apdu.ComplexACK.parseServiceData(ComplexACK.java:189)
      	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.waitForAck(IpMessageControl.java:696)
      	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.send(IpMessageControl.java:292)
      	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.send(IpMessageControl.java:236)
      	at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:430)
      	at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:420)
      	at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:413)
      	at com.serotonin.bacnet4j.LocalDevice.readProperties(LocalDevice.java:869)
      	at com.serotonin.bacnet4j.test.TestARD.main(TestARD.java:139)
      

      And here the serviceRequest object who causes this exception :

      image

      If it is not enough, can you say me what function/parameters to survey in the source code? Thank you :)

      posted in BACnet4J general discussion
      J
      jeremie
    • Exception reading the properties of an AccessDoor Bacnet Object

      Hi all,

      I read succesfully bacnet objects from different type, except one type : "Access Door".

      Here the code :

      
      				localDevice.getExtendedDeviceInformation(M2MHubDevice);
        				List<ObjectIdentifier> oids = ((SequenceOf<ObjectIdentifier>)localDevice.sendReadPropertyAllowNull(M2MHubDevice, M2MHubDevice.getObjectIdentifier(), PropertyIdentifier.objectList)).getValues();
        				
        				PropertyReferences refs = new PropertyReferences();
        				  				
        				for (ObjectIdentifier oid : oids)  
                                      {             			
        						refs.add(oid, PropertyIdentifier.all);
              		        }
        				
        				System.out.println("Start read properties");
      
        				List<PropertyReferences> refsSmall = refs.getPropertiesPartitioned(1);
        				
        				System.out.println("number of property reference set =" + refsSmall.size() );
               			PropertyValues pvs = localDevice.readProperties(M2MHubDevice, refsSmall.get(0) );
        				
        				// now list devices in the object				
        				   							
        				ObjectIdentifier lastOid = null;
        				for( PropertyReferences ref: refsSmall ){	
        					pvs = localDevice.readProperties(M2MHubDevice, ref );  					
        					for (ObjectPropertyReference opr : pvs) {  						
        							if( lastOid == null || !lastOid.equals( opr.getObjectIdentifier() ) ) System.out.println( String.format("\t%s", opr.getObjectIdentifier()) );
               					lastOid = opr.getObjectIdentifier();         					
               					System.out.println(String.format("\t\t%s = %s", opr.getPropertyIdentifier().toString(), pvs.getNoErrorCheck(opr)));
        					}
        					System.out.println("==============");		         					
        					
        				}     		
      
      

      The exception is throwed from the Bacnet4J Encodable.java file - the concerned method is :

      protected static void popEnd(ByteQueue queue, int contextId) throws BACnetErrorException {
              if (readEnd(queue) != contextId)
              {
              	throw new BACnetErrorException(ErrorClass.property, ErrorCode.missingRequiredParameter);
              }
              queue.pop();
              if (contextId > 14)
                  queue.pop();
          }
      
      

      When the exception appears, the data are following :

      queue=[29,e5,4e,7,8,4f,29,1c,4e,75,c,0,4f,54,45,53,20,44,4f,4f,52,20,31,4f,29,e2,4e,91,0,4f,29,e4,4e,c4,1,0,20,0,4f,29,e8,4e,0,4f,29,ea,5e,91,2,91,20,5f,1f] - readEnd(queue)=-1 - contextId=4

      Thanks in advance for your help :)

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: Exception reading the properties of an AccessDoor Bacnet Object

      Hi all,

      I read succesfully bacnet objects from different type, except one type : "Access Door".

      Here the code :

      
      				localDevice.getExtendedDeviceInformation(M2MHubDevice);
        				List<ObjectIdentifier> oids = ((SequenceOf<ObjectIdentifier>)localDevice.sendReadPropertyAllowNull(M2MHubDevice, M2MHubDevice.getObjectIdentifier(), PropertyIdentifier.objectList)).getValues();
        				
        				PropertyReferences refs = new PropertyReferences();
        				  				
        				for (ObjectIdentifier oid : oids)  
                                      {             			
        						refs.add(oid, PropertyIdentifier.all);
              		        }
        				
        				System.out.println("Start read properties");
      
        				List<PropertyReferences> refsSmall = refs.getPropertiesPartitioned(1);
        				
        				System.out.println("number of property reference set =" + refsSmall.size() );
               			PropertyValues pvs = localDevice.readProperties(M2MHubDevice, refsSmall.get(0) );
        				
        				// now list devices in the object				
        				   							
        				ObjectIdentifier lastOid = null;
        				for( PropertyReferences ref: refsSmall ){	
        					pvs = localDevice.readProperties(M2MHubDevice, ref );  					
        					for (ObjectPropertyReference opr : pvs) {  						
        							if( lastOid == null || !lastOid.equals( opr.getObjectIdentifier() ) ) System.out.println( String.format("\t%s", opr.getObjectIdentifier()) );
               					lastOid = opr.getObjectIdentifier();         					
               					System.out.println(String.format("\t\t%s = %s", opr.getPropertyIdentifier().toString(), pvs.getNoErrorCheck(opr)));
        					}
        					System.out.println("==============");		         					
        					
        				}     		
      
      

      The exception is throwed from the Bacnet4J Encodable.java file - the concerned method is :

      protected static void popEnd(ByteQueue queue, int contextId) throws BACnetErrorException {
              if (readEnd(queue) != contextId)
              {
              	throw new BACnetErrorException(ErrorClass.property, ErrorCode.missingRequiredParameter);
              }
              queue.pop();
              if (contextId > 14)
                  queue.pop();
          }
      
      

      When the exception appears, the data are following :

      queue=[29,e5,4e,7,8,4f,29,1c,4e,75,c,0,4f,54,45,53,20,44,4f,4f,52,20,31,4f,29,e2,4e,91,0,4f,29,e4,4e,c4,1,0,20,0,4f,29,e8,4e,0,4f,29,ea,5e,91,2,91,20,5f,1f] - readEnd(queue)=-1 - contextId=4

      Thanks in advance for your help :)

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: PACS not implemented in BACnet4J?

      Wow, at least 3 years to approve :-/

      I pick up the date in this official document : http://www.bacnet.org/Bibliography/BACnet-Today-06/28889-Ritter.pdf

      Thank you for these precisions Matthew!

      posted in BACnet4J general discussion
      J
      jeremie
    • PACS not implemented in BACnet4J?

      Hi all,

      I am working on access control using BACNet (PACS objects).
      Apparently, PACS has been specified in 2006 november, and I am surprised that it is not implemented in BACnet4J yet (even apparently in others BACNet implementations - free or not).

      • Why PACS it is not yet implemented? (Missing time? Complexity? Nobody uses BACNet for access control?);

      • Therefore, how people, who want to use BACNet for access control, do actually? They use implemented BACNet objects like 'File' to encapsulate and transport access control data?

      Thanks in advance for your reply and your help! :)

      Jérémie

      posted in BACnet4J general discussion
      J
      jeremie
    • RE: PACS not implemented in BACnet4J?

      Hi all,

      I am working on access control using BACNet (PACS objects).
      Apparently, PACS has been specified in 2006 november, and I am surprised that it is not implemented in BACnet4J yet (even apparently in others BACNet implementations - free or not).

      • Why PACS it is not yet implemented? (Missing time? Complexity? Nobody uses BACNet for access control?);

      • Therefore, how people, who want to use BACNet for access control, do actually? They use implemented BACNet objects like 'File' to encapsulate and transport access control data?

      Thanks in advance for your reply and your help! :)

      Jérémie

      posted in BACnet4J general discussion
      J
      jeremie