Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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
Solved! Go to Solution.
@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()
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
@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()
Glad it helped!