Hello All,
I have a remote thing where I would like to trigger a subscription every time my isConnected property changes. However, when I subscribe to the data change of that property nothing happens because that property doesn't have any option selected for datachange. I am unable to add the datachange because it is a system data shape. Does anyone know of a way around this? Could I make some sort of timer that just does a check every 15 minutes? Thank you!
Solved! Go to Solution.
I just tested this and I see it firing when an EMS connects or disconnects.
Try a logger.warn(source + me.isConnected);
And check the script log to see if it is indeed firing upon connect or disconnect of the EMS.
I guess should also work for Federated Things.
Put the subscription on the Template. Any inheriting Templates will be able to carry a Subscription on DataChange for any of the inherited and/or defined properties.
The issue is that it wont trigger on the property. The isConnected property is inherited from the remote thing template and I can not change when the event for a datachange is fired on it. I have it on the thing template, I just cant drive any events with it changing.
I just tested this and I see it firing when an EMS connects or disconnects.
Try a logger.warn(source + me.isConnected);
And check the script log to see if it is indeed firing upon connect or disconnect of the EMS.
I guess should also work for Federated Things.
Thank you for the suggestion! I will give it a try and see if it works for me.
It works now. I guess I just needed to close out of everything. Thanks again for the help!