UV from WU

Post Reply
sbmike
Newbie
Newbie
Posts: 1
Joined: Tue Dec 12, 2017 5:22 pm
Station model: WS-2902
Software: WU

UV from WU

Post by sbmike » Fri Dec 22, 2017 5:41 pm

Weather Underground does report UV in its XML. Seems that by changing update.php I can include UV reported from my weather station to my site. I am using an Ambient Weather WS-2902 weather station.

Code: Select all

diff -u update.php.orig  update.php
--- update.php.orig     2017-12-12 03:58:19.253102000 +0000
+++ update.php  2017-12-22 17:21:49.597102000 +0000
@@ -278,6 +278,8 @@
         $rawUpdate['RR'] = convertor($rawUpdate['RR'],"in","mm");
         $rawUpdate['B'] = (string)$xmlWU->current_observation[$lastWU]->wind_degrees;
         $rawUpdate['S'] = (string)$xmlWU->current_observation[$lastWU]->solar_radiation;
+//Add UV
+        $rawUpdate['UV'] = (string)$xmlWU->current_observation[$lastWU]->UV;

     } // end WU

nicoloconte
Newbie
Newbie
Posts: 7
Joined: Sun Jan 07, 2018 6:14 pm
Station model: WS1001
Software: WU

Re: UV from WU

Post by nicoloconte » Sun Jan 07, 2018 7:59 pm

Great! ;)

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: UV from WU

Post by Dehatter » Mon Jan 15, 2018 1:51 am

This worked for me!! Thank you!!

Tom
Image

Sandro.g
Newbie
Newbie
Posts: 5
Joined: Tue Mar 13, 2018 8:06 pm
Station model: WH1080
Software: Weather Display

Re: UV from WU

Post by Sandro.g » Sun Mar 12, 2023 4:01 pm

Hi,
I also have this problem, I did some tests but I couldn't get it to work, maybe because I have the latest version of meteotemplate, (18.0 Papaya) and the update.php file is not the same, can someone help me?
Thank you

AnGeLiuS
Newbie
Newbie
Posts: 1
Joined: Fri Feb 24, 2023 3:57 pm
Location: France
Station model: Curconsa
Software: WU
Contact:

Re: UV from WU

Post by AnGeLiuS » Tue Jul 04, 2023 8:07 am

Hello,
I had the same problem when i had install et configure the Template.

In Template/update/update.php, i see one line is missing concerning the uv, so i add this, line 272 in the original file :

Code: Select all

$rawUpdate['UV'] = $fileRaw['observations'][0]['uv'];
I hope it's help you

Post Reply