Using WeeWX with CSV or MySQL as data source

114 views
Skip to first unread message

m...@philrudz.com

unread,
Oct 27, 2018, 3:58:52 PM10/27/18
to weewx-user
I've searched around and can't determine whether this is possible. I run a pretty sophisticated Campbell Scientific based station; I'd like to use WeeWX as a premade solution for data presentation and aggregation/archiving.I can get data from the Campbell Scientific logger in all manner of intervals or formats (for example a 30 second CSV file of all data), but I can't figure out whether WeeWX can poll a file for data input, or if I can somehow automate this using the CSV import extension, which seems to be designed for a onetime archival import. Any help would be appreciated, otherwise I'm going to make some on my own (MySQL and PHP etc.)

vince

unread,
Oct 27, 2018, 4:07:45 PM10/27/18
to weewx-user
On Saturday, October 27, 2018 at 12:58:52 PM UTC-7, m...@philrudz.com wrote:
I've searched around and can't determine whether this is possible. I run a pretty sophisticated Campbell Scientific based station; I'd like to use WeeWX as a premade solution for data presentation and aggregation/archiving.I can get data from the Campbell Scientific logger in all manner of intervals or formats (for example a 30 second CSV file of all data), but I can't figure out whether WeeWX can poll a file for data input, or if I can somehow automate this using the CSV import extension, which seems to be designed for a onetime archival import. Any help would be appreciated, otherwise I'm going to make some on my own (MySQL and PHP etc.)

If you're willing to write a driver or extension, it can do anything you can dream up almost.

For example, I have one sensor setup on a raspi that writes a JSON-formatted data file out periodically. I have a weewx extension that queries that file via essentially a http GET, and loads a custom weewx db with that data.   Other folks use MQTT to load stuff.  There are a 'lot' of ways to get there. 

gjr80

unread,
Oct 27, 2018, 6:10:09 PM10/27/18
to weewx-user
Vince is right, you can more or less do anything by writing your own driver, though it likely will take the most effort. In terms of csv type import you are right that the csv import capabilities of wee_import are designed for one off import of data, not ongoing regular reading of data. You might be able to use the fileparse driver. It is included as an 'example' in the weeWX code and is not listed in the wiki list of drivers. You will find it in your weeWX install, where depends on your install type; /home/weewx/examples for setup.py, /usr/share/doc/weewx/examples for .deb, /usr/share/doc/weewx-x.y.z/examples for redhat/suse or Users/Shared/weewx/examples for mac.

Gary

rutabagaist

unread,
Oct 27, 2018, 7:39:31 PM10/27/18
to weewx-user
Thank you for the quick replies, just as I checked on this thread, I also found a reference to fileparse in the customization wiki as well as the other forum (weewx-development)... I think I'm on the right track - my Python knowledge is minimal, but how hard can it be, right :)

Steve Shuff

unread,
Oct 3, 2019, 7:16:44 AM10/3/19
to weewx-user
Hi, I just read your post regarding the Campbell scientific station, Did you make any progress ? I have a cr1000 based station with multiple sensors and would be very interested in using Weewx with the setup.
Reply all
Reply to author
Forward
0 new messages