2 Replies Latest reply on Mar 23, 2017 5:40 AM by jdurand RSS
    jdurand Explorer

    Issue with AddDynamicSubscription



    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"