Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi,
I didn't find any relevant informations on the community so I open a new question.
I need to add subscriptions programatically on a thing so I tried to use AddDynamicSubscription like this :
var params = {
propertyName: undefined /* STRING */,
thingName: [Thing 1] /* THINGNAME */,
eventName: "AnyDataChange" /* STRING */,
serviceName: [Process Name on Thing 2] /* STRING */
};
Things[Thing 2].AddDynamicSubscription(params);
When I execute this service it returns no error but the newly created subscription does not appear in the subscription panel of Thing 2 so I tried to execute EnableSubscription but it returns me an error : "There is no subscription for Thing1:AnyDataChange".
And when I try to run AddDynamicSubscription again it says me : "There is already a subscription for Thing1:AnyDataChange"
Hi, plaese understand that subscriptions added by AddDynamicSubscription are in-memory only, so they will not show up in composer at all
NOTE: If a Thing is edited or server is restarted then these Dynamic Subscription will be gone.
Ok, so how can I add static subscriptions or make dynamic sub. persistent ?
I tried to look the API but did not find relevant informations.