Hello everyone,
Part of this is my weakness in python, but:
I'm writing an independent program in python that will calculate irrigation times and durations. To do this it needs information from the WeeWX database such as:
- Total ET for a particular day or time range
- Total rain for a day or time range
- Current rain rate
The current rain rate I can just use MQTT for, but the others require database queries.
I know WeeWX can pull all sorts of queries using tags, but can I use that system from a separate python program? Is it just a simple import? A complex import? Something else entirely?
For instance, in WeeWX $day($days_ago=2).rain.sum gets me what I want. If I can somehow use that in my own program, I would be able to completely remove any need to query the database directly.
But if it's not how python works, oh well.
Thanks!
Seth