<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bacnet4j: problem with unsubscribe]]></title><description><![CDATA[<p dir="auto">Hi there,</p>
<p dir="auto">For a project in Java, I use the <em>com.serotonin.bacnet4j</em> library</p>
<p dir="auto">I want to unsubscribe all <em>activeCovSubscriptions</em> during initialization.<br />
For that, I first get the list of all <em>activeCovSubscriptions</em> and I loop on it to call the unsubcribe.</p>
<p dir="auto">Get the list: (this part works)</p>
<pre><code>final ReadPropertyRequest request = new ReadPropertyRequest(deviceObject, PropertyIdentifier.activeCovSubscriptions);
</code></pre>
<p dir="auto">Unsubscribe:</p>
<pre><code>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);
}
</code></pre>
<p dir="auto">My problem occurs after resetting my docker container: it gets a new MAC address.</p>
<p dir="auto"><strong>Then the unsubscribe doesn't work !</strong><br />
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.</p>
<p dir="auto">Until now, I didn't find any method in bacnet4j where I can provide the MAC address.</p>
<p dir="auto">Other question: Is there a method to force the deletion of all <em>activeCovSubscriptions</em> ?</p>
]]></description><link>https://forum.mango-os.com/topic/5944/bacnet4j-problem-with-unsubscribe</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 04:25:49 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/5944.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Feb 2025 10:07:04 GMT</pubDate><ttl>60</ttl></channel></rss>