Community
OpenEnergyMonitor

Community

Send Email Event

Tags: #<Tag:0x00007fa34b2a9608>

Greetings

I been trying to set an email alert, but not having much luck.

Goal:
Temperature sensor on EV Charger Cable to monitor its temperature
If Temperature goes above 60º trigger an email alert
Trigger only Once or Trigger it then wait 1 hour, if temp > 60º trigger again

My first attempt was simple with IF <, Skip next. However once the temps went above 60º i would get an email every 10 seconds.

I then tried to implement the If Mute. However - and i understand why - i get an email every 1440seconds, regardless of the actual temperature. This is my latest implementation

I thought i had it solved with this process list but it doesnt quite work, what am i doing wrong please?

I have another alert i would like to set as well, the voltage where i live is quite erratic, being very influenced by load, so i wanted to set a email alert. IF Voltage > 250 or Voltage < 215, trigger email - ONCE

113844830b75ee49ea7dcad349e8e7e8

As a side note, the supported template tags: {type}, {id}, {key}, {name}, {node}, {time}, {value}
are not working. Only time seems to work currently.
So if we use the example body text:
At {time} your {type} from {node} with key {key} named {name} had value {value}.
Email will return At 019-08-11 19:59:08 your {type} from {node} with key {key} named {name} had value {value}.

I think i didnt wrap my brain arround the right way to implement this.

Any advice please?
Thanks

Hello @gilaraujo did you provide SMTP email settings in emoncms/settings.php?

// (OPTIONAL) Email SMTP, used for password reset or other email functions
$smtp_email_settings = array(
  'host'=>"smtp.gmail.com",
  'port'=>"465",  // 25, 465, 587
  'from'=>array('[email protected]' => 'EmonCMS'),
  // comment lines below that dont apply
  'encryption'=>"ssl", // ssl, tls
  'username'=>"[email protected]",
  'password'=>"yourpassword"
);

I think the issues Gil is having is more with the way the email is triggered and constructed as he has received email notifications, too many it would seem!

1 Like

Aha ok, the Send Email event was originally added by @nchaveiro. Im not that familiar with it unfortunately. Perhaps @nchaveiro can help?

Not that familiar…?

1 Like

Greetings

Thank you all so far
Yes smtp as well as changing the default email from [email protected] was done.

As far as i can see there are 2 things a bit wrong - or maybe user error:
a) it will not email to the user email. It will mail to [email protected]
b) from the template tags: {type}, {id}, {key}, {name}, {node}, {time}, {value} , only Time seems to be working

Regarding my issue, my problem probably is the construction of the trigger. I might not be yet able to wrap my head arround it.

I will wait to see if @nchaveiro can give a hand!

Thank you