Good evening. Much appreciated for your help. Most of ..works well. One more question. I’ve got a lot *zip backup files on win pc ( 2016-2025) is that possible to convert or somehow to insert in by sql server( phpmyadmin works perfekt). Thanks in advance
There’s no standard way to do that.
It depends on the format of the data in the ZIP files. If it’s known and readable then you could write a script/program using your favourite language to convert the data into SQL commands that can be loaded into the database.
I did that for a lot of data going back to the late 1970’s. It’s not a trivial job though because you’re likely to find data discrepancies that will need to be resolved, e.g. temperatures that have somehow been recorded as -120C or +325C (perhaps a missing decimal place).
Thank you. thougt its much simper sad
If you can show us a little bit of data from one of the files someone may reconise the format and have an idea of how you could upload it to your database.
Hi, thanks for your offer. Dont know if any private data in it, is that possible i send you PM just to show ?
I split the thread because it’s a different discussion now.
I’ve looked at your data and it’s a set of monthly Weather Display data files, probably from a PC version?
The following doesn’t give answers, but a series of questions/thoughts because I don’t have the answer myself, but other users might be able to help with answers some of these. I’ve not used the WD MySQL functionality recently. I experimented with it when it was added to WD about 20 years ago so my memory is now a little limited on how it works.
-
I’m fairly sure that the consolewd and PC WD log files are the same format. Look in the consolewd directories for files with the same name format as in your archive files - just with differing month/years in the names. Any log/data files that have similar names can probably be extracted from archive and added into the consolewd data file directory and then used by consolewd.
-
I know that consolewd can add data to MySQL in real time, but I don’t know if it has a function to load historic data into the database table. However, I’m fairly sure that the full version of WD can load historic data from the log/data files into MySQL. I’m also fairly sure that the MySQL table format used by PC/Linux/Mac/consolewd is the same. So an option might be to temporarily load the PC version of WD (or maybe the Linux version), put your archive files back in place, load MySQL from the historic WD data and then export the MySQL table data into a SQL file for import into your Raspberry Pi database. You could also probably point the PC WD version directly at the Pi database and do the update across the network, but sometimes getting MySQL to work across a network connection can be tricky.
Sorry that I can’t give you definitive answers, but maybe this will give you some suggestions on a way forward?
Hi, thanks a lot for Explanation. I will try to do it today / tommorow. Kind Regards
Hi Chris. I managed to download/insert 1.34 Gb data from old Laptop to Rpi 5 mysql database. Thanks a lot one more time !!! Two things more. First why isnt any historical data on webpage to see ( Schleswig-Holstein Deutschland Home Weather Station (wd version)), if mysql worked perfect. And second is that possible to send data for AVEKAS, in config file cant do this. Regards
Well done on solving another problem
The web template you’re using (PWS Dashboard) maintains it’s own history based on data arriving in real time. I believe it’s possible to update records manually, but I’m not a PWSD expert so I can’t easily advise on how you’d do that.
I don’t believe consolewd has the functionality built in to update AWEKAS. It certainly didn’t (according to the author) in 2020 and I don’t think it’s been added since. I’ve never used Awekas so I don’t know if it’s possible to create a script to do that for yourself on the Raspberry Pi, or how complicated it would be if you could do that. You could also try emailing the WD author (Brian - [email protected]) to ask if adding Awekas functionality into consolewd would be possible.
Are you running the cron job? see 11_cron.pages
Your mysql data is not used by PWS_Dashboard. I have no idea who told you so.
With PWS_Dashboard the high-lows are calculated with the 5 minute cron-job.
If you do not want to run a (free) cron-job, you should customise the settings to not display high-lows.
PLEASE read the documentation.
No High/Lows, where is history and graphs data used for, and ? cron?
The cron-job also checks the age and updates all external-file downloads. This can be checked in your status-popup.
You can do that with most of the weather-programs. I assume your WeatyherDsiplay program will do that for you.
Or if you not (want to) use a weather-program:
- you need to set your Awekas credentials in the you PWS_upload_to_others.php script. Lines 28-30 need yo have the correct information, currently they are not set.
- You need to run the cron-job every 5 minutes as the cron-job will execute the PWS_upload_to_others.php script.
Succes,
Wim
Hi Wim. Thank you. For AVEKAS line 28-30 set as described. What about mysql server: One runs on my Rasberry and all data stored, can see in myphpadmin. But i thought it will automatc upload all data to website, its not. Thats why i wrote sql works “perfect”. Another possibility to store data is sql server my website provider. But how to upload data to mysql servers first or second. How to start cron-job( read your pdf). Where can i put adress from sql server in settings. Is anywehre step by step help how to do this?
How to setup cron-job for consolewd programm. Sorry its not that simple for me. Thank you
Sorry, there is no code to access a SQL data server.
And i have no idea what you want to use or wnat to do with that data.
PWS_Dashboard is a set of scripts which
- displays recent data from a weatherdevice / weatherprogram
- displays high-lows
2.1 as received from a weather-program
2.2 or calculated using the cron-script every 5 minutes - loads external data such as METAR(= airport) , earthquakes, weather forecasts.
- loads historical data from your WeatherUnderground account.
In my eyes that is a lot.
And as I have no idea what you want to accomplish or whatever data you need.
So I can not help you with this.
If you want to use other data-sets please develop extra scripts or ask an IT student.
But even external help needs
- a clear description what your SQL data contains and
- what you want to do with that data
Sorry and succes with your adventure,
Best regards,
Wim
HI Wim, probably. was wrong explanation. Would you please tel me step by step how can i set up cron job in my case, mysql was a bad idea. 2 years ago did it with weather display program…was easer. Now just dont know how to do it
I don’t know of any weather templates that are driven by the WD MySQL data. MySQL is usually used when you have your own web site that you want to access the data on, i.e. bespoke code, or where you want to do additional analysis of the data.
I see. I thought i need a sql server, totaly wrong.
First start with making an account on a free cron-job server.
Most users start with cron-job.org
At the cronjob.org website you will have dashboard which shows all cron-jobs you will have.
- Click tt the top right button “Create . . .”
On the next pnswer the few questions:
2. URL of the job https://lentfoehrden-wetter.de/PWS_cron_stationcron.php
3. Frequency → every 5 minutes
4. Click create
The cron job will display its results on the Cron-job.org Dashboard from Step 1.
Than you Wim, didnt see what you postet, tried with my provider but its no possibilitites every 5 min, will make it on cronjob.org
No, that is not wrong. It is “outdated”
In the first version of the weather34 template the 5 minute data was stored in a sql-table on the web-server, with a cron-job.
Just before midnight the high-lows were calculated with another cron-job.
And the todays data was deleted just after midnight with a third cron-job.
As PWS_Dashboard is based on that fine code developed by Brian Underdown there has been requirements in the WD version of weather34 also.
But that is a long time ago and as creating / maintaining SQL is a more complex task, all weather34 versions and derived pwsWD, pwsXX versions de-activated two of the three cron-jobs and use simple text-files for the historical values.
Wim
Or you could use a German free server