visualize past and zoomed weather data out of db

152 views
Skip to first unread message

kede...@gmail.com

unread,
Feb 19, 2022, 5:03:45 PM2/19/22
to weewx-user
Hello,

perhaps there is already a solution here for my problem but searching with keywords doesn't give me any results.

Using WeeWX since several years I am able to have diagrams of the last day(s), last week, last month and the last year.

But if I want to look at a special date in past for specified period of time I have no tool to zooming those data out of my local database and visualize them.

For example in January the vulcano Hunga-Tonga-Hunga-Ha'apai had an eruption that sends a pressure wave around the world witch was detected by all weatherstations. But I have no chance to focuse on that event.

Storing weatherdata for several years in a database on a SD-Card may not be necessary if I am not flexibel in data requests.

Any idea?

Kind regards
Klaus

Tom Keffer

unread,
Feb 19, 2022, 5:22:48 PM2/19/22
to weewx-user
The only thing WeeWX offers is the ability to generate a report for any timestamp. So, for example,

wee_reports /etc/weewx/weewx.conf 1642327200

gives a pretty good rendition for my location. You may have to experiment with different timestamps.

image.png

--
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/916fb4ea-c001-4e5b-9b5e-2d6bab352b05n%40googlegroups.com.

kede...@gmail.com

unread,
Feb 28, 2022, 7:50:30 AM2/28/22
to weewx-user
Thank you, Tom!

morr...@gmail.com

unread,
Feb 28, 2022, 6:30:08 PM2/28/22
to weewx-user
Also, we had a flurry of activity discussing this in the week after the event. I started and had help from the community in developing a script specific to the eruption.



P.S. Tom at al, please let me know if this sort of response is inappropriate here.

f4n...@gmail.com

unread,
Mar 1, 2022, 5:12:38 AM3/1/22
to weewx-user
Are there also yearly graph reports from past years possible or just daily?

Karen K

unread,
Mar 1, 2022, 5:17:45 AM3/1/22
to weewx-user
That command line, Tom gave, creates all the other plots, too.

f4n...@gmail.com

unread,
Mar 1, 2022, 6:03:27 AM3/1/22
to weewx-user
Now i get it, thanks

f4n...@gmail.com

unread,
Mar 1, 2022, 6:13:18 AM3/1/22
to weewx-user
Since i used it, i get following error even when i restart weewx:

Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx_sdr
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.reportengine.FtpGenerator'
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****  unsupported pickle protocol: 3
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****      obj.start()
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 378, in start
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****      self.run()
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 429, in run
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****      n = ftp_data.run()
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 100, in run
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****      timestamp, fileset, hashdict = self.get_last_upload()
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/ftpupload.py", line 241, in get_last_upload
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****      timestamp = cPickle.load(f)
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****  ValueError: unsupported pickle protocol: 3
Mar  1 12:11:37 raspi-wsdi1b weewx-weewx-sdr[8548] ERROR weewx.reportengine:         ****  Generator terminated

And the files on the FTP are getting no longer refreshed, only if i let run wee_report manually. What happened?

Tom Keffer

unread,
Mar 1, 2022, 6:22:18 AM3/1/22
to weewx-user
NB: the program wee_reports will run all reports in weewx.conf, including FTP. That means the files it generates will get uploaded. That may not be what you want.

In any case, the file #FTP.last holds information about the last upload of each file. This is used to minimize the amount of FTP traffic.

I'm just guessing, but it's possible that you're using a different version of Python for weewxd than wee_report. The Python 2 protocol may be incompatible with the Python 3 protocol.

Try deleting the file. You'll find it in /var/www/html. It will be regenerated again. And, make sure you're using the same version of Python for both programs.

-tk

--
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.

f4n...@gmail.com

unread,
Mar 1, 2022, 6:40:05 AM3/1/22
to weewx-user
That was it (the #FTP.last), thanks a lot for your fast help!

How can I tell it to use a certain python version? Just in case if that would be the case

Tom Keffer

unread,
Mar 1, 2022, 6:50:19 AM3/1/22
to weewx-user
I usually specify the python version explicitly, rather than rely on the "hash bang" in the application's file.

python3 /usr/share/weewxd

rather than

/usr/share/weewxd

or

weewxd

That way, you know exactly what you're getting.




f4n...@gmail.com

unread,
Mar 1, 2022, 7:49:55 AM3/1/22
to weewx-user
can this be done separately for multiple weewx instances? so, could i start one instance with python3 and the other with python2? Would I have to add the conf path?

Tom Keffer

unread,
Mar 1, 2022, 9:00:48 AM3/1/22
to weewx-user
WeeWX can use either version of Python. You just have to make sure the requisite dependencies are installed for both.

Reply all
Reply to author
Forward
0 new messages