• M
    MicheleMarcon

    Ok thanks, that solves most of my issues. But I noticed that on the old version the device was always discovered, but with this version, the device is discovered only if started while the client is running. I suspect that the old version did send getIAM periodically...

    Should I start a thread and send getIAM every 30 seconds or so?

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    Also: how does this snippet translates with the new API?

            obj.setProperty(PropertyIdentifier.objectName, new CharacterString("Mains status"));
            obj.setProperty(PropertyIdentifier.inactiveText, new CharacterString("Not present"));
            obj.setProperty(PropertyIdentifier.activeText, new CharacterString("Present"));
    

    Thanks

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    I solved by replacing writeProperty with writePropertyImpl which skips "using mixins"... no idea of what is it.

    Also I noticed that on the old version the device was always discovered, but with this version, the device is discovered only if started while the client is running. I suspect that the old version did send getIAM periodically...

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    Bacnet4j 4.x requires Java8, which I do not have, so I switched to Bacnet4j 3.x
    Is Bacnet4j 3.x still supported?

    Also I got

    com.serotonin.bacnet4j.exception.BACnetRuntimeException: com.serotonin.bacnet4j.exception.BACnetServiceException: class=Property, code=writeAccessDenied
            at com.serotonin.bacnet4j.obj.BACnetObject.writeProperty(BACnetObject.java:355)
            at com.ups.bacnet.Bacnet.run(Bacnet.java:619)
            at java.lang.Thread.run(Thread.java:748)
    Caused by: com.serotonin.bacnet4j.exception.BACnetServiceException: class=Property, code=writeAccessDenied
            at com.serotonin.bacnet4j.obj.mixin.CommandableMixin.writeProperty(CommandableMixin.java:132)
            at com.serotonin.bacnet4j.obj.BACnetObject.writeProperty(BACnetObject.java:430)
            at com.serotonin.bacnet4j.obj.BACnetObject.writeProperty(BACnetObject.java:352)
            ... 2 common frames omitted
    

    While doing

    AnalogValueObject avin1;
    avin1 = new AnalogValueObject(localDevice.getNextInstanceObjectNumber(ObjectType.analogInput),"Input voltage", 232, EngineeringUnits.volts, false);
    localDevice.addObject(avin1);
    avin1.writeProperty(PropertyIdentifier.presentValue, new Real(1));
    

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    I've changed the broadcast address but didn't help either... I've tried with wireshark and with the old version I see the bacnet packets

    0_1536138422760_bacnet.png

    With the new version I don't see anything.

    Is there some logging that I can enable to see if at least the "who-is" packet is received from the device?
    Thanks

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    Thanks, but still unable to make it work. I noticed that on the old version of the bacnet4j it was necessary to set the IP address of the client but this setting is no longer present.

    The support from Bacnet test tool is telling me that my device is not hearing the who-is message.

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    Thanks, I made past the compilation phase. But now my device isn't discovered on the network by the client... what is the meaning of

                    .withLocalBindAddress("0.0.0.0")
                    .withLocalNetworkNumber(20)
                    .withBroadcast(broadcast, 255)
    

    I assumed the first one was the ip address of the client (not sure why the code has 0.0.0.0, and have no idea on what to put on the second.
    Then I start with

            // Start the local device.
            localDevice.initialize();
            
            // Send an iam.
            localDevice.sendGlobalBroadcast(localDevice.getIAm());
    
            localDevice.sendGlobalBroadcast(new WhoIsRequest());

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    Thanks, this has been very helpful! But how do I translate this to the new API?

            localDevice.getConfiguration().setProperty(PropertyIdentifier.objectName,
                    new CharacterString("my device"));

    posted in BACnet4J general discussion read more
  • M
    MicheleMarcon

    Where can I see how to implement a Slave device with the updated library?

    posted in BACnet4J general discussion read more