Author Topic: Alternative Dashboard WU Issue (Resolved by the beteljuice)  (Read 5962 times)

0 Members and 1 Guest are viewing this topic.

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard WU Issue
« Reply #75 on: June 12, 2019, 06:30:49 PM »
Things got a bit toasty today but there's more to come.

Seems it's not sure about what the date is - report for June 12 but summary for June 11.
John
W7JKG

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 157
    • DesertWeather.com
Re: Alternative Dashboard WU Issue
« Reply #76 on: June 12, 2019, 06:35:14 PM »
Things got a bit toasty today but there's more to come.

Glad to see someone else enjoying the southwest heat! 113° here! :lol:
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard WU Issue
« Reply #77 on: June 12, 2019, 06:43:18 PM »
Things got a bit toasty today but there's more to come.
Glad to see someone else enjoying the southwest heat! 113° here! :lol:

Wildfires already started for both of us and unfortunately the really nice weather we had is now gone. Gettin' too old for this!
John
W7JKG

Offline CW2274

  • Forecaster
  • *****
  • Posts: 6731
    • Conditions @ CW2274 West Tucson-Painted Hills Ranch
Re: Alternative Dashboard WU Issue
« Reply #78 on: June 12, 2019, 06:58:00 PM »
And here I am whining about 108F..... :roll:

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #79 on: June 12, 2019, 06:59:02 PM »
Ahem, I'm not the net police, but we're straying from the topic here, guys. :roll:
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline CW2274

  • Forecaster
  • *****
  • Posts: 6731
    • Conditions @ CW2274 West Tucson-Painted Hills Ranch
Re: Alternative Dashboard WU Issue
« Reply #80 on: June 12, 2019, 07:00:13 PM »
Ahem, I'm not the net police, but we're straying from the topic here, guys. :roll:
Please....

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 157
    • DesertWeather.com
Re: Alternative Dashboard WU Issue
« Reply #81 on: June 12, 2019, 07:01:55 PM »
edit: uh oh, back to the topic...   :oops: :grin:

So doing some research I figured out that my NWS office updates the report at least twice a day. I hope this makes sense...

Around 5:15am we get the first data for that day. The"top" main section displays yesterday's data and near the bottom displays the climate norms for today.
then around 4 to 5pm the upper main section will display the results of today and the bottom section switched to tomorrow's climate norms.

I'm not sure if all NWS locales follow that same format.

Maybe be there was some logic that checks if line 24 equal "TODAY" grab the data there BUT if it equals "YESTERDAY" then grab from line 81. (line numbers maybe off by a few but just use as a <pre> location reference)

Just some of my thoughts... :)
« Last Edit: June 12, 2019, 07:06:50 PM by PSJohn »
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: Alternative Dashboard WU Issue
« Reply #82 on: June 12, 2019, 07:53:31 PM »
@ PSJohn Unfortunately your record date has now rolled over (But you are still getting the correct data)

In terms of yesterday / today / tomorrow we are still trying to work out with reference to what / which bit.

Such is the semantics / syntax of NOAA
Imagine what you will KNOW tomorrow !

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #83 on: June 13, 2019, 01:15:51 AM »
Via Splinterware's System Scheduler I scheduled a 'curl' to run 'noaarec.php?noaabug=true' at every 12:04 am, and after it ran just now the correct numbers for today were displayed on my testing server.

At least for me, the 'noaarec.php' script works, but with my modifications of which BJ is aware.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: Alternative Dashboard WU Issue
« Reply #84 on: June 13, 2019, 01:39:46 AM »
Hi Jerry,

As John pointed out on your test site the numbers do not show the degree decimals for some reason.  I am using FF here as well. See below the snapshot that I just took early this evening HST.

 [ You are not allowed to view attachments ]

I hope to get mine up when my time permits.

WOW, what great inputs to find a solution by all contributors. I posted this on June 6 and less than a week great progress to a beta testing for this issue.

Thank you all.

On another note of some NWS updates of data that takes place at 5:00 AM is because, I think, that is when they collect data from various recording stations. Just my thought on this.

Regards,

