Page 1 of 2

Setting Up Alarms via email

Posted: Sun 30 Jan 2022 7:34 pm
by Paul C
Hi

Has anyone got this working ?

I am assuming you just put an email address in the two boxes and then one of the criteria is met, eg Temperature falls below zero and email is sent.

Is there more to it than that ? - mine keep returning an error message " Test email failed: Object reference not set to an instance of an object."

Ive looked and searched on the wiki and forum but cant see much if anything about Alarm and emails.

Any advice atall

cheers

Re: Setting Up Alarms via email

Posted: Sun 30 Jan 2022 8:00 pm
by PaulMy
Hi,
Yes, it is working fine... got dozens of warnings last couple of days when I had set the alarm for when temperature goes below -20°C until I changed it to -25°C :D

You also need to do the Internet settings > Email Server Settings and this is the most important to get right.

Enjoy,
Paul

Re: Setting Up Alarms via email

Posted: Mon 31 Jan 2022 8:46 pm
by Paul C
Hi

Sorry for slow reply

email server settings ? - will take a look

many thanks

Re: Setting Up Alarms via email

Posted: Tue 01 Feb 2022 8:57 pm
by Paul C
Hi

I am still struggling - anyone managed to get this working with gmail and could share settings please - I keep getting error messages

thanks

Re: Setting Up Alarms via email

Posted: Tue 01 Feb 2022 9:22 pm
by freddie
I may be barking up the wrong tree but isn't your username pacrabtree@gmail.com?

Re: Setting Up Alarms via email

Posted: Tue 01 Feb 2022 9:52 pm
by PaulMy
As freddie mentioned
but isn't your username pacrabtree@gmail.com
My email for this is GoDaddy who now use Microsoft 365 for their mail service and for me is me@domainname.com. As I had mentioned it is most important to get the settings right. For CMX I ended with the following, which works very well:

Code: Select all

Server Name:  smtpout.secureserver.net
 The hostname (and domain) or IP address of your SMTP server

Network Port: 80
 The SMTP port used by your SMTP server

Use SSL/TLS: None
 Select the protocol required by your email server: 
None - No SSL or TLS encryption will be used 
Auto - Cumulus decides which TLS/unencrypted options to use (default). Use this option unless you have good reason not to 
TlsOnConnect - The connection should use TLS encryption immediately 
StartTls - Use TLS encryption immediately. If the server does not support the STARTTLS extension then the connection will fail 
StartTlsWhenAvailable - use TLS encryption immediately, but only if the server supports the STARTTLS extension

Authentication: Enable server authentication
 Does your SMTP server require username/password authentication

Username:  {my domain at GoDaddy email address}
 The username to connect to your SMTP server

Password:  •••••••••
 The password used to authenticate with your SMTP server
I have learned that the correct Port number is very important for it to work, and only certain number will work with an email service.

I recently set up another email notification when installing my Reolink camera, and it was a struggle. I couldn't get that GoDaddy email service I had setup for CMX to work with the Reolink. Reolink Support was very helpful including this link: https://support.reolink.com/hc/en-us/ar ... rce=search so ended up using the gmail service.
SMTP Server - smtp.gmail.com
SMTP port - 465
and the applicable email addresses and password.

Enjoy,
Paul

Re: Setting Up Alarms via email

Posted: Tue 01 Feb 2022 10:29 pm
by mcrossley
Gmail uses two factor authentication which obviously will not work with applications.

So in your gmail security settings you will have to create an "Application password" which will bypass the two factor auth.

Then in the settings, from you screen shot...
- change the authentication back to the default "Auto"
- change the username to your email address
- enter the application password you created above

Test - and it should work OK.

Re: Setting Up Alarms via email

Posted: Tue 01 Feb 2022 11:06 pm
by Paul C
Thanks for all the advice !!

Will try again in the morning

Noted re user name, had tried in full and just name but I think the key is the app password, which is something I hadn't heard of before. Will check this out

Re: Setting Up Alarms via email

Posted: Wed 02 Feb 2022 9:22 am
by Paul C
Morning

All now working, setting up the Gmail App password was easier than I thought. Test email sent and working :D

Couple of questions please - what does "latches" mean in the alarms ?

At the bottom of the alarm/email section it says you can edit the "strings.ini" can you add text to that in the body of the email sent out ?

cheers

Re: Setting Up Alarms via email

Posted: Wed 02 Feb 2022 9:57 am
by mcrossley
Latches prevent you being flooded with alarms if a value is bouncing around a threshold value. So if you set a temperature alarm above 30C say, and the temperature is hovering at 30, getting readings of 29.9, 30.1, 30.0, 30.1, etc you don't want an email every time it transitions from below 30 to above. The latch says if the alarm occurs, don't send another email for an hour (or whatever) if the same alarm occurs again within the timeframe.

Yes you can change the email subject and body content by editing the strings.ini file. The first variable in the message is the value, the second the units.
The Wiki is slightly out of date, but explains it: https://cumuluswiki.org/a/Strings.ini

Re: Setting Up Alarms via email

Posted: Wed 02 Feb 2022 7:19 pm
by Paul C
Hi

Am I right that a strings.ini file doesnt exsist ?

Its something you add on reading the above article. Proabley on the tricky side to create with no working knowledge ?

Having now read an email it produces, I maybe dont need to add anything, apart from a signature or similar ?

Latches and Latch hours

I understand that you dont want email alarms being sent every 2 minutes if your variable goes above or below the threshold, but the word "latch" I havent heard of before.

So I I just wanted to send one email once the temperature threshold had fallen below 0.0c, what would you display in latches ?

cheers

Re: Setting Up Alarms via email

Posted: Wed 02 Feb 2022 11:46 pm
by water01
So I I just wanted to send one email once the temperature threshold had fallen below 0.0c, what would you display in latches ?
So assuming you wanted one email on each day that goes below zero you would tick the latch and set the hrs to 24 i.e. you get 1 email in any 24 hours. Once the latch is set it sends nothing else, then after 24hrs when the latch is released if temperature dropped below zero again you would get another email etc.

Re: Setting Up Alarms via email

Posted: Thu 03 Feb 2022 9:38 am
by Paul C
Cheers David

Thanks for the explanation

Re: Setting Up Alarms via email

Posted: Thu 03 Feb 2022 10:29 am
by water01
Am I right that a strings.ini file doesnt exsist ?
Forgot to say that it does in sample form and you have to rename it to strings.ini. In every MX release there is a samplestrings.ini file that can be used as the basis for your strings.ini.

Re: Setting Up Alarms via email

Posted: Thu 03 Feb 2022 3:42 pm
by mcrossley
water01 wrote: Wed 02 Feb 2022 11:46 pm
So I I just wanted to send one email once the temperature threshold had fallen below 0.0c, what would you display in latches ?
So assuming you wanted one email on each day that goes below zero you would tick the latch and set the hrs to 24 i.e. you get 1 email in any 24 hours. Once the latch is set it sends nothing else, then after 24hrs when the latch is released if temperature dropped below zero again you would get another email etc.
I wouldn't use 24 hours though. you would potentially miss alarms. Say it went below zero today at 07:30, then again at 07:10 tomorrow. There would be no alarm tomorrow because it is within the 24 hour window ending at 07:30. It would be better to reset after something like 12 hours.