cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Alert configuration for remote values streaming in from the device.

arvind9441
3-Visitor

Alert configuration for remote values streaming in from the device.

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 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
supandey
19-Tanzanite
(To:arvind9441)

 @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

View solution in original post

5 REPLIES 5
supandey
19-Tanzanite
(To:arvind9441)

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

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

 

supandey
19-Tanzanite
(To:arvind9441)

 @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

Thankyou so much @supandey . This is something  I was looking for. 

 

Thanks,

Arvind

supandey
19-Tanzanite
(To:arvind9441)

Glad it helped!

Top Tags