Jump to content

ISY HTML eMail Notification


BoomerangThree

Recommended Posts

Hi everyone,

 

I've searched but cannot find anything on how to create a HTML eMail Notification that has ISY variables embedded into it.

 

Can someone point me to an example / tutorial on how to accomplish this?

It's easy.  Here's a sample of the body of an email with an embedded variable:

The ISY was up ${var.1.4} hours between reboots.

INTEGER variables are indicated by: ${var.1.x}.  STATE variables are indicated by: ${var.2.x}  In this example above, ${var.1.4} indicates an INTEGER variable with an ID of 4.  You get the ID of the variable from the leftmost column of your variable list.

post-7363-0-17940000-1502626816_thumb.png

Link to comment

It's easy.  Here's a sample of the body of an email with an embedded variable:

The ISY was up ${var.1.4} hours between reboots.

INTEGER variables are indicated by: ${var.1.x}.  STATE variables are indicated by: ${var.2.x}  In this example above, ${var.1.4} indicates an INTEGER variable with an ID of 4.  You get the ID of the variable from the leftmost column of your variable list.

Hi Bumbershoot,

 

Thanks for the reply.  What I'm actually looking for is the directions for creating the HTML page to send as a HTML eMail Notification with variables embedded.  Just want to send a nice looking email rather than a plain ole text based one.

Link to comment

You need to write the body of the email in HTML. An for monitoring bathroom humidity post-shower example follows:

 

<html>
<body>
<font face="arial">
  <style>
    body {
      font-family: sans-serif;
    }
  </style>
<table width=442 bgcolor=D8D8D8 border=0>
<tr><td align=center>
<h3>Bathroom Monitor Report</h3>
<table width=440 Border=1 bgcolor=01DFD7>
<tr align=center><td><b>Details</b></td></tr>
<tr><td><table width=440 border="1" bgcolor=AAAAAF>
<tr align=left><td><b>Condition</b></td><td align=right><b>Value</b></td></tr>
<tr><td>Time</td><td align=right>${sys.time12}</td></tr>
<tr><td>Duration</td><td align=right>${var.2.46} minutes</td></tr>
<tr><td>Temperature</td><td align=right>${sys.node.ZW003_1.CLITEMP.RAW}º F</td></tr>
<tr><td>Humidity</td><td align=right>${sys.node.ZW003_1.CLIHUM.RAW}%</td></tr>
<tr><td>Humidity-Pause</td><td align=right>${var.1.25}%</td></tr>
<tr><td>Humidity-Start</td><td align=right>${var.1.22}%</td></tr>
<tr><td></td><td align=right></td></tr>
<tr><td>Program</td><td align=right>${sys.program.#.name}</td></tr>
</table></tr></table>
<tr><td><hr width=440 align=left></td></tr>
<tr><td>
<table width=400 border=0><tr><td align=center>~ ~ ~ END OF REPORT ~ ~ ~</td></tr>
<tr align=center><td><font color="red">Report Generated: ${sys.time12} ${sys.date}</font></td></tr>
</table>
</align>
</td></tr></table>
</font></body></html>

Link to comment

You need to write the body of the email in HTML. An for monitoring bathroom humidity post-shower example follows:

 

<html>

<body>

<font face="arial">

  <style>

    body {

      font-family: sans-serif;

    }

  </style>

<table width=442 bgcolor=D8D8D8 border=0>

<tr><td align=center>

<h3>Bathroom Monitor Report</h3>

<table width=440 Border=1 bgcolor=01DFD7>

<tr align=center><td><b>Details</b></td></tr>

<tr><td><table width=440 border="1" bgcolor=AAAAAF>

<tr align=left><td><b>Condition</b></td><td align=right><b>Value</b></td></tr>

<tr><td>Time</td><td align=right>${sys.time12}</td></tr>

<tr><td>Duration</td><td align=right>${var.2.46} minutes</td></tr>

<tr><td>Temperature</td><td align=right>${sys.node.ZW003_1.CLITEMP.RAW}º F</td></tr>

<tr><td>Humidity</td><td align=right>${sys.node.ZW003_1.CLIHUM.RAW}%</td></tr>

<tr><td>Humidity-Pause</td><td align=right>${var.1.25}%</td></tr>

<tr><td>Humidity-Start</td><td align=right>${var.1.22}%</td></tr>

<tr><td></td><td align=right></td></tr>

<tr><td>Program</td><td align=right>${sys.program.#.name}</td></tr>

</table></tr></table>

<tr><td><hr width=440 align=left></td></tr>

<tr><td>

<table width=400 border=0><tr><td align=center>~ ~ ~ END OF REPORT ~ ~ ~</td></tr>

<tr align=center><td><font color="red">Report Generated: ${sys.time12} ${sys.date}</font></td></tr>

</table>

</align>

</td></tr></table>

</font></body></html>

Hi GlowingHair,

 

Very much appreciated!  Very much!

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...