Skip to main content
16-Pearl
June 19, 2020
Solved

CSDK - How to force a value push that does not violate the threshold?

  • June 19, 2020
  • 1 reply
  • 1819 views

Hi everyone,

 

I'm using the CSDK with DEADBAND thresholds to reduce the number of property updates.

This is for saving mobile bandwidth while still having a reasonable resolution when values change.

 

However, for the values there are certain fixed values which should always be pushed. At the moment they are not, as they fall within the active deadband. For example:

 

Property: litres of water in a tank

Threshold value: 20

 

This will push ONLY if the value changes by more than 20.

If the tank is at 30 litres and the new measurement records a change of -23 litres, the updated value will be 7.

With this, the tank level can not be determined to be empty or not.

 

So the idea is now to force a push, once the value hits a certain fixed number, in this case 0 litres (or for filling up, the max capacity), even if that change does not violate the threshold.

 

Is there a way to implement this without dropping or changing the threshold?

 

Thanks and Regards,

Michael

Best answer by slangley

Hi @mneumann.

 

Have you considered using events as an alternative?  You could implement custom logic to check the property value on the edge side for firing an event based on the value. The event would just be a trigger to possibly fire off an email from the ThingWorx side.

 

Regards.

 

--Sharon

1 reply

slangleyCommunity ManagerAnswer
Community Manager
June 24, 2020

Hi @mneumann.

 

Have you considered using events as an alternative?  You could implement custom logic to check the property value on the edge side for firing an event based on the value. The event would just be a trigger to possibly fire off an email from the ThingWorx side.

 

Regards.

 

--Sharon

mneumann16-PearlAuthor
16-Pearl
June 26, 2020

Hi @slangley 

no - we have not considered that, but this could be a good alternative.

I will check within our team. If there's nothing built-in then events could be the way to go.

 

We could use the event data as input for a service to set the property on server side.

 

Thanks for the idea!

Michael