Hi there,
For a project in Java, I use the com.serotonin.bacnet4j library
I want to unsubscribe all activeCovSubscriptions during initialization.
For that, I first get the list of all activeCovSubscriptions and I loop on it to call the unsubcribe.
Get the list: (this part works)
final ReadPropertyRequest request = new ReadPropertyRequest(deviceObject, PropertyIdentifier.activeCovSubscriptions);
Unsubscribe:
final SubscribeCOVRequest cancellation = new SubscribeCOVRequest(new UnsignedInteger(subscriptionProcessIdentifier), monitoredObjectIdentifier, null, null);
try {
localDevice.getDevice().send(remoteDevice, cancellation, null);
} catch (final Exception e1) {
LOGGER.warn("Failed to find remote device to which to send unsubscribe", e1);
}
My problem occurs after resetting my docker container: it gets a new MAC address.
Then the unsubscribe doesn't work !
I guess that it's because of the MAC address which was used for the registration is not the same anymore (after the reset of container) when I want to unsubscribe.
Until now, I didn't find any method in bacnet4j where I can provide the MAC address.
Other question: Is there a method to force the deletion of all activeCovSubscriptions ?