Skip to main content
1-Visitor
April 3, 2018
Solved

Alert configuration for remote values streaming in from the device.

  • April 3, 2018
  • 5 replies
  • 4789 views

Hello Team,

 

I have a written a custom email alert service, which gets executed when threshold of a temperature sensor crosses 40.Till here it is fine. Now my requirement is I want to trigger that email service when new property gets added to that thing. 

 

example: If I have a thing "temperature sensor" and I am monitoring temperature through that in property "temperature".If someone added another property called "humidity"  to that thing then it should trigger the email service and the owner of that thing should get an email saying that new thing called humidity git added to thing "temperature sensor".

Please help me here. How do we achieve this ? 

 

Thanks in advance 

 

 

Best answer by supandey

 @arvind9441 this service is available in the Services section for your Thing (largely any entity) you can check this by navigating to the Services section and look for the GetConfigurationChangeHistory

 

The usage is pretty straight forward as its not taking any input parameter, so if you are looking to call this for certain entity you can do something like this

 

var result = Things["DemoTimer"].GetConfigurationChangeHistory();

DemoTimer is just the name of the entity on which i'm calling GetConfigurationChangeHistory()

 

06-04-2018 10-48-38.jpg

5 replies

5-Regular Member
April 4, 2018

Hi @arvind9441 if these properties are added manually from the composer they'll show up in the change history for the Thing and you can query the same using GetConfigurationChangeHistory() and based on the diff an alert could be generated, however current limitation with Change History in general is that if any change is applied to the Thing programatically it doesn't reflect in the Change History. There's already an enhancement request being worked upon as noted here Updating/Editing Entities programatically in ThingWorx does not update the Change History of the entity

1-Visitor
April 6, 2018

Hi @supandey thankyou so much for replying. I am beginner in thingworx. Can you also let me know to query GetConfigurationChangeHistory(). Provide me the link od the document if any.

 

Thanks,

Arvind

 

supandey5-Regular MemberAnswer
5-Regular Member
April 6, 2018

 @arvind9441 this service is available in the Services section for your Thing (largely any entity) you can check this by navigating to the Services section and look for the GetConfigurationChangeHistory

 

The usage is pretty straight forward as its not taking any input parameter, so if you are looking to call this for certain entity you can do something like this

 

var result = Things["DemoTimer"].GetConfigurationChangeHistory();

DemoTimer is just the name of the entity on which i'm calling GetConfigurationChangeHistory()

 

06-04-2018 10-48-38.jpg