UV is not reporting correctly

Post Reply
User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

UV is not reporting correctly

Post by Fraggboy » Sat Sep 30, 2017 8:16 pm

So, I've noticed that all areas of the webpage is not showing the correct UV. I even checked the api data, and it's showing 0.

There is a difference between Sky I and SKY II's. SKy I had the UV sensor on the Sky. The Sky II's UV sensor was removed due to the storm having this sensor.

Here is a pic of the api data:
Screen Shot 2017-09-30 at 1.14.06 PM.png
Screen Shot 2017-09-30 at 1.14.06 PM.png (40.5 KiB) Viewed 8079 times
Here is a pic of the script that pulls the api data from Bloomsky:
Screen Shot 2017-09-30 at 1.15.52 PM.png
Screen Shot 2017-09-30 at 1.15.52 PM.png (56.45 KiB) Viewed 8079 times
It's retrieving the api data fine.

Link to site: https://www.fraggboy.com/
Image

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Sat Sep 30, 2017 9:25 pm

meteotemplateLive.txt is not being updated with the correct UV reading (I manually changed it to 4, and it's showing that number there.) All other values are updating, so it's not a permission error. The database does have the correct value.
Image

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Sat Sep 30, 2017 9:48 pm

What I have found out, is when I go to my Bloomsky page, and select today's date, I do see the actual UV reading..
Screen Shot 2017-09-30 at 2.42.44 PM.png
Screen Shot 2017-09-30 at 2.42.44 PM.png (32.42 KiB) Viewed 8070 times
I check dayOverview.php file and I do see that it's fetching the data from the database, thus being correct.

currentBlock.php is not fetching the data from the database. It's being fed from meteotemplateLive.txt. I don't know how to fix it exactly, but maybe change how currentBlock.php retrieves it's data from the database instead of the .text file?

I don't know how to proceed..

EDIT: I'm thinking that this needs to be moved to the block section, but this is also tied to this hardware.. Forgive me if this should be elsewhere..
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: UV is not reporting correctly

Post by Jachym » Sun Oct 01, 2017 4:44 pm

Hi,
this is strange, the current block has to use the current conditions file, not db

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: UV is not reporting correctly

Post by Jachym » Sun Oct 01, 2017 4:45 pm

I just checked, the plugin does look for the value in the API so if it is not in meteotemplateLive.txt, it means it was not in the API file:

$data[0]['Storm']['UVIndex'];

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Sun Oct 01, 2017 5:28 pm

I did see that there. For some reason it's now showing the correct UV reading in the current block..

Very strange..
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: UV is not reporting correctly

Post by Jachym » Sun Oct 01, 2017 5:29 pm

Currently:
API file shows 3.0 https://www.fraggboy.com/template/meteotemplateLive.txt
Current block shows 3 as well

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Sun Oct 01, 2017 6:21 pm

It's very strange.. If you check now, it's a zero.. :(
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: UV is not reporting correctly

Post by Jachym » Sun Oct 01, 2017 9:06 pm

The current block takes data from the meteotemplateLive.txt file, so what you see in that block will always be exactly what is in the api file. And this api file is directly what BS sent.
Given we saw the number 3 it means the script must work. If it was 0 it could be it is not working at all, but that 3 had to come from somewhere, the script would not just randomly select this, so this looks more like an issue with the BS API and you would not be the first user to have problems with BS UV

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Sun Oct 01, 2017 9:19 pm

I understand that BS has had issues with their servers, but when I navigate to the URL to update the api, the UV is showing correctly in the data.
Screen Shot 2017-10-01 at 3.57.30 PM.png
Screen Shot 2017-10-01 at 3.57.30 PM.png (43.22 KiB) Viewed 8012 times
Image

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Sun Oct 01, 2017 11:40 pm

I found the issue..

in bsUpdate.php there is:

Code: Select all

if(time()>$sunRiseTS && time()<$sunSetTS){}
	else{
		$rawUpdate['UV'] = 0; // set to 0 at night - BloomSky bug
	}
That code is always changing the UV to 0, despite it being during the day. I will live with UV=1 during the evening.

I have removed it and it’s reporting correctly.

The Bloomsky app always shows 1 out of 11, even at night.
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: UV is not reporting correctly

Post by Jachym » Mon Oct 02, 2017 9:39 am

Thats strange though because the sunrise/sunset times should be correct for your location, unless you provided incorrect GPS

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Mon Oct 02, 2017 12:15 pm

I agree it’s strange.

Coordinates are correct. It’s pin-pointing my location correctly on the map.
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: UV is not reporting correctly

Post by Jachym » Mon Oct 02, 2017 1:04 pm

Is TZ set correctly?

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Mon Oct 02, 2017 1:19 pm

Everything is correct on my end. I don't think you need to look into this. There isn't a huge drive from Bloomsky users.. :)
loc.jpg
loc.jpg (155.12 KiB) Viewed 7976 times
Image

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: UV is not reporting correctly

Post by Fraggboy » Wed Oct 11, 2017 10:15 pm

Jachym,

I updated the BS plugin and I forgot about what I omitted from the bsUpdate.php file. I noticed that the UV is still showing 0. I went ahead and removed the code again..
Image

Post Reply