--Stan Y.
   Maui, Hawaii
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: Alternative Dashboard WU Issue
« Reply #85 on: June 13, 2019, 03:48:57 AM »
Dear All .... patience.

@Jerry
Quote
and after it ran just now the correct numbers for today
The latest version was OK after midnight anyway .... It's the next record update that screws things.

EDIT: Redundant material removed ... post for historic information only
 OK so far, just need to wait for the next change ...

In the release (If that happens  :lol:) I will be changing the html slightly as I believe the uom should be hard coded to deg F - but we'll see.

the beteljuice has been wrong before - honest  \:D/
« Last Edit: June 15, 2019, 09:17:33 PM by the beteljuice »
Imagine what you will KNOW tomorrow !

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #86 on: June 13, 2019, 07:34:13 AM »
@Stan:
The absence of the decimal points on my testing server's hi/lo/avg values is due to a modification I made in the ajax javascript file that's on that machine.  I referenced it earlier in this thread.

@BJ:
Hard-coded uom's would disable the ajax-dashboard695's ability to convert the dashboard between Metric and Imperial displays.

Regarding the NOAA update times, the times on the dropdown selections seem to me to be the important parameter, not the text itself.  So long as TODAY and TOMORROW are clearly delineated we should have a shot at scraping them.  Here, TOMORROW's values are valid until the next update between 1:29 am and 1:39 am.  Are you saying that the next update caused the displayed numbers to revert back to yesterday's again?
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: Alternative Dashboard WU Issue
« Reply #87 on: June 13, 2019, 12:29:09 PM »
Quote
Hard-coded uom's would disable the ajax-dashboard695's ability to convert the dashboard between Metric and Imperial displays.
I don't think so. initial uom appears to be what you have set up as station default (but regardless of that. initial state of theses values is deg F)
ajax js gets involved and convTemp takes the string eg. 12.6&deg;F and replaces it if necessary. ie. the page is NOT being refreshed and PHP plays no part. It appears to be working because US 'choice' of units is F and the figures we are scraping are F.

Try eg.
Code: [Select]
<span class="convTemp"><?php echo $thisDayMax?>&deg;F</span>and tell me  what happens please.


Imagine what you will KNOW tomorrow !

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #88 on: June 13, 2019, 12:53:08 PM »
Here's the code from that part of the line in my dashboard on my testing server:
Code: [Select]
<span class="convTemp0"><?php echo strip_units(intval($thisDayMax)) . $uomTemp?></span>
Changing it to
Code: [Select]
<span class="convTemp0"><?php echo $thisDayMax?>&deg;F</span>produces the desired results:
and


However if for some reason the default uomTemp is set to METRIC, I'm not sure it would display correctly.  Since Scott designed the ajax-dashboard6 to be more or less universal, I've reverted to the prior line.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: Alternative Dashboard WU Issue
« Reply #89 on: June 13, 2019, 01:00:07 PM »
Hi All,

Got my site running for testing out here in Central Pacific zone last night and this morning. Check out www.makawaoweather.com

Hope all goes well with modifications.

Thanks Jerry and BJ for the time to resolve this issue that WU dropped.

Regards,

--Stan Y.
   Maui, Hawaii
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: Alternative Dashboard WU Issue
« Reply #90 on: June 13, 2019, 01:51:25 PM »
@Stan

I note that 'ajax' is adding val .0 - is the number of decimals an option somewhere ?
Imagine what you will KNOW tomorrow !

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 157
    • DesertWeather.com
Re: Alternative Dashboard WU Issue
« Reply #91 on: June 13, 2019, 02:00:56 PM »
Here is an idea... Why don't we simplify it?

I spent a few moments and took a look at several NWS locales and how their Climate reports look like at the end of the day around 11:45pm. They ALL have a tomorrow section towards the bottom at the end of the day. (see attached photo).

Make the script scrape the data from there. Then each one of us will create a cron to run the script once a day around 11:55pm. That way we get the data for tomorrow and we don't have to worry about the "flips" in the report format.

What do you think BJ?
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #92 on: June 13, 2019, 02:04:55 PM »
@Stan

