Weewx v3.7.1, WMR200 and alarms

152 views
Skip to first unread message

bjs...@gmail.com

unread,
Apr 4, 2017, 3:32:46 PM4/4/17
to weewx-user
I just did a clean installation of v3.7.1 on a Raspberry Pi 2 running jessie.  I am getting basic data from the weather station (outdoor temp., barometer, wind, etc.)  I have extra temperature sensors on the system and am trying to get an alarm email when one of them exceeds a certain temperature.  It would be nice to be able to set two alarms--one when the temperature goes up and one when it returns below a point.

I found postings to this group regarding several issues. 

I found this one regarding multiple alarms:

https://groups.google.com/forum/#!msg/weewx-user/-IGQC3CpXAE/0dlEB2SRAAAJ;context-place=forum/weewx-user

And I found this one regarding changes to the WMR200 driver to pick-up data for additional temperature sensors:

https://raw.githubusercontent.com/weewx/weewx/master/bin/weewx/drivers/wmr200.py

I need to get the alarm for one of the extraTempx entries but can't get the alarm to work.  I've tried testing for extraTemp3, temperature_4 to no avail.  I'd be happy to just get an email alarm when the temperature exceeds my value.  When I check the syslog it shows the alarm as set but I never get the alarm to trigger, no matter what temperature level I set.

Any suggestions on what I may be doing incorrectly?  Any new documentation on alarms and the WMR200?

Here are some of the settings I've tried in weewx.conf:

        report_services = weewx.engine.StdPrint, weewx.engine.StdReport, user.alarm.MyAlarm

[Alarm]
    expression = temperature_3 > 51.0
    subject = "Alarm message from weewx--temperature_3"
    time_wait = 3600

expression = locals().has_key('extraTemp2') and extraTemp2 > 51.0
expression.0 = locals().has_key('extraTemp2') and extraTemp2 > 51.0

 

Bill S.


Thomas Keffer

unread,
Apr 4, 2017, 3:38:04 PM4/4/17
to weewx-user
Hello, Bill

If you run weewx from the command line, are you seeing values for extraTempX, where X is 1, 2,  3, etc? This will tell you what values your WMR200 is emitting. Then you'll know what to test for.

expression = locals().has_key('extraTemp2') and extraTemp2 > 51.0
expression.0 = locals().has_key('extraTemp2') and extraTemp2 > 51.0

I'm not sure what you mean by this. Where did these statements come from?

-tk

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bjs...@gmail.com

unread,
Apr 4, 2017, 3:44:48 PM4/4/17
to weewx-user
I was using the first statement from a previous installation of weewx running a different version on ubuntu.  There was an issue where the expression wasn't evaluating correctly without first testing to be sure the value was being passed from the station to weewx.  The second, expression.0 is supposed to allow the alarm module to evaluate multiple alarm settings but doesn't seem to work. 

I need to test from the command line.  Where would I see the values?

Bill
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Thomas Keffer

unread,
Apr 4, 2017, 3:48:29 PM4/4/17
to weewx-user
I need to test from the command line.  Where would I see the values?


bjs...@gmail.com

unread,
Apr 5, 2017, 10:01:18 PM4/5/17
to weewx-user
Not sure what happened to my reply.  Thanks for the suggestion of running via command prompt.  Running that way I was able to find the correct variable I needed to generate the alert.  Do you know of a way to setup multiple alarms?  I tried the setup shown in this post: 

https://groups.google.com/forum/#!msg/weewx-user/-IGQC3CpXAE/0dlEB2SRAAAJ;context-place=topic/weewx-user/r5or_vi5sxk

I got the same result..."No alarm set. 'expression' " error.

Bill S.
Reply all
Reply to author
Forward
0 new messages