Hi I have a fineoffset usb weather station which has been running raspbian 
stretch and weewx 3.9 ok and using alarm.py with no issues.
For weewx 4 I decided to start from fresh, new sd card, new raspbian 
buster, and a fresh weewx install.
After a of couple learner hicups I now have weewx 4 using buster and python 
3 up and running.
However I have hit a wall with alarm.py
If I use expression = "rain > 0.0" then weewx crashes.
If I use expression = "outTemp < 30.0" then weewx keeps running but no 
email is ever received.

So after a search of the forum I found this command
sudo PYTHONPATH=/usr/share/weewx python3 /usr/share/weewx/user/alarm.py 
/etc/weewx/weewx.conf
This ran ok and I got an email

I have attached my weewx.conf and the log from when I start weewx to when 
it crashes using expression = "rain > 0.0".
I have no idea how to get any useful info regarding expression = "outTemp < 
30.0", there doesn't appear to be anything unusual in the log.

Thanks

and again a fantastic program and a great learning experience.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ca5c79a5-c6bc-40d3-b0a0-1915d2929135%40googlegroups.com.



May  8 10:04:31 weatherpi systemd[1]: Starting LSB: weewx weather system...
May  8 10:04:31 weatherpi weewx[2124] INFO __main__: Initializing weewx version 
4.0.0
May  8 10:04:31 weatherpi weewx[2124] INFO __main__: Using Python 3.7.3 
(default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
May  8 10:04:31 weatherpi weewx[2124] INFO __main__: Platform 
Linux-4.19.97-v7+-armv7l-with-debian-10.3
May  8 10:04:31 weatherpi weewx[2124] INFO __main__: Locale is 'en_US.UTF-8'
May  8 10:04:31 weatherpi weewx[2124] INFO __main__: PID file is 
/var/run/weewx.pid
May  8 10:04:32 weatherpi weewx[2128] INFO __main__: Using configuration file 
/etc/weewx/weewx.conf
May  8 10:04:32 weatherpi weewx[2128] DEBUG __main__: Initializing engine
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.engine: Loading station type 
FineOffsetUSB (weewx.drivers.fousb)
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.drivers.fousb: driver version 
is 1.20
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.drivers.fousb: polling mode is 
PERIODIC
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.drivers.fousb: polling 
interval is 60
May  8 10:04:32 weatherpi weewx[2112]: Starting weewx weather system: weewx.
May  8 10:04:32 weatherpi systemd[1]: Started LSB: weewx weather system.
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.drivers.fousb: found station 
on USB bus= device=
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdTimeSynch
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdTimeSynch
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdConvert
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.engine: StdConvert target unit 
is 0x1
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdConvert
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdCalibrate
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdCalibrate
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdQC
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdQC
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.wxservices.StdWXCalculate
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.manager: Daily summary 
version is 2.0
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.wxservices: The following 
values will be calculated: pressure=prefer_hardware, altimeter=prefer_hardware, 
appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, 
cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, 
heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, 
maxSolarRad=prefer_hardware, rainRate=prefer_hardware, 
windchill=prefer_hardware, windrun=prefer_hardware
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.wxservices: The following 
algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.wxservices.StdWXCalculate
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdArchive
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.engine: Archive will use data 
binding wx_binding
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.engine: Record generation will 
be attempted in 'software'
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.engine: Using archive interval 
of 300 seconds (software record generation)
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Use LOOP data in 
hi/low calculations: 1
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdArchive
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.restx.StdStationRegistry
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.restx: StationRegistry: 
Station will not be registered: no station_url specified.
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.restx.StdStationRegistry
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.restx.StdWunderground
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.restx: Wunderground: Posting 
not enabled.
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.restx.StdWunderground
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.restx.StdPWSweather
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.restx: PWSWeather: Data for 
station therocks will be posted
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.restx.StdPWSweather
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.restx.StdCWOP
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.restx: CWOP: Posting not 
enabled.
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.restx.StdCWOP
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.restx.StdWOW
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.restx: WOW: Posting not 
enabled.
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.restx.StdWOW
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.restx.StdAWEKAS
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.restx: AWEKAS: Posting not 
enabled.
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.restx.StdAWEKAS
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
user.mqtt.MQTT
May  8 10:04:32 weatherpi weewx[2128] INFO user.mqtt: service version is 0.22
May  8 10:04:32 weatherpi weewx[2128] INFO user.mqtt: binding to loop
May  8 10:04:32 weatherpi weewx[2128] INFO user.mqtt: topic is weewx/weather
May  8 10:04:32 weatherpi weewx[2128] INFO user.mqtt: desired unit system is 
METRIC
May  8 10:04:32 weatherpi weewx[2128] INFO user.mqtt: data will be uploaded to 
mqtt://192.168.1.120:1883/
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service user.mqtt.MQTT
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdPrint
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdPrint
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
weewx.engine.StdReport
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service weewx.engine.StdReport
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Loading service 
user.alarm.MyAlarm
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.manager: Daily summary 
version is 2.0
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.manager: Daily summary 
version is 2.0
May  8 10:04:32 weatherpi /weewxd: alarm: Alarm set for expression: 'rain > 0.0'
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Finished loading 
service user.alarm.MyAlarm
May  8 10:04:32 weatherpi weewx[2128] INFO __main__: Starting up weewx version 
4.0.0
May  8 10:04:32 weatherpi weewx[2128] DEBUG weewx.engine: Station does not 
support reading the time
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.engine: Using binding 
'wx_binding' to database 'weewx.sdb'
May  8 10:04:32 weatherpi weewx[2128] INFO weewx.manager: Starting backfill of 
daily summaries
May  8 10:04:33 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: get 3263 
records since 2020-05-08 00:02:30
May  8 10:04:33 weatherpi weewx[2128] INFO weewx.drivers.fousb: synchronising 
to the weather station (quality=1)
May  8 10:04:34 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: status 
{'rain_overflow': 0, 'lost_connection': 0, 'unknown': 0} (0)
May  8 10:05:18 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: new data
May  8 10:05:18 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: setting sensor 
clock 30.824
May  8 10:05:18 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: live 
synchronised
May  8 10:05:18 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: packet 
timestamp is 00:05:18
May  8 10:06:03 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: avoid 
5.904364585876465
May  8 10:06:10 weatherpi weewx[2128] INFO weewx.drivers.fousb: unstable read: 
blocks differ for ptr 0x0006c0
May  8 10:06:10 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: new data
May  8 10:06:10 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: packet 
timestamp is 00:06:06
May  8 10:06:52 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: avoid 
5.774796485900879
May  8 10:06:58 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: new data
May  8 10:06:58 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: packet 
timestamp is 00:06:54
May  8 10:07:40 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: avoid 
5.767025709152222
May  8 10:07:46 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: new data
May  8 10:07:46 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: packet 
timestamp is 00:07:42
May  8 10:08:28 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: avoid 
5.6081907749176025
May  8 10:08:34 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: new data
May  8 10:08:34 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: packet 
timestamp is 00:08:30
May  8 10:09:01 weatherpi CRON[2174]: (root) CMD (  [ -x 
/usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then 
/usr/lib/php/sessionclean; fi)
May  8 10:09:07 weatherpi weewx[2128] INFO weewx.drivers.fousb: unstable read: 
blocks differ for ptr 0x0006c0
May  8 10:09:10 weatherpi systemd[1]: Starting Clean php session files...
May  8 10:09:11 weatherpi systemd[1]: phpsessionclean.service: Succeeded.
May  8 10:09:11 weatherpi systemd[1]: Started Clean php session files.
May  8 10:09:14 weatherpi weewx[2128] ERROR weewx.drivers.fousb: changing data 
format from 1080 to 3080
May  8 10:09:14 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: new ptr: 
0006c8 (0006b4)
May  8 10:09:14 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: setting 
station clock 14.3616
May  8 10:09:14 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: log 
synchronised
May  8 10:09:14 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: packet 
timestamp is 00:09:14
May  8 10:09:14 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: synchronised 
to 2020-05-08 00:09:14 for ptr 0x06b4
May  8 10:09:14 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: avoid 
2.8105783462524414
May  8 10:09:17 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: avoid 
4.459248304367065
May  8 10:09:22 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: found 2 
archive records
May  8 10:09:22 weatherpi weewx[2128] DEBUG weewx.drivers.fousb: returning 
archive record 1588896254
May  8 10:09:22 weatherpi weewx[2128] INFO weewx.manager: Added record 
2020-05-08 10:04:14 AEST (1588896254) to database 'weewx.sdb'
May  8 10:09:23 weatherpi weewx[2128] INFO weewx.manager: Added record 
2020-05-08 10:04:14 AEST (1588896254) to daily summary in 'weewx.sdb'
May  8 10:09:23 weatherpi weewx[2128] INFO weewx.engine: Main loop exiting. 
Shutting engine down.
May  8 10:09:23 weatherpi weewx[2128] DEBUG weewx.restx: Shut down MQTT thread.
May  8 10:09:23 weatherpi weewx[2128] INFO weewx.restx: PWSWeather: Published 
record 2020-05-08 10:04:14 AEST (1588896254)
May  8 10:09:23 weatherpi weewx[2128] DEBUG weewx.restx: Shut down PWSWeather 
thread.
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__: Caught unrecoverable 
exception:
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****  '>' not 
supported between instances of 'NoneType' and 'float'
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****  Traceback 
(most recent call last):
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewxd", line 154, in main
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      
engine.run()
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 158, in run
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      
self.dispatchEvent(weewx.Event(weewx.STARTUP))
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      
callback(event)
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 530, in startup
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      
self._catchup(self.engine.console.genStartupRecords)
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 643, in _catchup
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      
origin='hardware'))
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      
callback(event)
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"/usr/share/weewx/user/alarm.py", line 119, in new_archive_record
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****      if 
eval(self.expression, None, record):                       # NOTE 3
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****    File 
"<string>", line 1, in <module>
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****  TypeError: 
'>' not supported between instances of 'NoneType' and 'float'
May  8 10:09:23 weatherpi weewx[2128] CRITICAL __main__:     ****  Exiting.

Attachment: weewx.conf-10-5-20
Description: Binary data

Reply via email to