OK!
Before i've tested it, but i got no email:
[Alarm]
expression = "outTemp < 60.0"
time_wait = 300
smtp_host = smtp.xxxxxxxx
smtp_user = xxxxxxx
smtp_password = xxxxx
from = [email protected]
mailto = [email protected]
subject = "Alarm message from weewx!"
Where can i get the right code?
How can i install alarm.py?
I took the code from this side:
https://github.com/weewx/weewx/blob/master/examples/alarm.py
Christian
Am Montag, 14. Januar 2019 16:47:10 UTC+1 schrieb Thomas Keffer:
>
> It appears the code is wrong. However, the code beyond
> if __name__ == '__main__':
> was temporarily included in alarm.py a long time ago, and should never
> have stayed in there.
>
> The best way to test alarm.py is to install it, use an expression in
> [Alarm] that is sure to trigger it, then run WeeWX.
>
> -tk
>
> On Mon, Jan 14, 2019 at 7:07 AM Christian Nimmervoll <
> [email protected] <javascript:>> wrote:
>
>> Hi,
>>
>> I run the latest weewx Version on a raspberry 3B+.
>> Everything is fine and working.
>> https://www.wetter-muehlviertel.at/messwerte/
>>
>> Today i put the alarm.py in der Weewx User Directory und start tests.
>>
>> When i try a test like this:
>> PYTHONPATH=/usr/share/weewx python alarm.py /etc/weewx/weewx.conf
>>
>> This is the result:
>>
>> *************************
>> pi@raspberrypi:/home/weewx/bin/user $ PYTHONPATH=/usr/share/weewx python
>> alarm.py /home/weewx/weewx.conf
>> Traceback (most recent call last):
>> File "alarm.py", line 213, in <module>
>> alarm = MyAlarm(engine, config_dict)
>> File "alarm.py", line 97, in __init__
>> self.bind(weewx.NEW_ARCHIVE_RECORD, self.newArchiveRecord) # NOTE 1
>> File "/usr/share/weewx/weewx/engine.py", line 281, in bind
>> self.engine.bind(event_type, callback)
>> AttributeError: 'NoneType' object has no attribute 'bind'
>>
>> *************************
>>
>> I have everything add, according to instructions, in the Weewx - config
>> file.
>> But I do not get an email.
>> What is wrong?
>>
>> --
>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.