***closed*** weather34 for WeatherDisplay (clientraw and WDapi)

I think the WD console is able to correctly compute the last hour rain but for some reason Brian never added it to the clientraw file. I would disagree that it isn’t an important weather detail to display…

I just noticed that w34 was correctly showing last hour rain amount until there was no rain last hour. It has been over an hour since the last rain tip and now w34 is now showing todays total rain amount for last hour rain amount.

The value which is shown comes from the WDapi (which uses metric units). You can inspect all values at . . . /pwsWD/w34_module_test.php click on “Show WDapi values”

rain total last 60 minutes [43] => 0.5

Thanks for that…I will keep an eye on it and see what happens.

I am using dapi for tasks

Sent from my Pixel 2 using Tapatalk

Any reason I can’t bring up pop ups on phone?

Sent from my Pixel 2 using Tapatalk

I agree, too. As niko says, it’s unreasonable to expect a value from the data available in clientraw or api.

Yes, they are to wide. So the CSS suppresses the pop-up’s
All blocks are only displayed one below each other, fitting inside the width of the phone.

I would like to store all data in my local MySQL database to be able to access historical data.
What would be the recommended solution to this?

That question you should ask in another topic or even another forum.
With a question like: “How to store all data from WeatherDisplay in a SQL database”

Probably the answer is to be found on the MeteoTemplate website: Meteotemplate - free weather website template
That template already uses another API from WD to upload all data and stores is in an SQL database.

Success, Wim

Thank you Wim,
I’m already aware of this, but what I’m concerned about is the possibility for a user to see historical data in Weather34 for WD.

Wim,

Still having issues with the popups. The csv files are getting populated, but the cron job does not appear to be erasing the data from the day before. https://www.weather911.net/pwsWD/
Also, getting spikes of data at 00:00 every day. Thanks.


Only the daily csv files seems to be populated, others are empty, do not even exist yet: no 2019.csv or 2019_02.csv

I ran the add-to-year in the browser including error reporting:
…/pwsWD/_test.php?test=w34_cron_addtoyear.php

Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES)
 in /home4/jzinckgr/public_html/pwsWD/w34_cron_addtoyear.php on line 42

same for the clean script

Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES) 
in /home4/jzinckgr/public_html/pwsWD/w34_cron_empty.php on line 37

It seems that your easyweather settings are not correct. At least the midnight cron-jobs are not allowed to access your database.

The big question: are you sure that some script is adding data to your SQL table?

I think no script is doing that. Only two scripts can add data to the sql table.

WDapi which can run at set interval => it behaves like a cron-job also. Or the station-cron

The station-cron displays a message that it does not have to do that.
Your settings seems to be that the WDapi will do that.

But you are using clientraw.txt for your data, not WDapi as is shown in the footer of your page: Data Source: Clientraw C10.37S90

Wim

In easy weather, I have wdapi listed to upload the data. Is this correct? What about which option to use for “live data”? Clientraw or WD API?

Sent from my Pixel 2 using Tapatalk

NO. How does it work:
WeatherDisplay is uploading all kind of data to your website.
For use in the HWS-template you can chose between clientraw.txt and WDapi
=> You have selected clientraw.txt as is shown in the footer of your website page.

For the graphs you can select two sets of data which are not uploaded by WeatherDisplay

  1. If your WD is also uploading to WU => you can use WU to grab the data from for the graphs
  2. If you are a WU-member you have to do it yourself.

To generate the data yourself, you need a script which runs at a set interval.
a. You are NOT using the WDapi so it is not possible to use that one as WD will never start it
b. You use clientraw.txt so you have to use the station-cron-script.

Summary: You use clientraw for your data => WDapi is not possible => only station-cron is the one to use.

Wim

P.S. Probably station-cron will fail to load the sql-table as the other scripts accessing the database fail also.

After looking into this further, it appears my IP address is being blocked by spamhaus and is on the PBL list. Although this doens’t make sense since I can upload WD data to my server without problem. It’s just the mysql that is having issue.

Also, I can’t even get data tables to work with WU and I am using my station ID

You have to change your easyweathersettings from using SQL to using WU Then I can check what the problem is.
BUT: https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KMERAYM03&graphspan=day&year=&format=1
Returns no data, only the header line. You have a typo in your settings.
You typed KMERAYM03 but your WU station is KMERAYMO3 That will solve the WU-graphs

Wim

The Demo site now reflects a Canadian user. I try to test the new EC alert- and forecast-scripts.

Alert not very legible in Dark Theme, but OK in Light.


alert.JPG

Thanks.
@ALL Testing is for me a two stage process.
First I use the light theme and try to get all PHP (script itself, unit conversion) and in-line css (scrolling a.s.o.) correct.
After that I look at how it works in different environments, on an Ipad, with the dark theme a.s.o.
So please post all the remarks but it can take some time before it is changed on the demo site.
Wim

Thanks for catching the station ID typo. Graphs working now, at least using WU. After Feb 15, who knows. Will have to get back to the sql table approach.

The WU graphs should continue to work after Feb 15th since they use the CSV download from the PWS page on WU, not the WU API.

They have said

We’d like to remind our PWS owners/contributors:

Your past data will always be [b]available to you for viewing and download in a web browser on wunderground.com[/b], just as it always has.
If you are in the small minority of people who use the WU API and a corresponding WU API key to obtain data in .json format, here's what's happening:

We'll open a registration page for you to get a new API key to get your data in .json format
You'll sign up and get a new API key for the new API
Once the registration page is open, we'll keep the old API and your old API key active for 2 weeks to allow transition time to your new key

We’ll announce in the forum when the registration page opens.