Skip to main content
May 19, 2017 4:46 PM UTC
Solved

Health Checks

I'm running Thingworx 7.2 and am a Thingworx newbie.

One of my pilot hosts would like to get 4 daily email updates of the sensors in his greenhouse.

The email will contain 2 parameters for 4 sensors and a UPS status.

I'm confused about the implementation.  Scheduler seems the right way to kickoff the event, but how to get the data from the sensors into one email.

Any help would be appreciated.

Thx,

Dan

posipovaAnswer
May 19, 2017 5:52 PM UTC

A couple of ways but the same general idea.

1. You may write a service that uses the SendMessage service (in other words, wrap it), and pull the properties inside the message body:

2. You may write a service that gets the properties, writes them to a file in a file repository, and then wrap the sendmessagewithattachments into a custom service that pulls that file froim the file repository.

14 replies

posipovaAnswer
May 19, 2017 5:52 PM UTC

A couple of ways but the same general idea.

1. You may write a service that uses the SendMessage service (in other words, wrap it), and pull the properties inside the message body:

2. You may write a service that gets the properties, writes them to a file in a file repository, and then wrap the sendmessagewithattachments into a custom service that pulls that file froim the file repository.

dmahoneyAuthor
May 19, 2017 6:08 PM UTC

Thanks Polina,

I will take a look at your solution on Monday.

Dan

dmahoneyAuthor
May 30, 2017 4:53 PM UTC

In the end, I went with the easy route.  I created a mashup and email the mashup.

Thanks for the help,

Dan

dmahoneyAuthor
Jun 20, 2017 8:58 PM UTC

This is working for the most part.  Thanks for the help, Polina.

However, another problem manifested.  I want the email to go out at 6am, noon, 6pm and midnight.

I used this string to configure cron "0 0 0/6 * * ? *".  I'm getting emails every 6 hours, but the time is 2 hours late (i.e. 2am, 8am...).

Any thoughts?

Dan

Jun 20, 2017 9:17 PM UTC

It should be going by your Thingworx server timezone. Is it different from your local?

dmahoneyAuthor
Jun 20, 2017 9:36 PM UTC

My server is running on an AWS instance out of Virginia, which is the same as local.

I checked the application log and the timestamp of the last log entry is consistent with my local time.