#!/bin/bash
pressure=$(curl -fs http://192.168.0.150/ | grep -o -P '(?<=PRESSURE: ).*(?= Inch</p><p>)')echo pressure=$pressure > /var/tmp/pressure.txtpressure=29.06
<td class="label">Barometer</td>Jan 6 01:56:44 weewx systemd[1]: Started LSB: weewx weather system.Jan 6 01:56:44 weewx weewx[4911]: engine: Using configuration file /etc/weewx/weewx.confJan 6 01:56:44 weewx weewx[4911]: engine: Loading station type FileParse (user.fileparse)Jan 6 01:56:44 weewx weewx[4911]: fileparse: data file is /var/tmp/pressure.txtJan 6 01:56:44 weewx weewx[4911]: fileparse: polling interval is 300.0Jan 6 01:56:44 weewx weewx[4911]: fileparse: label map is {}Jan 6 01:56:44 weewx weewx[4911]: engine: StdConvert target unit is 0x1Jan 6 01:56:44 weewx weewx[4911]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardwareJan 6 01:56:44 weewx weewx[4911]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RSJan 6 01:56:44 weewx weewx[4911]: engine: Archive will use data binding wx_bindingJan 6 01:56:44 weewx weewx[4911]: engine: Record generation will be attempted in 'hardware'Jan 6 01:56:44 weewx weewx[4911]: engine: Using archive interval of 300 seconds (specified in weewx configuration)Jan 6 01:56:44 weewx weewx[4911]: engine: Using binding 'wx_binding' to database 'weewx'Jan 6 01:56:44 weewx weewx[4911]: manager: Starting backfill of daily summariesJan 6 01:56:44 weewx weewx[4911]: restx: StationRegistry: Registration not requested.Jan 6 01:56:44 weewx weewx[4911]: restx: Wunderground: Posting not enabled.Jan 6 01:56:44 weewx weewx[4911]: restx: PWSweather: Posting not enabled.Jan 6 01:56:44 weewx weewx[4911]: restx: CWOP: Posting not enabled.Jan 6 01:56:44 weewx weewx[4911]: restx: WOW: Posting not enabled.Jan 6 01:56:44 weewx weewx[4911]: restx: AWEKAS: Posting not enabled.Jan 6 01:56:44 weewx weewx[4911]: engine: Starting up weewx version 3.9.2Jan 6 01:56:44 weewx weewx[4911]: engine: Starting main packet loop.Jan 6 02:00:01 weewx CRON[4923]: (mt-dev) CMD (/home/mt-dev/pressure.sh)Jan 6 02:01:44 weewx weewx[4911]: manager: Added record 2020-01-06 02:00:00 UTC (1578276000) to database 'weewx'Jan 6 02:01:44 weewx weewx[4911]: manager: Added record 2020-01-06 02:00:00 UTC (1578276000) to daily summary in 'weewx'Jan 6 02:01:45 weewx weewx[4911]: cheetahgenerator: Generated 8 files for report SeasonsReport in 0.77 secondsJan 6 02:01:46 weewx weewx[4911]: imagegenerator: Generated 28 images for SeasonsReport in 1.14 secondsJan 6 02:01:46 weewx weewx[4911]: copygenerator: copied 5 files to /var/www/html/weewx
[Station] station_type = FileParse
[FileParse] driver = user.fileparse path = /var/tmp/pressure.txt poll_interval = 300
[DataBindings] [[wx_binding]] database = archive_mysql
[[MySQL]] driver = weedb.mysql host = localhost user = weewx password = ...
This will show you only the loop packets emitted by the fileparse driver, this is exactly what fileparse passes to WeeWX when WeeWX is run. If correct data is being emitted by the fileparse driver then you need to look at WeeWX itself, if incorrect or no data is being emitted then you have an issue with the driver and it's processing of/acces to the raw data. Gary |
mt-dev@weewx:~$ PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/fileparse.py2020-01-06 20:32:35 EST (1578360755) {'pressure': 29.17, 'usUnits': 1, 'dateTime': 1578360755}mt-dev@weewx:~$ sudo weewxd /etc/weewx/weewx.confLOOP: 2020-01-06 20:18:09 EST (1578359889) altimeter: 30.1414615854, dateTime: 1578359889, maxSolarRad: None, pressure: 29.17, rainRate: 0, usUnits: 1LOOP: 2020-01-06 20:23:09 EST (1578360189) altimeter: 30.1414615854, dateTime: 1578360189, maxSolarRad: None, pressure: 29.17, rainRate: 0, usUnits: 1REC: 2020-01-06 20:20:00 EST (1578360000) altimeter: 30.1414615854, dateTime: 1578360000.0, ET: None, interval: 5, maxSolarRad: None, pressure: 29.17, rainRate: 0.0, usUnits: 1LOOP: 2020-01-06 20:23:09 EST (1578360189) altimeter: 30.1414615854, dateTime: 1578360189, maxSolarRad: None, pressure: 29.17, rainRate: 0, usUnits: 1-rw-r--r-- 1 root root 17K Jan 6 20:23 index.htmlGary