Unsubscribe() does not work!

I have an app that uses device attribute subscriptions. In doing some troubleshooting today I found that the unsubscribe() command simply does not work.

From the documentation it should remove all subscriptions for that app, but in this case it does not remove any. I've tried it across multiple devices with the same result. If I delete the app, then the subscriptions are removed.

I've also tried using more specific forms of unsubscribe with various parameters but with no change in outcome.

What else can I do?

Post your code. Unsubscribe does work (for me).

1 Like

I think maybe I'm making a wrong assumption. I had assumed that these "In Use By" entries were indicative of subscriptions being present, but perhaps that is not the case?

If that is not the case is there a way to review what subscriptions are in place?

The code is simply
unsubscribe()

Correct unsubscribe only remove subscriptions for a particular app and it’s context.

Go into each app in your in use by section. At the top of each app click the gear to view the app status and there you will find the subscription list and what it’s subscribed to for a given device.

2 Likes

Thank you. So you have to do it from the POV of the subscriber, the the subscribed.

"In use by" actually has to do with device selections in an app, not subscriptions. You couldn't get a subscription in the first place without having selected a device, and not all device selections entail subscriptions. But a device selection does cause "In use by".

1 Like