I note that 'ajax' is adding val .0 - is the number of decimals an option somewhere ?
The numerical precision is a result of the ajaxWDwx3.js script.  See above for a fix, since I'm fussy about falsely precise numbers being displayed.

With this ajaxWDwx3.js using convTemp0 instead of convTemp displays no decimals for the BJ-scripted values.  The modified dashboard code is in post #55 of this thread.
« Last Edit: June 13, 2019, 02:10:56 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: Alternative Dashboard WU Issue
« Reply #93 on: June 13, 2019, 02:13:26 PM »
@BJ,

I really don't know where the settings are located for the .0 is coming from. It could be coming from the config script for the Ajax alternative dashboard? I just loaded it as per your instructions with guidance from John G.
 
Thanks for all that you have done with this issue.

Regards,

--Stan Y.
  Maui, Hawaii
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: Alternative Dashboard WU Issue
« Reply #94 on: June 13, 2019, 04:41:58 PM »
@PSJohn

What is this fixation you all seem to have with cron ?

Quote
end of the day around 11:45pm.
Whose / which day ?
Unlikely to be your local TZ, and it's looking like the reports are generated to some UTC schedule.

the beteljuice believes he has cracked the semantics and record day issues. The coming hours will tell.

Forgot to mention
Quote from: you said
Maybe be there was some logic that checks if line 24 equal "TODAY" grab the data there BUT if it equals "YESTERDAY" then grab from line 81. (line numbers maybe off by a few but just use as a <pre> location reference)
If you look at the source of noaarec that is indeed very similar to the imperfect logic employed - so well done !
« Last Edit: June 13, 2019, 04:46:39 PM by the beteljuice »
Imagine what you will KNOW tomorrow !

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 157
    • DesertWeather.com
Re: Alternative Dashboard WU Issue
« Reply #95 on: June 13, 2019, 08:16:00 PM »
@PSJohn

What is this fixation you all seem to have with cron ?

Cron is our leader, the ruler of all! He helps us control the chaos in the code!

ha ha, Just kidding    :grin:

Thanks again for you efforts with this!  =D&gt;
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2429
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: Alternative Dashboard replace WU - Test Pilot Wanted
« Reply #96 on: June 14, 2019, 06:49:29 AM »
Test Pilot wanted ....

Must be able to feed-back problems with instructions, html layout, actual functionality ..

(Keep an eye on data to see if it 'rolls over' at an acceptable time)

NB: This can be used as a 'stand-alone', no dependencies on other scripts - data available for US only !

 [ You are not allowed to view attachments ]  (errors fixed)
Sorry, but I don't understand how to  the "strip_units($thisDayMax)) { echo "\"Official"; } ?> "; } ?>" part.

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #97 on: June 14, 2019, 07:10:39 AM »
@Bunty:

The 'strip_units' function is found in Scott's ajax-dashboard6 which I see you have a highly modded version of available as your '2nd Home Page'.  You're not displaying the extreme/average daily hi/lo's that I can see.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: Alternative Dashboard WU Issue
« Reply #98 on: June 14, 2019, 08:37:36 AM »
'Release' will be shortly available under a new thread, which will lead you to http://beteljuice.co.uk/DEMOS/_recnoaa.php (I think all the correct versions are in place  :roll:)
Example html patch has also been updated / simplified.
Test bed checked over last 40hrs without problems.

@bunty

Do you mean the display graphics part ?
I have no idea if you have those graphics or not, or if you have the 'option' to set anywhere - sorry
You use an ajaxWD js so convTemp should work, no need for strip_units( .... ).

As far as I can see, if you want the records below 2nd home page yesterday / today info, then paste new <tr> .... </tr> inbetween </tr> in a new <table> @ view-source line #693 below existing one as the 'style' does not match yours, upto you to format.
« Last Edit: June 14, 2019, 08:47:19 PM by the beteljuice »
Imagine what you will KNOW tomorrow !

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard WU Issue
« Reply #99 on: June 14, 2019, 09:07:04 AM »
@BJ:

Thanks!  Looking at and running the latest script it looks like you nailed it [tup]  Great job =D&gt; \:D/ =D&gt;
Regards, Jerry Wilkins
gwwilk@gmail.com