Support Forums
Alarm message - email

I am trying to program our sites (40 or so) with a standard program, just the bare minimum of changes between the sites, IPs etc.

I have an alarm section in there to email us depending on power state.

Is it possible to have the site name from either the profile or a string withing the program embedded into the subject of the email? I can get it into the body, but when the email comes in, it is better to see which site it is from the subject.

1$="sitename_test"

RG1M
Alarm2(1hv<12.2)6cv"<12.2 Volts, actual= ?v"
Alarm3(1hv>12.0)">12 Volts, actual= ?v"[mailto:email@address.au?subject=Power Okay @ ?1$]{P15=0}
Alarm4(1hv<11.8 )"<11.8 Volts, actual= ?v"{P15=3}

With this I get the subject "Power Okay @ ?1$" where I would like Power Okay @ sitename_test

Thanks

Grant

I am trying to program our sites (40 or so) with a standard program, just the bare minimum of changes between the sites, IPs etc. I have an alarm section in there to email us depending on power state. Is it possible to have the site name from either the profile or a string withing the program embedded into the subject of the email? I can get it into the body, but when the email comes in, it is better to see which site it is from the subject. 1$=&quot;sitename_test&quot; RG1M Alarm2(1hv&lt;12.2)6cv&quot;&lt;12.2 Volts, actual= ?v&quot; Alarm3(1hv&gt;12.0)&quot;&gt;12 Volts, actual= ?v&quot;[mailto:email@address.au?subject=Power Okay @ ?1$]{P15=0} Alarm4(1hv&lt;11.8 )&quot;&lt;11.8 Volts, actual= ?v&quot;{P15=3} With this I get the subject &quot;Power Okay @ ?1$&quot; where I would like Power Okay @ sitename_test Thanks Grant

Hi Grant,

You can change the email subject with particular variable but you have to use COPYD as a main host for mailto syntax.
Then because you set mailto as part of COPYD, you can't use alarm text as email content anymore.
Email content must be re-declared within mailto, please note ?v can't be used.

And because COPYD is originally unload syntax, you will need to remove data and alarm if you need alarm text (only).

Alarm3(1hv>12.0){COPYD data=n alarm=n dest="mailto:email@address.au?subject=Power Okay @ ?(1$)&body=>12 Volts, actual=?(1CV)"; P15=0}

Notes:
Although it is possible to manipulate subject and body of email, dataTaker can't give a customized file name in the attachment.

Best regards,
Rudy

Hi Grant, You can change the email subject with particular variable but you have to use COPYD as a main host for mailto syntax. Then because you set mailto as part of COPYD, you can&#039;t use alarm text as email content anymore. Email content must be re-declared within mailto, please note ?v can&#039;t be used. And because COPYD is originally unload syntax, you will need to remove data and alarm if you need alarm text (only). Alarm3(1hv&gt;12.0){COPYD data=n alarm=n dest=&quot;mailto:email@address.au?subject=Power Okay @ ?(1$)&amp;body=&gt;12 Volts, actual=?(1CV)&quot;; P15=0} Notes: Although it is possible to manipulate subject and body of email, dataTaker can&#039;t give a customized file name in the attachment. Best regards, Rudy

Rudy

Thank you once again for your great help.

I look forward to trying it out in the coming days

Cheers

Grant

Rudy Thank you once again for your great help. I look forward to trying it out in the coming days Cheers Grant

To make it a bit friendlier, is it possible to convert a channel variable into a string for inclusion into the text?

such as

2$(=2CV)

just so we can get at least one decimal place when we get the actual voltage?

To make it a bit friendlier, is it possible to convert a channel variable into a string for inclusion into the text? such as 2$(=2CV) just so we can get at least one decimal place when we get the actual voltage?

Hi Grant,

Unfortunately you can't redefine channel variable as a string to achieve 1 decimal point, however you may trick the data itself to give you 1 decimal point.
Example:
You want to reduce 1CV to have 1 decimal point
1CV=1CV-(1CV%0.1)

Best regards,
Rudy Gunawan

Hi Grant, Unfortunately you can&#039;t redefine channel variable as a string to achieve 1 decimal point, however you may trick the data itself to give you 1 decimal point. Example: You want to reduce 1CV to have 1 decimal point 1CV=1CV-(1CV%0.1) Best regards, Rudy Gunawan

Is it possible to have the alarm latch?

Currently the code is

Alarm3(1hv>12.5){copyd data=y sched=d start=-1T alarm=y dest="mailto:XXXXXXXXdevice@XXXXX.XXXX.gov.au?subject=Power Okay @ ?(1$)&body=>12.4 Volts, actual=?(2CV)"; P15=0}

Problem is that every time the power is between 12.50 and 12.99, it sends an email

Or would it be better to define the power to more decimal places eg Alarm3(1HV>12.500001)

Thanks

Grant

Is it possible to have the alarm latch? Currently the code is Alarm3(1hv&gt;12.5){copyd data=y sched=d start=-1T alarm=y dest=&quot;mailto:XXXXXXXXdevice@XXXXX.XXXX.gov.au?subject=Power Okay @ ?(1$)&amp;body=&gt;12.4 Volts, actual=?(2CV)&quot;; P15=0} Problem is that every time the power is between 12.50 and 12.99, it sends an email Or would it be better to define the power to more decimal places eg Alarm3(1HV&gt;12.500001) Thanks Grant

Hi Grant,

You can have a latch by defining another channel variable (i.e.: 99CV status).
Alarm3(1hv>12.5)AND Alarm(99CV=0){copyd data=y sched=d start=-1T alarm=y dest="mailto:XXXXXXXXdevice@XXXXX.XXXX.gov.au?subject=Power Okay @ ?(1$)&body=>12.4 Volts, actual=?(2CV)"; P15=0; 99CV=1}

Then use another schedule to reset 99CV as required.

Best regards,
Rudy Gunawan

Hi Grant, You can have a latch by defining another channel variable (i.e.: 99CV status). Alarm3(1hv&gt;12.5)AND Alarm(99CV=0){copyd data=y sched=d start=-1T alarm=y dest=&quot;mailto:XXXXXXXXdevice@XXXXX.XXXX.gov.au?subject=Power Okay @ ?(1$)&amp;body=&gt;12.4 Volts, actual=?(2CV)&quot;; P15=0; 99CV=1} Then use another schedule to reset 99CV as required. Best regards, Rudy Gunawan

Rudy

I used (1hv>12.5/1H) so that the condition has to be met for one hour before sending the email

Thanks

Grant

Rudy I used (1hv&gt;12.5/1H) so that the condition has to be met for one hour before sending the email Thanks Grant

Hi Grant,

Yes, that condition must last for one hour (or more) before the trigger happened.
"More than 1 hour" will happen depending on your sampling methods.
Example:
RA25M
Alarm3(1HV>12.5/1H){...}

Best regards,
Rudy Gunawan

Hi Grant, Yes, that condition must last for one hour (or more) before the trigger happened. &quot;More than 1 hour&quot; will happen depending on your sampling methods. Example: RA25M Alarm3(1HV&gt;12.5/1H){...} Best regards, Rudy Gunawan
35
9
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft