Jump to content
AT&T to end email-to-text ×

variables inside custom email notifications help


Recommended Posts

Posted

I'm trying to create a custom email notification for when I am on vacation that tells me what is going on at my house. here is what I have so far and I think the first line will work fine, but the rest needs work:

Quote

Vacation Daily Alert for ${sys.date}, ${sys.time}.
On Vacation? ${sys.program.#.status}
Thermostats: ${sys.node.#.addr}
Garage doors? ${sys.node.#.addr}, ${sys.node.#.addr}
Outdoor Temp: ${sys.node.#.addr}

the problem is, I'm not sure what parts of these "variables" need to be changed and if so, to what.  I guess I need a kindergartner level of explanation. 

for the "On Vacation", I have a program called "on vacation?" and I'd like to know if that is true or false.  I presume I need to swap out the pound sign to something but I don't know what to swap it to.  

for the others, they're all nodes, some are insteon devices, specifically. 

Posted

When referring to a node, the # becomes the node identifier. Besides the insteon address, you can also use polyglot created devices like this

Rain Tomorrow ${sys.node.n007_forecast_1.GV18} ${sys.node.n007_forecast_1.GV13} Accumulation ${sys.node.n007_forecast_1.GV8}

When you use a program to trigger a notification, the # automatically gets replaced by the ID of the program that called it.

${sys.program.#.address}    ${sys.program.#.name}    ${sys.program.#.status}    ${sys.date} ${sys.time} 

 

image.png.bfa8586896dae55d3df0536f42539cd5.png

 

program[97] Garage Closed True 2025/03/30 06:10:00 AM
Posted
Quote

 

On Vacation? - [ID 00D4][Parent 0066][Not Enabled]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
   - No Actions - (To add one, press 'Action')
 
Else
   - No Actions - (To add one, press 'Action')
 

so, in my customized email, I tried this and it doesn't work:

On Vacation? ${sys.node.00D4.status} ${sys.program.00D4.status}

 

I appreciate help. 

Posted

Post a copy of the program, with all the relevant fields populated, that doesn't work

00D4 isn't a system node, it's a program ID

You'll probably need to have the program set a variable

Substitution Variables

  • Substitution variables are available inside custom email definitions in the form ${<variable name>}.
  • Substitutions can be manually made in the body, URL or header of Network Resources from version 4.3.26. If you included them in the URL then you cannot use the 'Encode URL' option
  • In most cases, these variables use the ID of the element being referenced
    • For example ${sys.node.11 22 AA 1.name} would use the name of the device node whose address is 11 22 AA 1
    • Instead of specifying a fixed address, the special character # may be used to reference the element in the event that caused the program to run. (Does not work in network resources)
      • For example, if a status event for node 11 22 AA 1 caused a program to run, then ${sys.node.#.name} would use 11 22 AA 1 as the address.

 

  • 2 weeks later...
Posted

@Techman wow, is this a tough project.  here is the "customized content" that i'm trying to get working:

Quote

Vacation Daily Alert for ${sys.date}, ${sys.time}

On Vacation? ${On_Vacation}
Thermostats: ${sys.node.n010_t421839927326.addr}
Garage doors? ${sys.node.#.addr}, ${sys.node.#.addr}
Outdoor Temp: ${sys.node.#.addr}

i'm still working through them but the only thing that works is the first line. 

specifically, the "On_Vacation" is the name of a variable (and it doesnt work)

and the "n010..." is the name of the nodeserver node for my ecobee thermostat. 

any suggestions?

Posted (edited)

@someguy The easiest way to get the variable you want from a node server into an email is to go to the PGX plugin and hit the copy symbol next to the variable you want and then past it into the program. 

For example if I want the barometric pressure of my weather flow plug in, I would click on the copy symbol and it will copy the correct string to paste into an email.

Screenshot2025-04-19at12_10_35PM.thumb.jpg.715807748b9e95742583500ca86f8e1e.jpg

 

I get notifications throughout the day when traveling.. I use pushover vs email. but here is an example of the program and the pushover message that gets sent. 

House Status when away - [ID 00E2][Parent 0203][Run At Startup]

If
        $Away is 1
    And (
             Time is  8:30:00AM
          Or Time is 12:00:00PM
          Or Time is  5:00:00PM
          Or Time is  9:00:00PM
        )
 
Then
        Set 'Notification Controller / Service Pushover Other' Send Sys Custom With Params Priority=Normal Content 24 Notification ID (ID=24)
 
Else
   - No Actions - (To add one, press 'Action')
 

Notification in custom notifications looks like this:

Security: ${sys.node.n014_area_1.ST}, ${sys.node.n014_area_1.GV0}

Doors: 
-Front: ${sys.node.ZY010_1.ST} and ${sys.node.n014_zone_1.ST}.
-Mud Room: ${sys.node.ZY011_1.ST} and ${sys.node.n014_zone_15.ST}.
-Back Grg: ${sys.node.ZY012_1.ST} and ${sys.node.n014_zone_12.ST}.
-Mstr Bedrm: ${sys.node.n014_zone_10.ST}.
-Slider: ${sys.node.n014_zone_33.ST}.
-Screen Porch Entry: ${sys.node.n014_zone_5.ST}.
-Screen Porch North: ${sys.node.n014_zone_9.ST}.
-Screen Porch South: ${sys.node.n014_zone_4.ST}.
-S. Garage: ${sys.node.n014_zone_7.ST}.
-M. Garage: ${sys.node.n014_zone_3.ST}.
-N. Garage: ${sys.node.n014_zone_8.ST}.

Main Thermostat:
-Set: ${sys.node.ZY004_1.CLISPH}
-Temp: ${sys.node.ZY004_1.ST}
-Mode: ${sys.node.ZY004_1.CLIMD}
-Status: ${sys.node.ZY004_1.CLIHCS}.

Upstairs Thermostat:
-Set: ${sys.node.ZY005_1.CLISPH}
-Temp: ${sys.node.ZY005_1.ST}
-Mode: ${sys.node.ZY005_1.CLIMD}
-Status: ${sys.node.ZY005_1.CLIHCS}.

Main Level: ${var.1.92} Minutes
Upstairs: ${var.1.94} Minutes

Day 1: ${var.1.98}
Day 2: ${var.1.99}
Day 3: ${var.1.100}
Day 4: ${var.1.101}
Day 5: ${var.1.102}

Master Fireplace is: ${sys.node.1D 5A C0 1.ST}
Water Pump is: ${sys.node.ZY013_1.ST}

Temperatures:
-Outside: ${var.1.28}ºF 
-Garage: ${sys.node.n019_ts5.ST}
-Hot Tub: ${sys.node.n016_8b4c01000a1c2e.CLITEMP}
-Mstr Bedrm: ${sys.node.n019_ts4.ST}
-Family Room: ${sys.node.n019_ts1.ST}
-Great Room: ${sys.node.n019_ts3.ST}
-Office: ${sys.node.n019_ts2.ST}
-Lake: ${sys.node.n016_8b4c0100079d9f.CLITEMP}
-House Refrig: ${sys.node.n016_8b4c01000ba53e.CLITEMP}
-House Freezer: ${sys.node.n016_8b4c01000ba56d.CLITEMP}
-Garage Refrig: ${sys.node.n016_8b4c01000ba218.CLITEMP}
-Garage Freezer: ${sys.node.n016_8b4c01000ba4d1.CLITEMP}

Weather:
Temp: ${var.1.28}ºF, High: ${var.1.38}ºF, 
Wind: ${var.1.11}mph, Gusts: ${var.1.31}, 
Wind Direction: ${sys.node.n001_285149.WINDDIR}
Rain: ${var.1.34}%, Clouds: ${var.1.35}%

${alert.time}

 

Output looks like this

 

IMG_4981D700BC45-1.thumb.jpeg.b1a4a910069d719bd0aeb4f410467c88.jpeg

IMG_A9C58C73F755-1.thumb.jpeg.5b27897c1b664118372322aae2ed3083.jpeg

IMG_61AEFF13C2F2-1.thumb.jpeg.bff67ecda9012776d275ff8c267e6167.jpeg

 

Hope seeing a real life example helps!  

 

IMG_4981D700BC45-1.jpeg

Edited by dbwarner5
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.7k
    • Total Posts
      376.8k
×
×
  • Create New...