Adding manual observations

85 views
Skip to first unread message

Bob Atchley

unread,
Mar 9, 2020, 5:28:12 PM3/9/20
to weewx-user
I wrote my own software for my aged ws2300 (c++ for the ws2300 interface, php for web) and as I prepare to go down the weewx route for my new weather station one of the things I'm going to miss is the ability to add simple manual observations:

Screenshot_2020-03-09_19-16-34.png










So generally simple tick boxes to record the things that weather stations (at least that I can afford) are not good at recording with a field to note down anything of particular interest.

I've checked the skins, but I can't see anything like this (to my surprise).  I'm hoping I've missed something - has anyone here seen anything like this for weewx ?

Thanks

Bob

gjr80

unread,
Mar 10, 2020, 11:16:44 PM3/10/20
to weewx-user
Hi,

No you have not missed anything, there is no built in mechanism in WeeWX for adding manual observations. The closest thing is to use some SQL or a GUI based tool (eg DB Browser for SQLite) to add data to the archive database. After adding any manual observations the daily summary tables for any affected days would then need to be rebuilt using the wee_database utility. Note that care needs to be taken when editing the SQLIte archive table to ensure you don't introduce null strings.

If you do go down this path it is probably worth familiarising yourself with the database structure used by WeeWX. Certainly when first starting out backups are the go.

Gary

William Burton

unread,
Mar 20, 2020, 12:05:36 AM3/20/20
to weewx-user
Hello Bob,

I'm rather new to WeeWX but here are my observations. As I'm sure you know, observations from hardware are recorded in the WeeWX database as "loop" packets which are close to raw data depending on how the hardware makes its data available. Every five minutes (default interval), WeeWX aggregates these loop packets into an archive record. From the archive records, summaries are then created for daily and weekly timeframes and so on.

The challenge with manual observations is that they are sporadic and don't fall into the regular data collection model used by WeeWX. However, WeewX is very flexible in the way it can be customized so with some effort, it should be possible to extend it for your purposes.

WeeWX normally only writes to its archive database which by default uses the SQLite database engine. However, WeeWX supports adding additional databases that are either SQLite or MySQL with custom data that can be used to collect data from additional sources, so a separate observation database could be created and integrated with WeeWX. Here are some suggestions on how this could work:
  1. Create an observation database and observation table using MySQL as it supports multiple clients accessing it simultaneously.
  2. Modify your web form so the PHP page writes observation data to this observation database table.
  3. Configure weewx.conf to connect to this observation database in addition to the existing archive database.
  4. Modify the skin you're using to display the observation data for the relevant time period.
As part of this effort, you'll have to determine if you need to summarize your observation data for some time period or just report as-is from the raw data.

Note that the above steps are a rough outline and not a detailed list of tasks.

Hope this helps,
-Bill
Reply all
Reply to author
Forward
0 new messages