Data Import from Weather Display (logfiles)

Post Reply
User avatar
Juan Maria Vilaró
Observer
Observer
Posts: 11
Joined: Sun Sep 17, 2017 8:02 am
Station model: Davis Vantage Vue
Software: Weather Dislplay

Data Import from Weather Display (logfiles)

Post by Juan Maria Vilaró » Thu Jun 08, 2023 4:48 pm

Hello, I request help to import historical data.
I am using Weather display, and I have data from 1/1/2010, I have a WMR200 station and as a server I use "Xammp iy Xnet" the data uploads correctly in the template.
I do the import steps, the "logfiles" are read correctly and before importing I do a test, which confirms that it is OK, then I do the second step, which is to import the file, but it does not read the entire month, maximum 6 or 7 days and of course the data is not uploaded to the "alldata" database, can someone help me or know what the problem could be? thank you so much.

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Data Import from Weather Display (logfiles)

Post by FSC830 » Thu Jun 08, 2023 7:33 pm

Is the actual data from Weather station added to the alldata table?
In which format is the historical data?

If the data is available in csv format you can easily add it to the database.
Mandatory is that the order of fields (values) is matching the alldata table structure.

Regards
Image

User avatar
Juan Maria Vilaró
Observer
Observer
Posts: 11
Joined: Sun Sep 17, 2017 8:02 am
Station model: Davis Vantage Vue
Software: Weather Dislplay

Re: Data Import from Weather Display (logfiles)

Post by Juan Maria Vilaró » Fri Jun 09, 2023 8:30 pm

Yes, the template is correctly updated with the real data, the format of the WD "logfiles" since 2010 we have them in ".txt"
When I do the test, the import program recognizes the lines and the data, responds with OK, but it does not import them into the database, I do not have them in CSV format.
Thanks for your reply

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Data Import from Weather Display (logfiles)

Post by FSC830 » Sat Jun 10, 2023 6:01 am

I did not use the import program until today, I directly added the data in mysql database using mysql commands.
But my data was in .csv format.

Do you have SSH access to your database host and can run mysql commands?
If so, can you attach an example of the .txt format?

Regards
Image

User avatar
Juan Maria Vilaró
Observer
Observer
Posts: 11
Joined: Sun Sep 17, 2017 8:02 am
Station model: Davis Vantage Vue
Software: Weather Dislplay

Re: Data Import from Weather Display (logfiles)

Post by Juan Maria Vilaró » Sat Jun 10, 2023 10:54 am

Hello, good morning, valued collaborator, it is fair to explain things as they are, I particularly have no problems with my Meteotemplate template and everything works correctly, I have a very competent and helpful server, the reality is that I am trying to help a friend that unlike me, its server is "localhost" it uses Xnet to upload the data from Weather Display and Xnet mysql to feed the "data" database and the "alldata" table of meteotemplate, this function correctly updates the template from the year 2020 until today, the problem has arisen when you try to upload your history, I have tried to help you but I get your data to upload to the database despite the fact that no error is detected, I attach a logfile of 12010lg.txt
Thank you very much for your great interest in helping.
Greetings
Attachments
12011lg.rar
(215.07 KiB) Downloaded 28 times

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Data Import from Weather Display (logfiles)

Post by FSC830 » Mon Jun 12, 2023 2:45 pm

Hi,
today I have had some time left and tested the import of your file.
Long story short: importing was successfull, all 44.175 lines have been imported without an issue.
In addition I tried to import the data directly in mysql, which also succeeds with some minor changes in advance.

I did wrote a very short shell script which converts the data from Weather Display into Meteotemplate format (i.e. merge the date/time fields, sort out the fields not used by MT and bring data in an order for direct importing into alldata table).

This works too and at the end I only need to delete a single line with a timestamp 0000-00-00 00:00
Afterwards I dropped the table, created it new and used to import page from MT. After entering the field order the import was done in less than a minute.

Screenshots from testing (I renamed the file to xxx.txt).
Import_01.png
Import_01.png (269.01 KiB) Viewed 357 times
Import_02.png
Import_02.png (26.13 KiB) Viewed 357 times
Import_03.png
Import_03.png (107.45 KiB) Viewed 357 times
Regards
Last edited by FSC830 on Mon Jun 12, 2023 7:04 pm, edited 4 times in total.

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Data Import from Weather Display (logfiles)

Post by FSC830 » Mon Jun 12, 2023 2:47 pm

Here is the result in mysql (cant add a 4th picture in previous post)?
import_CLI_02.png
import_CLI_02.png (25.5 KiB) Viewed 356 times
Regards
Image

User avatar
Juan Maria Vilaró
Observer
Observer
Posts: 11
Joined: Sun Sep 17, 2017 8:02 am
Station model: Davis Vantage Vue
Software: Weather Dislplay

Re: Data Import from Weather Display (logfiles)

Post by Juan Maria Vilaró » Mon Jun 12, 2023 8:28 pm

Thank you very much, I'll try tomorrow, what I don't know is the MYSQL import, and the shell script, taking into account that the person I'm trying to help uses Xammp, how can I do it to import directly, I don't know if it's too much trouble, but it will help I would be extremely grateful if you could teach me how to do it.
Again, thank you very much.
Juan

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Data Import from Weather Display (logfiles)

Post by FSC830 » Tue Jun 13, 2023 3:09 pm

Hi,

attached is an archive with a description and the shell script I used (script is may be a bit oversized, it contains only a few lines) :D .

Be sure that you (and/or the person you tried to help) understand all tasks to avoid any data loss.
Actually I am not very familiar with MariaDB, but as far as I found in Google the import command should be the same. The databases are mainly identical.

If you have the possibility to check all tasks in a test environment this is strongly recommended.
The script runs at my VM about 5-10 minutes to convert the abt. 44.000 records.
If you are using larger files, the time will increase, so dont be worry about that.

Regards

import_data.zip
(127.23 KiB) Downloaded 29 times
Image

User avatar
Juan Maria Vilaró
Observer
Observer
Posts: 11
Joined: Sun Sep 17, 2017 8:02 am
Station model: Davis Vantage Vue
Software: Weather Dislplay

Re: Data Import from Weather Display (logfiles)

Post by Juan Maria Vilaró » Sat Jun 17, 2023 8:44 pm

Dear collaborator, I am very grateful for the interest shown in guiding me, unfortunately my knowledge is somewhat limited in this field, even after having read and translated the "PDF" I am not able to correctly carry out the instructions received, in any case many Thank you for your invaluable help.
Juan

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Data Import from Weather Display (logfiles)

Post by FSC830 » Sat Jun 17, 2023 8:54 pm

Hi Juan,
sad to hear that the PDF is not helping you. :cry: .
At which point exactly do you stuck?

Regards
Image

Post Reply