Thanks for the heads up. I hardly ever use this email account (non-SSL) so was not aware of the problem. I updated the MX record and then tested it using the alarm.py file in the example directory. Worked fine.
Again thanks for the help and sorry for the confusion. Tom From: weewx-user@googlegroups.com <weewx-user@googlegroups.com> On Behalf Of Thomas Keffer Sent: Sunday, January 6, 2019 10:01 AM To: weewx-user <weewx-user@googlegroups.com> Subject: Re: [weewx-user] Re: Alarm.py Help It looks like the problem is that there is no DNS entry for your hostname. This was causing a socket.gaierror exception to be raised, which quietly terminated the thread. I've changed the code to catch such an exception and log it. -tk On Sun, Jan 6, 2019 at 7:38 AM <nineb...@gmail.com <mailto:nineb...@gmail.com> > wrote: Sent. Tom From: weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > On Behalf Of Thomas Keffer Sent: Sunday, January 6, 2019 9:33 AM To: weewx-user <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > Subject: Re: [weewx-user] Re: Alarm.py Help Possibly, but I don't think so. The library smtplib uses a default of 465 for attempting SSL connections. Also, even if one attempted to connect using the wrong port, it should still time out. Which it didn't. Can you send the host name of the non-SSL server by private email? I don't need the user name and password. tkeffer at gmail.com <https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgmail.com&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=B8qpiIP5nzTAqS%2F0yShuiC91eiP2in7dB3bSZLCXm4w%3D&reserved=0> -tk On Sun, Jan 6, 2019 at 7:27 AM <nineb...@gmail.com <mailto:nineb...@gmail.com> > wrote: It is the mail server provided by my ISP, inmotionhosting.com <https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Finmotionhosting.com&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=z8x7llUMSK41HVqgV9QZaraBPbNiEk0i%2FtNIsjNhyA8%3D&reserved=0> . No exception was raised. Could it be something to do with the port? I noticed in the setup that there was no way to designate a port. SSL: Outgoing Server: secure246.inmotionhosting.com <https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsecure246.inmotionhosting.com&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=NPgtCTRGP2prdiP4cAda9PyXb5mJGwoUxoi%2BGdIjObs%3D&reserved=0> SMTP Port: 465 Non-SSL: Outgoing Server: mail.XXX.com <https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.XXX.com&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=XGfnYuVn6bvyE0qWk4gV%2BvQe47TThk1LX3E3prWDMu0%3D&reserved=0> SMTP Port: 587 Tom From: weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > On Behalf Of Thomas Keffer Sent: Sunday, January 6, 2019 6:51 AM To: weewx-user <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > Subject: Re: [weewx-user] Re: Alarm.py Help OK, but I wish we knew what the trouble was. The last version had a 20 second 'timeout': if the server didn't respond, an exception should have been raised. Sounds like that didn't happen. What was the non-SSL server you were using? -tk On Sat, Jan 5, 2019 at 6:59 PM <nineb...@gmail.com <mailto:nineb...@gmail.com> > wrote: OK. I got it working by changing my server to one requiring SSL. I was using a non-SSL server and the latest version you sent still would not work. I also tried Gmail SMTP and it works. The “issue” seems to be with non-SSL servers. I usually find it the other way around. I tried the original example alarm.py using an SSL server and it works so I think this confirms my ”issue” is with non-SSL servers. Sorry for all the trouble. I am happy to use the SSL server. Many thanks. Tom From: weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > On Behalf Of Thomas Keffer Sent: Saturday, January 5, 2019 8:22 PM To: weewx-user <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > Subject: Re: [weewx-user] Re: Alarm.py Help Looks like your smtp server hangs if you try to connect to it using SSL. Try this version. -tk On Sat, Jan 5, 2019 at 5:23 PM <nineb...@gmail.com <mailto:nineb...@gmail.com> > wrote: As requested. Thanks for helping. Tom From: weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > On Behalf Of Thomas Keffer Sent: Saturday, January 5, 2019 6:58 PM To: weewx-user <weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> > Subject: Re: [weewx-user] Re: Alarm.py Help Hmmm. Try this version. It has been heavily instrumented. Again, run with debug=1. Make sure you restart WeeWX. -tk On Sat, Jan 5, 2019 at 4:46 PM <nineb...@gmail.com <mailto:nineb...@gmail.com> > wrote: I used the alarm.py version that you sent the link to. I attached it along with the syslog. I am not using an SSL connection. Still nothing. I did notice an error when I quit weewx this time. On Saturday, January 5, 2019 at 12:20:32 PM UTC-6, nine...@gmail.com <mailto:nine...@gmail.com> wrote: I set up alarm.py per the instructions (I think). I wanted to test an alarm so I set it for expression= "outTemp > 40". When I run weewx I get alarm: Alarm set for expression: 'outTemp > 40.0' alarm: Alarm expression "outTemp > 40.0" evaluated True at 2019-01-05 11:15:00 CST (1546708500) This is what I would expect however nothing else happens. I looked in the syslog file and there is no mention of the mail being sent or an smtp error. Also there were no other entries stating the expression was true. I waited one hour and again got this but no other entries in syslog. Jan 5 12:16:16 raspberrypi weewx[5473]: alarm: Alarm expression "outTemp > 40.0" evaluated True at 2019-01-05 12:16:00 CST (1546712160) I am using a Raspberry Pi. Thanks, Tom -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072075630&sdata=V02%2FFkv0FlD%2BLoRgL6HIVOeXb4FwDlSFyDVPjXfy5jM%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072231876&sdata=3NenTrJTIRvTD1DfaVOt88%2BJSYdOtyO0wWprsGBKRL8%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com <mailto:weewx-user+unsubscr...@googlegroups.com> . For more options, visit https://groups.google.com/d/optout <https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cc5d59360f76d4634fc4b08d673f0426f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823873072231876&sdata=3NenTrJTIRvTD1DfaVOt88%2BJSYdOtyO0wWprsGBKRL8%3D&reserved=0> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.