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> wrote:

> Sent.
>
>
>
> Tom
>
>
>
> *From:* weewx-user@googlegroups.com <weewx-user@googlegroups.com> *On
> Behalf Of *Thomas Keffer
> *Sent:* Sunday, January 6, 2019 9:33 AM
> *To:* weewx-user <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://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgmail.com&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=ogoxGxHH8ZijQ%2FoxNLgRwAXIj8m9kFjXQ9lL2dykjCc%3D&reserved=0>
>
>
>
> -tk
>
>
>
> On Sun, Jan 6, 2019 at 7:27 AM <nineb...@gmail.com> wrote:
>
> It is the mail server provided by my ISP, inmotionhosting.com
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Finmotionhosting.com&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=HyrAKv2Ioyy%2BrobKBSA%2BW5GpDFn8ojx%2FzohYI6w8t7M%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://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsecure246.inmotionhosting.com&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=nrsNu4aTHVwDweMEvtPbrWrzGoEenr6U%2B3gQ0qewr4k%3D&reserved=0>
>   SMTP Port: 465
>
>
>
> Non-SSL:
>
> Outgoing Server:  mail.XXX.com
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.XXX.com&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=Wz65jTtSOsJZrvOlZHcnYh0GN41tOD2zNLDTisPykUc%3D&reserved=0>
> SMTP Port: 587
>
>
>
> Tom
>
>
>
> *From:* weewx-user@googlegroups.com <weewx-user@googlegroups.com> *On
> Behalf Of *Thomas Keffer
> *Sent:* Sunday, January 6, 2019 6:51 AM
> *To:* weewx-user <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> 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 <weewx-user@googlegroups.com> *On
> Behalf Of *Thomas Keffer
> *Sent:* Saturday, January 5, 2019 8:22 PM
> *To:* weewx-user <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> wrote:
>
> As requested.
>
>
>
> Thanks for helping.
>
>
>
> Tom
>
>
>
> *From:* weewx-user@googlegroups.com <weewx-user@googlegroups.com> *On
> Behalf Of *Thomas Keffer
> *Sent:* Saturday, January 5, 2019 6:58 PM
> *To:* weewx-user <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> 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
> 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.
> For more options, visit https://groups.google.com/d/optout
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=CKCVdUb4RHG3maVq3WQ1ghQVE6gz3DcdT2YLLvkpe2U%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=CKCVdUb4RHG3maVq3WQ1ghQVE6gz3DcdT2YLLvkpe2U%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302679556&sdata=CKCVdUb4RHG3maVq3WQ1ghQVE6gz3DcdT2YLLvkpe2U%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302835808&sdata=Me%2FA9NsGhS0Uv%2BGgSX%2BOMIiw3h9ICvqSSqTtUp3IMNk%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302835808&sdata=Me%2FA9NsGhS0Uv%2BGgSX%2BOMIiw3h9ICvqSSqTtUp3IMNk%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302835808&sdata=Me%2FA9NsGhS0Uv%2BGgSX%2BOMIiw3h9ICvqSSqTtUp3IMNk%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302835808&sdata=Me%2FA9NsGhS0Uv%2BGgSX%2BOMIiw3h9ICvqSSqTtUp3IMNk%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
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C0a11ff3c042b4231e6d708d673ec5b1c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636823856302835808&sdata=Me%2FA9NsGhS0Uv%2BGgSX%2BOMIiw3h9ICvqSSqTtUp3IMNk%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.
>

-- 
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.

Reply via email to