Weewx SQLite storage

82 views
Skip to first unread message

Rui Pinto

unread,
Jul 3, 2019, 10:10:58 AM7/3/19
to weewx-user
Hi!! I have a Davis Vantage Pro2 station and i'm using Weewx to save data aswell as displaying it using MQTT, Influxdb and Grafana.

I'm using a raspberry PI to connect to the station and I Weewx it's installed in the raspberry pi. The influx database is on another machine.
But Weewx stores automatically in a SQLite database locally, in other words, on the raspberry pi.

I want to store in a SQLite also, don't get me wrong but i don't want to store that data on the SD Card of the RaspberryPI, i instead want to store on a hard drive.

Is it possible to specify to the Weewx software where i want to save the SQLite Database?

Thank you.
Best Regards.

Ameya Chilukuri

unread,
Jul 3, 2019, 10:26:36 AM7/3/19
to weewx-user
Hi Rui Pinto,


I am assuming that you have installed WeeWX using the debian packages. If that is so, then in the folder: /etc/WeeWX
You will find the WeeWX.conf file.
NOT the WeeWX.conf.dist file.

Open the WeeWX.conf file (with sudo privileges).
At the bottom of the document, in the last-but-one section, you will find [DatabaseTypes].
In [[SQLite]] sub-section, you have:
        SQLITE_ROOT = /var/lib/weewx

This is my guess (Sorry), but if you have a database ready elsewhere, you can simply change the address in the above line and your data will be written to your specified location.

vince

unread,
Jul 3, 2019, 10:38:31 AM7/3/19
to weewx-user
On Wednesday, July 3, 2019 at 7:10:58 AM UTC-7, Rui Pinto wrote:
Is it possible to specify to the Weewx software where i want to save the SQLite Database?



Personally, I'd just use a symlink to point /home/weewx/archive to a location on the hard drive.

This is for setup.py installations. If you used a dpkg installation, the location it saves the sqlite db is a little different.

You might also look in weewx.conf for a SQLITE_ROOT parameter very close to the bottom of the file, and use an absolute path there.

Rui Pinto

unread,
Jul 9, 2019, 11:25:21 AM7/9/19
to weewx...@googlegroups.com
Thank you for answering!! 

I have another question... 
Is it possible ti know through the weather console data, the batterry live of the console?

Thank you.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b0461ba9-5f7b-4367-a998-62bbbd098b35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gjr80

unread,
Jul 9, 2019, 5:28:22 PM7/9/19
to weewx-user
Hi,

I am not sure quite what you are asking. If you have a Davis station with a console the console battery voltage should be stored in your archive in the consBatteryVoltage field. You should be able to use consBatteryVoltage in any reports just as you do outTemp, barometer etc. You should also be able to use it with MQTT and your other external services as well. If you are asking about the console battery life that is somewhat subjective, or perhaps you are asking something else?

Gary

Reply all
Reply to author
Forward
0 new messages