Not able to view bloomsky timelapse block

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:

Not able to view bloomsky timelapse block

Post by Fraggboy » Tue Oct 03, 2017 4:34 pm

Hello.

So, I have traced it down to running the site via https. As of now, it's showing a strange error (Shown below).
Bloomskytimelapse.jpg
Bloomskytimelapse.jpg (53.34 KiB) Viewed 4509 times
I have tracked it down to the bsCache.txt file. The URL's to AWS is http. When I replace all to https, it works great. I checked bloomskyTimelapseBlock.php and changed all http to https. It breaks the block.

Does anyone know of a way to modify the code so when it updates the text file, it uses https?
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: Not able to view bloomsky timelapse block

Post by Fraggboy » Tue Oct 03, 2017 9:17 pm

So, I have come up with a workaround for now. I created a simple script that finds and replaces http with https every 30 minutes via cron.

Code: Select all

sed -i 's/\bhttp\b/https/g'  bsCache.txt
The videos are showing up correctly on my page.

EDIT: Had to modify the code a bit.
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: Not able to view bloomsky timelapse block

Post by Fraggboy » Thu Oct 05, 2017 1:59 pm

So, my script modifies the time/date stamp check in bloomskyTimelapseBlock.php.

Code: Select all

if(file_exists("cache/bsCache.txt")){
		if (time()-filemtime("cache/bsCache.txt") > 60 * 60) {
			unlink("cache/bsCache.txt");
I am at a loss in how to get this fixed.. :(

EDIT: I have modified my cronjob to every 60 minutes which is working good now.
Last edited by Fraggboy on Thu Oct 05, 2017 8:43 pm, edited 1 time in total.
Image

User avatar
Johnny
Developer
Developer
Posts: 313
Joined: Sat Aug 19, 2017 10:16 pm
Location: Watford, Hertfordshire, England
Station model: Davis Vantage Pro2 Plus
Software: Meteobridge
Contact:

Re: Not able to view bloomsky timelapse block

Post by Johnny » Thu Oct 05, 2017 4:00 pm

Hi Christopher, just to let you know that your Bloomsky video is visible right now, I'm guessing you've gone back to HTTP mode. I think this is going to be one of those questions for Jachym to answer.

Orbie and Stormie Bloomsky.JPG
Orbie and Stormie Bloomsky.JPG (29.19 KiB) Viewed 4483 times
Image
Davis Vantage Pro2 Plus: http://www.watfordweather.uk

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: Not able to view bloomsky timelapse block

Post by Fraggboy » Thu Oct 05, 2017 5:05 pm

Johnny,

I modified the cron job to run every hour since I believe the script checks for modification every 60 minutes.

I need Jachym's assistance.
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: Not able to view bloomsky timelapse block

Post by Jachym » Thu Oct 05, 2017 7:31 pm

If you just echo the raw output of the API do you see everything ok?

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: Not able to view bloomsky timelapse block

Post by Fraggboy » Thu Oct 05, 2017 8:42 pm

The API data is correct. It's just that all of the requests to amazon are http. When I modify it to https it works great.

As of now, my cronjob is working much better since I have it run every 60 minutes.
Image

Post Reply