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.
Unsolved Bacnet4j: problem with unsubscribe
-
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 ?