Jump to content
C4 Forums | Control4

Programming question


zaphod

Recommended Posts

I want my C4 system to send me an email when the temperature is above a certain threshold. I have figured out how to do this but how do I include in my email the current temperature. How do I set up an email template to contain a variable and how do I get that variable into the email? The examples I have seen seem to have static emails that always contain the exact same text. How do I send an email that says something like "The current temperature is "(Insert Temperature)

Right now my code looks like this:

? If the Main hall->Control4 Wireless Thermostat Temperature is > 24

> Email Notification to 'recipient@recipient.com' with subject as :'Temperature Warning'

Would this code just send an email when the temperature changes? That appears to be the case that this event is triggered when the temperature and changes and is > 24. Note that this is celsius (of course).

Link to comment
Share on other sites


I want my C4 system to send me an email when the temperature is above a certain threshold. I have figured out how to do this but how do I include in my email the current temperature. How do I set up an email template to contain a variable and how do I get that variable into the email? The examples I have seen seem to have static emails that always contain the exact same text. How do I send an email that says something like "The current temperature is "(Insert Temperature)

Right now my code looks like this:

? If the Main hall->Control4 Wireless Thermostat Temperature is > 24

> Email Notification to 'recipient@recipient.com' with subject as :'Temperature Warning'

Would this code just send an email when the temperature changes? That appears to be the case that this event is triggered when the temperature and changes and is > 24. Note that this is celsius (of course).

I'm sure your Dealer can assist you with your situation..

Link to comment
Share on other sites

zaphod - your current program in your example would get ONE email... the moment the temperature goes about 24 - you'd get an email - but it would NOT generate it for each degree... as others have already suggested, you'd have to create an email for each degree - and that would be a lot of work, not to mention messy. Sorry - but that is really the best answer.

Link to comment
Share on other sites

It may not be very elegant, but it's really not capable of doing it any other way.

Can I be really nosey and ask why you want to know the temperature?

Right now I am just playing with this so it is not a big deal. But one reason to want to know the temperature is if I decide to put a temperature sensor of some sort in my wine cellar. My wine cellar is kept at 57F. If it goes to 58F that is not a big deal. If it goes to 75F I would want to know about it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.