Erratic pressure readings using homemade (ESP8266, BMP280) sensor and MQTTsubscribe

69 views
Skip to first unread message

Nick Kavanagh

unread,
Oct 27, 2021, 2:36:19 PM10/27/21
to weewx...@googlegroups.com
my station can be found at https://stonecressweather.ddns.net .

I have two sensors for temperature and pressure which both publish to weewx using the mqtt subscribe driver. The program I have running on the sensors takes a reading of pressure and temperature every 10 seconds, keeps a running average of pressure in avgPressure variable, and publishes on mqtt topic every five minutes. My station archive records update every five minutes. Theoretically, both my "Barometer" and "Pressure" values on weewx should be the five minute avgPressure at each unit. If you look at my graphs, however, I am experiencing spikes on both sensors at random points. Having studied serial output from my sensor units, they do not seem to be putting out the spiked reading. Also, according to my program on the sensors, they CAN'T output a significant spike.

I'm not quite sure where to begin looking at weewx to find where the spikes are being introduced to the record and therefore appearing in the graphs. If someone could point me in the general direction, it would be much appreciated. As far as log files, please indicate how long of a time period I should include and I will post them asap.

Thanks
Nick Kavanagh

vince

unread,
Oct 27, 2021, 3:37:02 PM10/27/21
to weewx-user
I'd start by ignoring the graphs (for now) and looking at what your database has in it.  Is the value in the database spiking ?

bell...@gmail.com

unread,
Oct 27, 2021, 4:38:38 PM10/27/21
to weewx-user
I’d run WeeWX from the command line and look at the loop packets and archive records to make sure they look good. Since you are only publishing very 5 minutes and archiving every 5 minutes, I wonder if some archive records have no loop data and therefore WeeWX is calculating it. Any reason you publishing an average instead of letting WeeWX calculate it from the loop packets?
Oh, and what type of payload are you publishing?
rich
Reply all
Reply to author
Forward
0 new messages