New user and install

Hi there, Ive just getting my head around installing the PWS dashboard and most of it working except the high and lows which im looking into.

When I click on the little check box right at the bottom where it says API, theres a few things missing, could anyone tell me what they are?

Website located here https://carstairs-weather.ca/

I’ve never done anything this complicated before, so I’m amazed I’ve got this far!

Hi.
1st thing have you got cron job running? as this will update all the info in this file.
11_cron.pages (pwsdashboard.com)

1 Like

See previous answer for the high-low values

Currently your site has a 500 error.

Fatal error : Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /home/cyupco15/public_html/PWS_livedata.php:1952 Stack trace: #0 /home/cyupco15/public_html/PWS_index2.php(30): include() #1 /home/cyupco15/public_html/index.php(38): include(‘/home/cyupco15/…’) #2 /home/cyupco15/public_html/_test.php(17): include(‘/home/cyupco15/…’) #3 {main} thrown in /home/cyupco15/public_html/PWS_livedata.php on line 1952

You selected in easyweathersetup to use weatherflow for lightning.
But the recent file of [station_id] => 67776 Town of Carstairs has this as contents:

[status_message] => SUCCESS - Either no capabilities or no recent observations

That is a new one for me.
When there is no data the it is still called SUCCESS.

I will adept the livedata script later on today.

Wim

1 Like

Adapted PWS_livedata.php to check “SUCCESS” weatherflow data without contents.
$scrpt_vrsn_dt = ‘PWS_livedata.php|01|2023-07-18|’; # invalid SUCCESS + . . .

PWS_livedata.php.zip (17.3 KB)

Wim

Thanks for the reply, I believe I have the cron set up correctly, is there a way to quickly check its working?


the tech support guys say the cron job is working and the path is correct, could it be that i havent got the install in the correct folder?

I have all the files extracted in the public html folder, is that correct?

As long as your website is not on-line one cannot check if all files are recent.

There is a debug-console . . . /pwsWD/PWS_module_test.php where you can check the contents and age of all files.

Wim

1 Like

sorry, I was just reinstalling to see where my problem lies.

Its live now

It seems the cron job is not running as the history file is not updated.
High-lows for today are not updated.
All data for today is at 1:36 pm

Are you sure the cron-job is set to every 5 minutes?

Wim

ive set it to 1 min as im trying to test and not patient enough to wait 4 minutes

If I manually enter

www.cartairs-weather/PWS_cron_stationcron.php

it performs the task immediately.

according to the hosting company its running the cron jobs and showed me their logs…

So im at a loss where to go now?

Very strange log.
Who is your provider? I want to find a description of their “How-To cron-setup”.
if whc.ca (WebHostingCanada) this is how it should done

Cron Jobs / Automated Tasks - Knowledgebase - WHC.CA

Normally a cron log shows the returned texts, this is some list of whatever.
It shows what is started but not what the result is.

Three different commands without the succes or error codes?
Those 3 lines are very different, to say the least, so how do we know which one is correct?

When testing, most providers will sent you an e-mail or put the results in a file to check

To Do:

  • Reread the providers documentation and/or post the URL to that documentation here
  • Use only one cron-setup at your provider not two or three ( “log” shows 2 crons at for 17:45:01)
    Check if there is a good result (10 minutes wait) and if not adept the cron-setup.

If that not helps, quit using the “providers” cron setup and use an free cron service-provider
These two i have not heard any complaints.

https://cron-job.org/en/

https://www.cronjob.de in German only

Multiple others also when using Google-search, most are fine but read the discussions
For 1 cron every 5 minutes some external cron-providers provide that for free


@ALL 8 hours Time difference Hope some help is available more local to your place

Wim

1 Like

Hi
I use the one above that Wim has said for my website cron jobs and they run every 10 mins

1 Like

I use WHC.CA for my host. If he is using WHC.CA, I will post a copy of my cronjobs tonight when I get home

1 Like

Thanks: :slightly_smiling_face:
Just 1 cronjob is needed for the current release of PWS-Dashboard.
Only the every 5 minute station cron.
There were two others in the first release, but they are not needed anymore.

Wim

thanks all, very much appreciate your inputs.

The reason there was a few cron jobs is because I’d tried a few different options after getting different advice from the tech support at WHC hosting, I added a few to see if one of them worked.

I will try the cron job provider instead.

cron-job.org seems to be working pretty good, thanks for the advice.

heres the only issues at the moment


www.carstairs-weather.ca

You have probably tested to retrieve a purpleair sensor with ID 4327
The resulting data-request is stored in the status-file.

How-to-solve
Simple delete the . . /pwsWD/ _my_settings/status.arr
That file will be rebuild from scratch and within 24 hours the file will be complete again without a warning for a not used file.


./jsondata/wucom.txt is the file with the data downloaded from WU.
Messages for that file come and go but never result in a “red” warning.
It is a bit complex and translating from Dutch to English does not help either. :face_with_raised_eyebrow:

In the setup of PWS_Dashboard your wu data file has a max-age of 200 seconds.
And only when there is a visitor the data is retrieved every 200 seconds.

The cron-job runs every 5 minutes and will load that data if the age is more then 200 seconds.
WeatherUnderground also returns valid data every 5 minutes.

A 5 minute cron and a theoretically up-to 4:59 minute old data from WU countered with the 2 minute allowed age when there is a visitor active.

Regards,
Wim

1 Like

You are totally correct, I did.

I’ll do that later today.

Incidentally, I ordered a purpleAir sensor from their website last week and haven’t heard back from them despite several emails and FB messages. I wonder if they are having some sort of financial issues?