Skip to main content
15-Moonstone
May 9, 2018
Question

Datachange event in the subscription doesnt work when the value is zero in the value stream.

  • May 9, 2018
  • 12 replies
  • 10260 views

Hello Team,

I have a subscription for a datachange of the property, and whenever there is a data change i am performing certain function and when the value is zero i have to perform certain function.

The data is getting updated by the remote thing and i have a value stream assigned to the thing.

I dont have an issue when the data changes, but when the data for the property is flowing 0 always. the data change event is not getting triggered and i am not able to perform the required action when the value is 0.

 

Can someone help me and let me know how can i write an event for which every time the data comes to the value stream weather it is changed or not, i have to rise an event and use the same event for subscription.

 

Thanks,

Sunay 

12 replies

22-Sapphire I
May 9, 2018

So the event fires based on the DataChange Setting

Value - Whenever the value changes

Always - Whenever the value is written (regardless if it is the same value)

Never - Never

On - Goes to True

Off - Goes to False

sbt15-MoonstoneAuthor
15-Moonstone
May 10, 2018

Hello PaiChung,

I have set the property datachange setting to "always" because of which i am able to log data to the value stream even though it is same.

But my problem lies in the subscription, where i have the option to set the event as Datachange for a property. But i don't have the option as always. Here if the data change happens, the subscription functionality is getting executed. If the value streaming is same then the subscription is not getting executed.

 

Thanks

Sunay

sbt15-MoonstoneAuthor
15-Moonstone
May 15, 2018

Hello PaiChung,

Do you have any thoughts on the this??? what could be the reason and how can we achieve it.

 

Thanks,

Sunay