WXforum.net

Weather Station Hardware => Weather Web Cams => Bloomsky Sky Camera+sensors => Topic started by: wvdkuil on February 27, 2016, 09:10:04 AM

Title: Bloomsky, another script
Post by: wvdkuil on February 27, 2016, 09:10:04 AM
Just another script.

Can be used in any website/template.
Outputs one < div > with CSS included which will try to fit in the area you give it (100%).
Making the screen wider enlarges the images until 640*640px.
To use the 5 movies it needs html5 but that is fairly common.

This is the FIRST version so  I need all YOUR comments to improve the script.
As most users are in the US, I used English as default and translated to Dutch (nl). I will translate the other languages shortly.

To test/use the script:
1. go to your Bloomsky dashboard at http://dashboard.bloomsky.com and obtain your API key by clicking at the bottom/left on "Developers"
2. Copy that strange sequence of characters and paste in in the script in the first setting (= line 5).

Run the script in your browser. Should look like the attached first picture for the component (to integrate in a page)
The second picture is for the vertical version

Wim

EDIT 2016-MAR-01 17:00 UTC: Minor documentation updates, minor script updates. no need to reinstall
EDIT 2016-FEB-29  17:00 UTC:  Download is now complete with both scripts and versions or Saratoga/Leuven/others



Title: Re: Bloomsky, another script
Post by: PaulMy on February 27, 2016, 10:09:14 AM
Looking forward to using it Wim.  However we are just leaving for a couple days so will need to wait until next week to provide comment.
 
Paul
Title: Re: Bloomsky, another script
Post by: 92merc on February 27, 2016, 12:06:45 PM
The PHP I opened has no line returns, so a little hard to read on screen.

But I plugged in my API key, and no love for me once again.  I couldn't get the other script working either.  I'm using other PHP on my site, so I don't think that is the issue.  I'm beginning to wonder if my API key is working right.

http://www.bismarckweather.net/bloomsky/ws_bloomsky.php
Title: Re: Bloomsky, another script
Post by: SpringHillWeather on February 27, 2016, 12:15:31 PM
Just another script.

Can be used in any website/template.
Outputs one < div > with CSS included which will try to fit in the area you give it (100%).
Making the screen wider enlarges the images until 640*640px.
To use the 5 movies it needs html5 but that is fairly common.

This is the FIRST version so  I need all YOUR comments to improve the script.
As most users are in the US, I used English as default and translated to Dutch (nl). I will translate the other languages shortly.

To test/use the script:
1. go to your Bloomsky dashboard and obtain your API key by clicking at the bottom/left on "Developers"
2. Copy that strange sequence of characters and paste in in the script in the first setting (= line 5).

Run the script in your browser. Should look like the attached picture.

Wim

Thank you Wim for creating this!
Unfortunately my Bloomsky is still down but the script looks great!

Bloomsky Script (http://dhweather.net/ws_bloomsky)
 
Title: Re: Bloomsky, another script
Post by: ke9lz on February 27, 2016, 01:49:11 PM
92merc, try using notepad++ to edit it.  You can goggle and find it easy and works great for editing.

I have it up and running here http://weather.athelstanewi.com/ws_bloomsky.php (http://weather.athelstanewi.com/ws_bloomsky.php) and looks great other than the A after the temp.  Is it possible to make current image, data and video vertical instead of horizontal so it can be used in the saratoga templete?
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 27, 2016, 01:57:34 PM
The PHP I opened has no line returns, so a little hard to read on screen.

But I plugged in my API key, and no love for me once again.  I couldn't get the other script working either.  I'm using other PHP on my site, so I don't think that is the issue.  I'm beginning to wonder if my API key is working right.

http://www.bismarckweather.net/bloomsky/ws_bloomsky.php
I edited the script and inserted your API-key.

No problem at all, your api-key is just fine, the script works OK with your key

Maybe something with unzipping as it works on multiple other locations?   
Or maybe an IIS server?

Success, Wim

EDIT: Just pm/mail me and I will sent you the script with your key in it
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 27, 2016, 02:00:16 PM
92merc, try using notepad++ to edit it.  You can goggle and find it easy and works great for editing.

I have it up and running here http://weather.athelstanewi.com/ws_bloomsky.php (http://weather.athelstanewi.com/ws_bloomsky.php) and looks great other than the A after the temp.  Is it possible to make current image, data and video vertical instead of horizontal so it can be used in the saratoga templete?
That is nr 1 on my todo list as I want it to display it on a smart phone also.

Wim
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 27, 2016, 02:04:44 PM
Wim are you aware of the fact that in your posted ZIP file there is the API key included?!

I guess this was unintentional as this could be misused.
Thanks Jachym,
No I was not aware, I include always my own key. And my Bloomsky is already down for a long time. Refunded totally as Bloomsky will not ship to Europe in the near future.

Please use a PM next time if there is such a breach of normal security, as to not attract more attention to it.

Thanks
Title: Re: Bloomsky, another script
Post by: jerbo on February 27, 2016, 09:30:30 PM
Wim,
The videos only play the same oldest available one, not each of the individual five days.
Title: Re: Bloomsky, another script
Post by: W3DRM on February 28, 2016, 02:12:09 AM
Wim,
The videos only play the same oldest available one, not each of the individual five days.

Same here. It starts off correctly with the latest date (Feb 27 in this case) but as soon as you select any of the other buttons -1, -2, -3, or -4 it goes to Feb 23 and then never leaves that date until you reload the webpage manually.
NOTE: If you look at the page source, the links for the four video selections are correct and do show the correct video date when you manually insert them into a browser. So, it looks like it has something to do with the button selection that isn't working just right. Otherwise, it works GREAT!
Title: Re: Bloomsky, another script
Post by: W3DRM on February 28, 2016, 02:43:52 AM
Wim,

Here's another thought for this script. You currently are showing up to four prior videos. Using the links that are created in the script, I played with the date of the mp4 files and found that Bloomsky apparently keeps some finite number of old videos that you can access. For mine, on this date, I was able to manually select and view videos all the way back to Feb 16, 2016 which is twelve days of videos. I'll check tomorrow but I suspect the number of files kept is limited to perhaps only the last 12 days of files. What would be nice is for the script to look at what videos are available and then create a listing that is displayed so the viewer could look at any of those still available.
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 03:40:48 AM
Wim,
The videos only play the same oldest available one, not each of the individual five days.
@jerbo @W3DRM
Thanks for finding this programming error. As i do not own a Bloomsky anymore  :sad: and i do not want to over-use others gear, I did not test that as I should have. Copied the button line 5 times without modifying the array index.

I updated the script in the first post, the video selection error and the invalid degree symbol (webserver dependent) should be gone now.

Wim
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 03:52:11 AM
Wim,

Here's another thought for this script. You currently are showing up to four prior videos. Using the links that are created in the script, I played with the date of the mp4 files and found that Bloomsky apparently keeps some finite number of old videos that you can access. For mine, on this date, I was able to manually select and view videos all the way back to Feb 16, 2016 which is twelve days of videos. I'll check tomorrow but I suspect the number of files kept is limited to perhaps only the last 12 days of files. What would be nice is for the script to look at what videos are available and then create a listing that is displayed so the viewer could look at any of those still available.
That is a nice idea, but the overhead for checking if all those files exist, should be quit a task slowing the start-up.

Another possibility: we add a "Bloomsky member since" setting, show 5 buttons + plus a dropdown with all dates until start membership.
If they not keep all videos we maybe find a max number of videos they keep and can use that to restrict the size of the dropdown.

HELP WANTED:  But someone with an active Bloomsky device should first find out if one can go back to the first day ( +1 as it is yesterdays movie) of membership.

Wim

P.S. I hope Bloomsky starts shipping to Europe again soon.


Title: Re: Bloomsky, another script
Post by: Fox_Of_The_Wind on February 28, 2016, 07:44:45 AM
Just another script.

Can be used in any website/template.
Outputs one < div > with CSS included which will try to fit in the area you give it (100%).
Making the screen wider enlarges the images until 640*640px.
To use the 5 movies it needs html5 but that is fairly common.

This is the FIRST version so  I need all YOUR comments to improve the script.
As most users are in the US, I used English as default and translated to Dutch (nl). I will translate the other languages shortly.

To test/use the script:
1. go to your Bloomsky dashboard and obtain your API key by clicking at the bottom/left on "Developers"
2. Copy that strange sequence of characters and paste in in the script in the first setting (= line 5).

Run the script in your browser. Should look like the attached picture.

Wim

EDIT: new version at 2016-02-28 removed:  invalid degree symbol - error in video select

Now I know I must be blind no one else is asking this. Were is my dashboard???? I looked on the website and on the app. I know I will be kicking myself when someone tells me were its at but I have no clue right now.  ](*,)
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 28, 2016, 07:53:20 AM
Now I know I must be blind no one else is asking this. Were is my dashboard???? I looked on the website and on the app. I know I will be kicking myself when someone tells me were its at but I have no clue right now.  ](*,)

I had to search through the blog and found the link.  https://dashboard.bloomsky.com/

Cheers!

Chris

Title: Re: Bloomsky, another script
Post by: Fox_Of_The_Wind on February 28, 2016, 08:22:51 AM
Now I know I must be blind no one else is asking this. Were is my dashboard???? I looked on the website and on the app. I know I will be kicking myself when someone tells me were its at but I have no clue right now.  ](*,)

I had to search through the blog and found the link.  https://dashboard.bloomsky.com/

Cheers!



Chris


Thank you!!!!!!
Title: Re: Bloomsky, another script
Post by: kc2kzz on February 28, 2016, 09:11:46 AM
Anyone getting an error like this?

Unknown (non-array) array info =(SSL certificate problem: unable to get local issuer certificate)
Unknown (non-json) data =() first 40 charecters of returned data only


Appears to be an IIS thing, I have it working on my linux server.
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 09:27:45 AM
Anyone getting an error like this?

Unknown (non-array) array info =(SSL certificate problem: unable to get local issuer certificate)
Unknown (non-json) data =() first 40 charecters of returned data only
This is a known problem with other servers, it boils down to those three factors
 ? windows server ? php5-2-7 ? Godaddy ?

I first thought it was php5-2-7 but that was ruled out as the sole reason.
It is certainly working on GoDaddys's other servers,  that is also not the deciding factor
But with all three factors the scripts to get info exchange between website < = > https bloomsky these SSL errors occur.

There are three lines debug info:
1. all data loaded from bloomsky = empty, no data
2. All error messages, only 1: 
 an SSL problem  yours: SSL certificate problem: unable to get local issuer certificate
 others:  Unknown SSL protocol error in connection to api.bloomsky.com:443
3. The third line displays again no data retrieved.

QUESTIONS:
Who is your webhosting company, which PHP, is it windows or Linux.

Is the other script also tested and does it work?

Wim
Title: Re: Bloomsky, another script
Post by: kc2kzz on February 28, 2016, 09:38:49 AM
I fixed the problem

Under this line
curl_setopt ($ch, CURLOPT_HTTPHEADER, $header );

I added these 2 lines.

curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

This is a self hosts Windows 2012R2 server. 

$ php -v
PHP 5.5.3 (cli) (built: Aug 20 2013 16:11:53)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies

http://www.warrenskywarn.org/ws_bloomsky.php

Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 09:51:18 AM
I fixed the problem

Under this line
curl_setopt ($ch, CURLOPT_HTTPHEADER, $header );

I added these 2 lines.

curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

This is a self hosts Windows 2012R2 server. 

$ php -v
PHP 5.5.3 (cli) (built: Aug 20 2013 16:11:53)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
It seems these two lines lower the SSL security, but:
We "trust" Bloomsky and we only retrieve some weatherdata, which can not interact with our systems.

So for the affected  windows-server users this solves the problem.

Wim
Title: Re: Bloomsky, another script
Post by: ke9lz on February 28, 2016, 09:54:50 AM
Hi Wim,  Looks good now with the exception of it seems the movie buttons are I think in reverse order.  You can view it here http://weather.athelstanewi.com/ws_bloomsky.php (http://weather.athelstanewi.com/ws_bloomsky.php).
Title: Re: Bloomsky, another script
Post by: jerbo on February 28, 2016, 10:03:31 AM
Wim,
 The time lapses are saved with the highest number 4 as the latest, down to 0 as the oldest.
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 10:08:20 AM
Hi Wim,  Looks good now with the exception of it seems the movie buttons are I think in reverse order.  You can view it here http://weather.athelstanewi.com/ws_bloomsky.php (http://weather.athelstanewi.com/ws_bloomsky.php).
:oops:
The corrected script (v3) is in the first post.
Wim
Title: Re: Bloomsky, another script
Post by: ke9lz on February 28, 2016, 10:22:21 AM
Works perfect now!  Thanks for a great script!
Title: Re: Bloomsky, another script
Post by: hankster on February 28, 2016, 10:35:46 AM
Thanks for your hard work. Playing with it now.

http://www.northfortmyersweather.com/weather/ws_bloomsky.php
Title: Re: Bloomsky, another script
Post by: Bob3rd on February 28, 2016, 12:17:58 PM
It's been a while since I did this stuff.  After I substitute my API key for the one in the script and save it, do I put the code inside an HTML wrapper?  Sorry for such a basic question but how do I run it so it generates the HTML needed to display as a web page?
Title: Re: Bloomsky, another script
Post by: CNYWeather on February 28, 2016, 12:18:11 PM
Now I know I must be blind no one else is asking this. Were is my dashboard???? I looked on the website and on the app. I know I will be kicking myself when someone tells me were its at but I have no clue right now.  ](*,)

I had to search through the blog and found the link.  https://dashboard.bloomsky.com/

Cheers!

Chris

You cant get to the developer area from the web or can you? I'm using my login from the app and I cant get to the developers area.  :-x
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 12:25:08 PM
Now I know I must be blind no one else is asking this. Were is my dashboard???? I looked on the website and on the app. I know I will be kicking myself when someone tells me were its at but I have no clue right now.  ](*,)

I had to search through the blog and found the link.  https://dashboard.bloomsky.com/

Cheers!

Chris

You cant get to the developer area from the web or can you? I'm using my login from the app and I cant get to the developers area.  :-x
You have to logon with your normal e-mail and password used when you registered the first time.
This page should show then, the developers link is at the bottom left.
Wim
Title: Re: Bloomsky, another script
Post by: CNYWeather on February 28, 2016, 12:29:58 PM
I finally found it. Thank you.

I had to log in and out of Facebook for some reason to get there.
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 12:30:42 PM
It's been a while since I did this stuff.  After I substitute my API key for the one in the script and save it, do I put the code inside an HTML wrapper?  Sorry for such a basic question but how do I run it so it generates the HTML needed to display as a web page?
The script generates only 1 div which contains everything.
It will run as is, simply enter in your browser your wewbsite (not the xxx) plus the/ws_bloomsky.php 

xxxxxxxx.com/ws_bloomsky.php

Modern browsers will add the missing parts.

Once satisfied after customizing, you can use an existing page or make a new one.

Wim
Title: Re: Bloomsky, another script
Post by: CNYWeather on February 28, 2016, 12:38:34 PM
Did I miss something for my timezone in the script? I'm in Eastern Time Zone and it comes up mountain on the page

http://www.cnyweather.com/ws_bloomsky.php
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 12:52:35 PM
Did I miss something for my timezone in the script? I'm in Eastern Time Zone and it comes up mountain on the page

http://www.cnyweather.com/ws_bloomsky.php
This script is meant to be integrated inside an existing website, that it is used in one of your own pages.
As a component somewhere on a page which already exists. Example when you add it to an existing  Saratoga page (or a new one) the timezone-setting is done by the settings.php of the Saratoga-template.

I will add a timezone setting in the top-part but will comment it out as default, only used in stand-alone use. 
Same for the  enclosing html head body part also. Will be added those things tomorrow.

The vertical version will have all settings as it is meant to run on your smartphone.

Wim
Title: Re: Bloomsky, another script
Post by: CNYWeather on February 28, 2016, 12:59:47 PM
Thanks Wim.

I have looked at other pages with the script and they seem ok. I checked my settings and have the correct time zone.
Viewing my station on the app, time looks ok.
Title: Re: Bloomsky, another script
Post by: 92merc on February 28, 2016, 01:45:48 PM
Just a FYI for those out there that may be using GoDaddy Classic Linux Hosting.  I had to change my https:// request to a regular http:// for the API call.  Not sure exactly what it is about GoDaddy that doesn't like that.  But that was all my issue was.

I'll be eagerly awaiting the update for time zone and see what the vertical version looks like.

Thanks for your help!

http://www.bismarckweather.net/bloomsky/ws_bloomsky.php
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 02:15:50 PM
Added to the first post the script for the vertical version to be used in your smart-phone pages.
This -v version has already some basic "html head body" included which will be enhanced and made optional in the final release. It also has the timezone setting,default NewYork.
All these changes are based on your remarks and will be included in the next releases of both versions.

I have just one iPhone to test to make sure, for all other phones I use the develop-facilities of Chrome.

Again, all remarks are welcome, but my timezone is CET so it will be tomorrow before there will be answers.

Wim
Title: Re: Bloomsky, another script
Post by: hankster on February 28, 2016, 02:25:18 PM
I'm trying to change the font-family in the header. I tried adding font-family: Arial, Helvetica, sans-serif; to the $bl_head_CSS but it didn't seem to make any difference. I was able to change it in the description and value. Any ideas?
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 28, 2016, 02:49:26 PM
I'm trying to change the font-family in the header. I tried adding font-family: Arial, Helvetica, sans-serif; to the $bl_head_CSS but it didn't seem to make any difference. I was able to change it in the description and value. Any ideas?
I will add more css for the complete page/div later.

I did a test and changed the settings in line 29 for the header line to
Code: [Select]
$bl_head_CSS    = 'font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: white; background-color: #7190BF; text-align: center; margin: 0;';So for that one line it is OK.

If you want it for the total DIV so for all texts you have to add it to line 28

Code: [Select]
$bl_div_CSS     = 'font-family: Arial, Helvetica, sans-serif; border-radius: 5px;  margin: 5px 5px;  color: black;  background-color: transparent; border: 1px solid grey; border-bottom: 3px solid grey;';
So all texts will be in that family also.

Warning: This is not a stand-alone page yet, only a component to be added to other pages or to be included in a "newpage.php" page in Saratoga en Leuven.
Most settings on a page are done by website wide CSS file in the < head > section

Wim

Title: Re: Bloomsky, another script
Post by: W3DRM on February 28, 2016, 04:50:01 PM
Wim,

Here's another thought for this script. You currently are showing up to four prior videos. Using the links that are created in the script, I played with the date of the mp4 files and found that Bloomsky apparently keeps some finite number of old videos that you can access. For mine, on this date, I was able to manually select and view videos all the way back to Feb 16, 2016 which is twelve days of videos. I'll check tomorrow but I suspect the number of files kept is limited to perhaps only the last 12 days of files. What would be nice is for the script to look at what videos are available and then create a listing that is displayed so the viewer could look at any of those still available.
That is a nice idea, but the overhead for checking if all those files exist, should be quit a task slowing the start-up.

Another possibility: we add a "Bloomsky member since" setting, show 5 buttons + plus a dropdown with all dates until start membership.
If they not keep all videos we maybe find a max number of videos they keep and can use that to restrict the size of the dropdown.

HELP WANTED:  But someone with an active Bloomsky device should first find out if one can go back to the first day ( +1 as it is yesterdays movie) of membership.

Wim

P.S. I hope Bloomsky starts shipping to Europe again soon.

Wim,

Evolving nicely - great job!

When I look at my dashboard, I see video files back to 2/16/2016 which is the day I went live with my Bloomsky. I don't know how far back the video files go. It looks like the earliest to install was VaJim on 2/9/2016 based on forum inputs. There may be others who have been on-line longer. Hopefully, they will see this thread and give us an indication as to how far back their dashboard shows video data. A drop-down of available files would be nice. If you have that, then you probably don't need the -1, -2,-3 and -4 buttons. Just a LATEST and then a drop-down list of  available files that can be selected.

Again, great job!  =D&gt;
Title: Re: Bloomsky, another script
Post by: waysta on February 28, 2016, 05:19:53 PM
My WU data goes back to January 18, but it looks like when I deleted my device and reset the WiFi connection, I lost all of my dashboard data.  Interesting.
Title: Re: Bloomsky, another script
Post by: PaulMy on February 28, 2016, 06:36:59 PM
I got both versions working:
www.komokaweather.com/bloomsky/ws_bloomsky.php (http://www.komokaweather.com/bloomsky/ws_bloomsky.php) and  www.komokaweather.com/bloomsky/ws_bloomsky_v.php (http://www.komokaweather.com/bloomsky/ws_bloomsky_v.php)  very easy...

but not yet incorporated into a template page.  I presume this is why the  bloomsky.php shows Last data uploaded at  Feb 28, 2016 6:17pm MST whereas bloomsky_v.php shows our correct Last data uploaded at  Feb 28, 2016 6:17pm EST

My data table started Feb 17th at 8:00 pm (night time) and first video is Feb 18th.
Thanks Wim,
 
Paul
 
Title: Re: Bloomsky, another script
Post by: W3DRM on February 28, 2016, 10:00:20 PM
I got both versions working:
www.komokaweather.com/bloomsky/ws_bloomsky.php (http://www.komokaweather.com/bloomsky/ws_bloomsky.php) and  www.komokaweather.com/bloomsky/ws_bloomsky_v.php (http://www.komokaweather.com/bloomsky/ws_bloomsky_v.php)  very easy...

but not yet incorporated into a template page.  I presume this is why the  bloomsky.php shows Last data uploaded at  Feb 28, 2016 6:17pm MST whereas bloomsky_v.php shows our correct Last data uploaded at  Feb 28, 2016 6:17pm EST

My data table started Feb 17th at 8:00 pm (night time) and first video is Feb 18th.
Thanks Wim,
 
Paul

Nice work Paul. But, when I looked at your Feb 25 time-lapse, I noticed your video showed what appears to be a snow-covered camera lens. Guess we're going to have to put up a reminder to check the lens for obstructions (snow, ice, bird droppings  :shock: , etc.) so we can clean them, if necessary, each morning when we get up.  :lol:
Title: Re: Bloomsky, another script
Post by: PaulMy on February 28, 2016, 10:18:40 PM
Thanks Don,
Yes some snowing has covered the camera for a while.  On that day I had seen several BloomSkys on the other side of Lake Huron, in eastern Michigan, also were similar with snow covered camera that lasted most of the day.  It is now one of things to check when I am doing the daily CoCoRaHS snow measuring.

We were away yesterday, leaving in the morning, when there was snow on the ground and it was neat to see in the evening from the time lapse how the snow had been disappearing during the day.

Paul
Title: Re: Bloomsky, another script
Post by: W3DRM on February 28, 2016, 10:24:18 PM
Hey, that's a great idea - do the lens check when you do your CoCoRaHS measurements!  =D&gt;
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 29, 2016, 08:10:24 AM
Edited first post with latest version of normal script and vertical/smartphone script.

Scripts now have default enclosing html, language support en-de-nl-fr,  TZ (default America/New_York)

To do:
drop down older movies (not all movies are saved but still no clue when and why)
add full pages for Saratoga and Leuven
how-to documentation

Wim
Title: Re: Bloomsky, another script
Post by: PaulMy on February 29, 2016, 09:49:41 AM
I updated both and looking good:
www.komokaweather.com/bloomsky/ws_bloomsky.php (http://www.komokaweather.com/bloomsky/ws_bloomsky.php) and  www.komokaweather.com/bloomsky/ws_bloomsky_v.php (http://www.komokaweather.com/bloomsky/ws_bloomsky_v.php) 
 
Still to place in template pages.
Paul
Title: Re: Bloomsky, another script
Post by: CNYWeather on February 29, 2016, 09:54:04 AM
Thanks for the work on this Wim. Looking good.
Title: Re: Bloomsky, another script
Post by: W3DRM on February 29, 2016, 11:32:06 AM
Latest versions working nicely! For a man without a Bloomsky station, you are doing an outstanding job on this. Let's just hope the day will come when you can get your own Bloomsky device. You have certainly earned it.  =D&gt; =D&gt; =D&gt;

Suggestion, how about some kind of an INI file (or something similar) that lets us enter in our API and timezone and then have the bloomsky.php include that file so the code can run on it's own without our having to enter the API credentials with each new version? That should also make it easier to use as a stand-alone or within templates like Ken's Saratoga template.
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 29, 2016, 12:03:28 PM
Latest versions working nicely! For a man without a Bloomsky station, you are doing an outstanding job on this. Let's just hope the day will come when you can get your own Bloomsky device. You have certainly earned it.  =D&gt; =D&gt; =D&gt;

Suggestion, how about some kind of an INI file (or something similar) that lets us enter in our API and timezone and then have the bloomsky.php include that file so the code can run on it's own without our having to enter the API credentials with each new version? That should also make it easier to use as a stand-alone or within templates like Ken's Saratoga template.
There is in a template always one important ini file aka the settings file.
So, yes if I release a new version of my template, the api-key is in the settings and the script will read the main settings for all adaptions.

And for non-template users, once the script is tested enough, new versions will be rare and as separate ini for non-template users only make their live more complicated.

Attached you will find the first almost complete release, including readme, versions for Saratoga/Leuven and others.  All 4 languages are there also.
Will take some more testing, but I doubt there will be any large changes to come.

Wim
Title: Re: Bloomsky, another script
Post by: W3DRM on February 29, 2016, 01:02:27 PM
Latest version working nicely. Have tested Saratoga template version.

Agree about the settings not being necessary as once the routines are completed there will be little need for updates.

Great job!
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 01:14:15 PM
Hi Wim,

First of all, thanks so much for all you do with supporting us and our station websites.  I use Ken's template, but in the past, I have set your's up and it is excellent work as well.

I have tried to set up your Bloomsky script and am running into a weird error... could you point me in the right direction to fix it? 

 [ You are not allowed to view attachments ]

Running the two files from the Saratoga folder (wxbloomsky.php calling ws_bloomsky.php).  Attached is the result.  I have confirmed that I do indeed have network access and can connect to my Bloomsky station both through the app and via a browser on my desktop.  Baffled....

Cheers!

Chris
Title: Re: Bloomsky, another script
Post by: W3DRM on February 29, 2016, 01:32:32 PM
Chris,

Did you edit the API Key in ws_bloomsky.php so it matches your unit? Mine works just fine and that is all I did with Wim's two files.
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 02:05:52 PM
Chris,

Did you edit the API Key in ws_bloomsky.php so it matches your unit? Mine works just fine and that is all I did with Wim's two files.
  • http://www.carsonvalleyweather.com/wxbloomsky.php (http://www.carsonvalleyweather.com/wxbloomsky.php)

Hi Don,

Thanks for weighing in.  I did replace Wim's API with mine.  Running the Saratoga page calling ws_bloomsky.php or trying to run the standalone V page for mobile devices results in the same error.  Very curious..

Cheers!

de VA3CGZ
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 02:09:26 PM
Just tried calling ws_bloomsky directly and voila!  I get the horizontal page... More tinkering and fiddling is required...

Chris
Title: Re: Bloomsky, another script
Post by: PaulMy on February 29, 2016, 02:26:21 PM
Thanks again Wim,
I have it working at

www.komokaweather.com/weather28/ from the menu
www.komokaweather.ca from the menubar www.komokaweather.ca/wxbloomsky.php
www.komokaweather.com/bloomsky/ws_bloomsky.php as well as the bloomsky_v.php version

Enjoying,
Paul
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 02:34:57 PM
Hi Paul,

Where did all your snow go?   :grin:

Still banging my head to get it working over here.  I suppose all you did was edit the API and upload, right?

Chris
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 29, 2016, 02:50:03 PM
Hi Paul,

Where did all your snow go?   :grin:

Still banging my head to get it working over here.  I suppose all you did was edit the API and upload, right?

Chris
When using your api key to test  => OK, only  there are just 3 days of movies, so there can be two PHP messages, I should have better tested that.

I copied and checked your ws_bloomsky.php, no changes only apikey and two normal changes.
Run it on my Saratoga, all normal (only two movies missing).


So it works without that strange message you have.
Code: [Select]
Failed to connect to 2607:f8b0:400e:c01::79: Network is unreachable
At your site, it gets all data but also an error message. Very strange.

QUESTION 1: What webserver Linux or Windows, PHP version.
QUESTION 2: Are you using a proxy server?

Wim
Title: Re: Bloomsky, another script
Post by: 92merc on February 29, 2016, 02:58:32 PM
I'm running the standalone version.  Where do I edit the PHP to add in my own banner information?  What I've been trying hasn't been working.
Title: Re: Bloomsky, another script
Post by: PaulMy on February 29, 2016, 02:59:06 PM
Hi Chris,
It was fun to watch the Bloomsky video on Saturday evening while we were out of town to see the snow disappearing through the day.  But not to worry, looks like lots more on the way for us in the next 36 hours...

Re setting it up it is best for Wim to explain, as for me it was the API and some preferences edits such as $bl header and $bl_timezone, etc.

Paul
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 03:05:29 PM
Hi Wim,

What are you doing up at this hour?   :grin:

When using your api key to test  => OK, only  there are just 3 days of movies, so there can be two PHP messages, I should have better tested that.

Now, I am getting the same display you are.... horizontal display of the Bloomsky videos, with the 2 PHP errors on top showing only 3 videos available yet

Quote
I copied and checked your ws_bloomsky.php, no changes only apikey and two normal changes.
Run it on my Saratoga, all normal (only two movies missing).

That is pretty much what I did...  changed the API and a couple of other settings that, as you say, are normal.


Quote
So it works without that strange message you have.
Code: [Select]
Failed to connect to 2607:f8b0:400e:c01::79: Network is unreachable
At your site, it gets all data but also an error message. Very strange.

This error has now disappeared. 

Quote
QUESTION 1: What webserver Linux or Windows, PHP version.
QUESTION 2: Are you using a proxy server?

Linux Apache 2.2.31
PHP 5.6
No Proxy Server

I'm wondering if I jumped the gun and the fact that the station has only been online since Friday is the root of the issues I was having?

Cheers!

Chris
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 29, 2016, 03:06:38 PM
I'm running the standalone version.  Where do I edit the PHP to add in my own banner information?  What I've been trying hasn't been working.
If you are running your own website structure, you probably have a small page with only the standard things like banners menu and so on.  To create new pages for your website. Lets call it newpage.php

The ws_bloomsky.php script should be set to ONLY output the div with all bloomsky information.

Then you use the php include 'ws_bloomsky.php'; in a copy if your newpage.php and run it as another page on your site.

So the principle is: 
1. not add anything to the ws_bloomsky script
 but
2. simply include it on one of your existing pages at the exact location where the div should come.

As English is not my native language, i hope I explained it good enough.

Wim
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 29, 2016, 03:11:11 PM
@chrisgrainger
It is a pity but that error will come back.
I googled and it seems to go and come back. 
Something with the "storage.googleapis.com" <=> ip6 <=> https

So there is a setting to not use the https, line 45 comment, line 46 uncomment.
Do this when the error re-occurs.

Cross fingers that it will stay away.

Wim
Title: Re: Bloomsky, another script
Post by: 92merc on February 29, 2016, 03:18:48 PM
Perfect!  Thanks for all of your work WIM.  I appreciate it.
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 03:23:34 PM
@chrisgrainger
It is a pity but that error will come back.
I googled and it seems to go and come back. 
Something with the "storage.googleapis.com" <=> ip6 <=> https

So there is a setting to not use the https, line 45 comment, line 46 uncomment.
Do this when the error re-occurs.

Cross fingers that it will stay away.

Wim

I was just about to let you know it was back.  All I did was change the $bl_header and it came back.  I'll do the HTTPS change and let you know..

Thanks again

Chris
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 03:35:53 PM
I think I'll leave it be for a while.  The error is still there...

 [ You are not allowed to view attachments ]

...and now it is affecting the sunshine chart in the sidebar.  The chart is normal across the rest of the site.  Maybe it just needs to rest a bit.  :grin:
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 04:00:03 PM
Wim,

Don't know if this helps or hinders, but I did change the HTTPS setting per your suggestion.  Same error running wxbloomsky.php.  If I run ws_bloomsky_v.php, here is what I get....

 [ You are not allowed to view attachments ]

Hope that helps

Chris
Title: Re: Bloomsky, another script
Post by: chrisgrainger on February 29, 2016, 04:02:56 PM
Further...

Trying to log into my dashboard with proper credentials gives this....

 [ You are not allowed to view attachments ]

Looks as if it's a Bloomsky problem maybe?

Chris
Title: Re: Bloomsky, another script
Post by: Fox_Of_The_Wind on February 29, 2016, 05:59:56 PM
love the script. Just a idea for the standalone version. A way to be able to add a link to the main page of the website that is hosting it.. So incase someone comes to it from a search they could find the rest of your weather site.

Just a thought

Title: Re: Bloomsky, another script
Post by: hankster on February 29, 2016, 11:44:30 PM
Looks good in the Saratoga template. Thanks for all your hard work!

http://www.northfortmyersweather.com/weather/wxbloomsky.php
Title: Re: Bloomsky, another script
Post by: wvdkuil on March 01, 2016, 03:37:46 AM
Further...

Trying to log into my dashboard with proper credentials gives this....
. . . shortened . . .

Looks as if it's a Bloomsky problem maybe?

Chris
Good morning Chris,
I doubt it. All postings on the internet, at least the dozens I read, point to incomplete security communication between your server and some cloud "thing".

I tested a few times this morning: but there were no errors, but that is probably a lucky shot.

What did I do also: I changed the checking of the errors to ignore everything and only stop when there is no correct data. Even when the error occurs, there seems to be sufficient data to display.

I attach those two scripts for Saratoga without the error checking and lets see what data is displayed.
You should ONLY add your API-key and test a few times. When there are no errors for hours, you can further customize.

It should work for you without errors.

===

If this does not work either we should include a correct API-key from another Bloomsky user.
If the problem is gone with the other key =>   the problem is related to your API-key.
If the there are still errors =>  the cause is related to your webserver/webhoster.

Wim
Title: Re: Bloomsky, another script
Post by: wvdkuil on March 01, 2016, 04:48:37 AM
I think I'll leave it be for a while.  The error is still there...
. . . shortened . .
...and now it is affecting the sunshine chart in the sidebar.  The chart is normal across the rest of the site.  Maybe it just needs to rest a bit.  :grin:
The extra error is always there, but it is not displayed normaly.
But the debug/error reporting setting is on in wxbloomsky.php
That is no problem, especialy as we are trying to catch the errors in our script.
Code: [Select]
ini_set('display_errors', 1);
error_reporting(E_ALL);
To remove the display of all errors set lines 3 and 4 in wxbloomsky.php  to comment by adding a # at the first position.
Code: [Select]
#ini_set('display_errors', 1);
#error_reporting(E_ALL);
Wim
Title: Re: Bloomsky, another script
Post by: chrisgrainger on March 01, 2016, 08:27:49 AM
I attach those two scripts for Saratoga without the error checking and lets see what data is displayed.
You should ONLY add your API-key and test a few times. When there are no errors for hours, you can further customize.

It should work for you without errors.


Hi Wim,

Aside from the errror indicating that there are now only 4 days of video (ie, one PHP error) and the error on the sunshine pie chart, the revised wsbloomsky.php script is working...albeit in imperial units because all I changed was the API key.  Also, ws_bloomsky_v.php works with imperial units. 

I'll let them run a bit today and see if I notice anything else.  I'll change them to metric units later on and see if that causes any issues.  I'll let you know either way.

Thanks very much for working on this for me.  Above and beyond for sure.

Cheers!

Chris
Title: Re: Bloomsky, another script
Post by: chrisgrainger on March 01, 2016, 08:29:20 AM
I think I'll leave it be for a while.  The error is still there...
. . . shortened . .
...and now it is affecting the sunshine chart in the sidebar.  The chart is normal across the rest of the site.  Maybe it just needs to rest a bit.  :grin:
The extra error is always there, but it is not displayed normaly.
But the debug/error reporting setting is on in wxbloomsky.php
That is no problem, especialy as we are trying to catch the errors in our script.
Code: [Select]
ini_set('display_errors', 1);
error_reporting(E_ALL);
To remove the display of all errors set lines 3 and 4 in wxbloomsky.php  to comment by adding a # at the first position.
Code: [Select]
#ini_set('display_errors', 1);
#error_reporting(E_ALL);
Wim

Like I say, I'll let them run a bit with just the API key changed... I'll fire the url to a few friends and see what they see.  Then I'll make other adjustments and see what happens.

Cheers!

Chris
Title: Re: Bloomsky, another script
Post by: chrisgrainger on March 02, 2016, 09:31:08 AM
Hi Wim,

Script is running very well here now.  I've changed to display metric units, added my own description and so on.  Had some friends pound it for a while.  No issues.  I turned off error checking on wxbloomsky.php to suppress the error in the sun piechart. 

Thanks very much for all your help.

Cheers!

Chris
Title: Re: Bloomsky, another script
Post by: Jumpin Joe on March 02, 2016, 02:04:42 PM
Installed the app and getting a bunch of errors and do not know how to correct them.

http://joesweather.info/wxbloomsky.php

Notice: Undefined variable: DropdownMenuText in /home/joes/www/www/header.php on line 84

Notice: Undefined offset: -1 in /home/joes/www/www/ws_bloomsky.php on line 204

Notice: Undefined offset: 4 in /home/joes/www/www/ws_bloomsky.php on line 288

Notice: Undefined offset: 3 in /home/joes/www/www/ws_bloomsky.php on line 289

Notice: Undefined offset: 2 in /home/joes/www/www/ws_bloomsky.php on line 290

Notice: Undefined offset: 1 in /home/joes/www/www/ws_bloomsky.php on line 291

Notice: Undefined offset: 0 in /home/joes/www/www/ws_bloomsky.php on line 292

Anyone know how to correct these?

Thanks,

Joe
Title: Re: Bloomsky, another script
Post by: wvdkuil on March 02, 2016, 02:50:24 PM
Installed the app and getting a bunch of errors and do not know how to correct them.

http://joesweather.info/wxbloomsky.php

Notice: Undefined variable: DropdownMenuText in /home/joes/www/www/header.php on line 84

Notice: Undefined offset: -1 in /home/joes/www/www/ws_bloomsky.php on line 204

Notice: Undefined offset: 4 in /home/joes/www/www/ws_bloomsky.php on line 288

Notice: Undefined offset: 3 in /home/joes/www/www/ws_bloomsky.php on line 289

Notice: Undefined offset: 2 in /home/joes/www/www/ws_bloomsky.php on line 290

Notice: Undefined offset: 1 in /home/joes/www/www/ws_bloomsky.php on line 291

Notice: Undefined offset: 0 in /home/joes/www/www/ws_bloomsky.php on line 292

Anyone know how to correct these?

Thanks,

Joe
The page has error settingh switched on at the beginning of the script.
Switching it off (setting the lines to comment) will remove the errors.
See this post: http://www.wxforum.net/index.php?topic=28820.msg280917#msg280917

The first one is an error in all pages as it comes from the header.php script which is on every page.

The other lines are form the bloomsky script as it seems that there are no movies yet.
After 5 more days these line would also be gone.

===
Behind your black background there are 3 more errors to take care off. They are also on every page but the black background hides these errors.
That is why there is that much empty space above your page.

Wim
Title: Re: Bloomsky, another script
Post by: Jumpin Joe on March 02, 2016, 03:38:59 PM
Thank you Wim!!

In the process of switching my site over to what is being displayed and have not got everything worked out yet. Not very good with scripts, etc.

I will take the error reporting out temporarily and seek some assistance on the errors.

Joe

Title: Re: Bloomsky, another script
Post by: W3DRM on March 04, 2016, 12:01:49 PM
Wim,

Here's another thought for this script. You currently are showing up to four prior videos. Using the links that are created in the script, I played with the date of the mp4 files and found that Bloomsky apparently keeps some finite number of old videos that you can access. For mine, on this date, I was able to manually select and view videos all the way back to Feb 16, 2016 which is twelve days of videos. I'll check tomorrow but I suspect the number of files kept is limited to perhaps only the last 12 days of files. What would be nice is for the script to look at what videos are available and then create a listing that is displayed so the viewer could look at any of those still available.
That is a nice idea, but the overhead for checking if all those files exist, should be quit a task slowing the start-up.

Another possibility: we add a "Bloomsky member since" setting, show 5 buttons + plus a dropdown with all dates until start membership.
If they not keep all videos we maybe find a max number of videos they keep and can use that to restrict the size of the dropdown.

HELP WANTED:  But someone with an active Bloomsky device should first find out if one can go back to the first day ( +1 as it is yesterdays movie) of membership.

Wim

P.S. I hope Bloomsky starts shipping to Europe again soon.

Wim,

Not sure if you have had any time to work on building a dropdown list of available Bloomsky videos. Just thought I would ask. You did ask if we could go back to the beginning of our membership with Bloomsky and view those videos. My first video started on Feb 16, 2016. I can view it and all following videos just fine. I have no idea how far back Bloomsky is going to keep those videos but so far, it has been all of them for me. Others who have been on-line longer may have that answer to your question.
Title: Re: Bloomsky, another script
Post by: wvdkuil on March 04, 2016, 12:11:53 PM

Not sure if you have had any time to work on building a dropdown list of available Bloomsky videos. Just thought I would ask. You did ask if we could go back to the beginning of our membership with Bloomsky and view those videos. My first video started on Feb 16, 2016. I can view it and all following videos just fine. I have no idea how far back Bloomsky is going to keep those videos but so far, it has been all of them for me. Others who have been on-line longer may have that answer to your question.
The dropdown is relative easy, but I waited a short time to see if new errors crop up.
Will put on the ToDo-list for next-week, as a change in WU URL's is killing a few important scripts.
Has to test solutions for that first.

Wim
Title: Re: Bloomsky, another script
Post by: W3DRM on March 04, 2016, 12:14:00 PM

Not sure if you have had any time to work on building a dropdown list of available Bloomsky videos. Just thought I would ask. You did ask if we could go back to the beginning of our membership with Bloomsky and view those videos. My first video started on Feb 16, 2016. I can view it and all following videos just fine. I have no idea how far back Bloomsky is going to keep those videos but so far, it has been all of them for me. Others who have been on-line longer may have that answer to your question.
The dropdown is relative easy, but I waited a short time to see if new errors crop up.
Will put on the ToDo-list for next-week, as a change in WU URL's is killing a few important scripts.
Has to test solutions for that first.

Wim

Thanks - no hurry.
Title: Re: Bloomsky, another script
Post by: W3DRM on March 04, 2016, 02:39:21 PM
Just found this on the Bloomsky Q&A section of their website.
It looks like the limit of archived videos will be around 4 months. But, we can still manually download the videos to our local hard drives for permanent archiving.
Title: Re: Bloomsky, another script
Post by: 92merc on March 09, 2016, 12:39:49 PM
WIM, is it possible to remark out the following fields so they don't show up on screen?

I'd like to remove:
Is it nightime:
Is it raining:
Pressure: 

I'd like to remove pressure at least until they can correct the barometer error issue.  It's way off my Davis station and other nearby stations.  The other two I don't think are needed.

Thanks.
Title: Re: Bloomsky, another script
Post by: Bob3rd on March 11, 2016, 12:33:47 PM
Just another script.

Can be used in any website/template.
Outputs one < div > with CSS included which will try to fit in the area you give it (100%).
Making the screen wider enlarges the images until 640*640px.
To use the 5 movies it needs html5 but that is fairly common.

This is the FIRST version so  I need all YOUR comments to improve the script.
As most users are in the US, I used English as default and translated to Dutch (nl). I will translate the other languages shortly.

To test/use the script:
1. go to your Bloomsky dashboard at http://dashboard.bloomsky.com and obtain your API key by clicking at the bottom/left on "Developers"
2. Copy that strange sequence of characters and paste in in the script in the first setting (= line 5).

Run the script in your browser. Should look like the attached first picture for the component (to integrate in a page)
The second picture is for the vertical version

Wim

EDIT 2016-MAR-01 17:00 UTC: Minor documentation updates, minor script updates. no need to reinstall
EDIT 2016-FEB-29  17:00 UTC:  Download is now complete with both scripts and versions or Saratoga/Leuven/others
Hi Wim.  I tried running your vertical script on my website at http://bbbrown.com/Bloomsky/ws_bloomsky_v.php with my API.  For some reason it returns errors.
Code: [Select]
Data retrieved: ()
Errors occured:
Error occured: error number (35) error message =(Unknown SSL protocol error in connection to api.bloomsky.com:443 )
Unknown (non-json) data =() first 40 charecters of returned data only

Here's my code containing my API:
Code: [Select]
#-----------------------------------------------------------------------
# settings:
#-----------------------------------------------------------------------
$bl_api_key     = 'api key here';   // obtained from your bloomsky dashboard => click "Developers" at the left bottom
#
$bl_intl_units  = true;         // for non-us display of data

I apologize but I am having a heck of a time getting yours or Jachym's scripts to run on my server.  If anyone has any ideas as to what might be causing my problems I would love to hear them.  Thanks for any feedback.

Bob
Title: Re: Bloomsky, another script
Post by: wvdkuil on March 11, 2016, 12:41:06 PM

. . . shortened . . .

I apologize but I am having a heck of a time getting yours or Jachym's scripts to run on my server.  If anyone has any ideas as to what might be causing my problems I would love to hear them.  Thanks for any feedback.

Bob
I attached a script to display the version of PHP, so we can check at least that.

Unzip and place where the other scripts are also.
Then run it with  http://bbbrown.com/Bloomsky/info2.php

What is interesting is the first line which display the PHP version.

Wim
Title: Re: Bloomsky, another script
Post by: 92merc on March 11, 2016, 03:08:44 PM
I apologize but I am having a heck of a time getting yours or Jachym's scripts to run on my server.  If anyone has any ideas as to what might be causing my problems I would love to hear them.  Thanks for any feedback.

Bob

I had the same error when trying to run the scripts as well.  I never got Jachyms script working.  But on Wim's it's easy.

Look for this line "$bl_https"  and change it to "#$bl_https".  The hash mark remarks that out.

Then on the next line, take out them on "#$bl_http" and change it to "$bl_http".

Basically you're saying instead of using HTTPS to call the Google API, use regular HTTP.
Title: Re: Bloomsky, another script
Post by: Bob3rd on March 15, 2016, 06:46:02 AM
Just for general info, my problem turned out to be the version of PHP running on my server.  When I changed it from 5.3 to 5.5 everything started working.
Title: Bloomsky, another script version 2017
Post by: wvdkuil on April 10, 2017, 05:02:38 AM
New version supporting the SKY2 and STORM

Although the API is still changing the new stations need new versions of the scripts.
New version 2017-04-10: leuven-template.eu/bloomsky_20170410.zip (http://leuven-template.eu/bloomsky_20170410.zip)

Supporting Saratoga / Leuven / Stand-alone

Bloomsky does not sell their devices to Belgium, but besides it is far to expensive for me also.
Testing with the changed API was therefor done with one user only.

Wim


Title: Re: Bloomsky, another script version 2017
Post by: SpringHillWeather on April 11, 2017, 06:04:35 PM
New version supporting the SKY2 and STORM

Although the API is still changing the new stations need new versions of the scripts.
New version 2017-04-10: leuven-template.eu/bloomsky_20170410.zip (http://leuven-template.eu/bloomsky_20170410.zip)

Supporting Saratoga / Leuven / Stand-alone

Bloomsky does not sell their devices to Belgium, but besides it is far to expensive for me also.
Testing with the changed API was therefor done with one user only.

Wim

Thank you Wim, working at Leuven (http://dhweather.net/index.php?p=&lang=en) and Saratoga (http://statenislandweather.net/index.php)

It's appreciated.
Title: Re: Bloomsky, another script
Post by: nelkebza on April 16, 2017, 05:23:38 PM
It's working perfect  :grin:

Thanx
Title: Re: Bloomsky, another script
Post by: mkutche on August 01, 2017, 08:34:02 PM
Looks good but 2 things how do i get rid of Notice: Undefined offset: -1 in /home/mkutche/public_html/ws_bloomsky.php on line 237 and how do i change my units?? http://gosportwx.com/wxbloomsky.php

Mike
Title: Re: Bloomsky, another script
Post by: wvdkuil on August 02, 2017, 03:02:42 AM
Looks good but 2 things how do i get rid of Notice: Undefined offset: -1 in /home/mkutche/public_html/ws_bloomsky.php on line 237
The script assumes you have a Bloomsky camera, that it is installed and fully operational.
When it has at least 1 video to display, the error will be gone
Quote
and how do i change my units?? http://gosportwx.com/wxbloomsky.php
Mike
The downloaded folder contains the english readme.  One setting must be made, check the script for the "units" setting (around line 10 & 11)
Code: [Select]
$bl_intl_units  = true;         // for non-us display of data
#$bl_intl_units  = false;       // remove # when using imperial units
As you are using US (imperial)  units, remove the comment mark (the #) at the start of line 11.

All other settings should be copied fine from your Saratoga settings file.
Wim
Title: Re: Bloomsky, another script
Post by: Bob3rd on February 26, 2018, 10:24:32 AM
I've started getting this when I go to my php script with my browser.  I'm not a coder.
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in ws_bloomsky.php on line 190
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 26, 2018, 11:12:40 AM
I've started getting this when I go to my php script with my browser.  I'm not a coder.
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in ws_bloomsky.php on line 190

Can you please post the URL to the page with problems so I can take a look what script you are using?
The recent versions do not have a line 190 which could generate that error.

The most up-to-date version is a few post above https://www.wxforum.net/index.php?topic=28820.msg320542#msg320542

Wim
Title: Re: Bloomsky, another script
Post by: Bob3rd on February 26, 2018, 11:25:05 AM
http://bbbrown.com/Bloomsky/ws_bloomsky.php and thanks for the link to the latest version of the script.  I'll download and install it.
Title: Re: Bloomsky, another script
Post by: wvdkuil on February 26, 2018, 11:38:42 AM
http://bbbrown.com/Bloomsky/ws_bloomsky.php and thanks for the link to the latest version of the script.  I'll download and install it.
These are the timezone lines in the first lines of the script when just downloaded:
Code: [Select]
$bl_timezone    = false;        // set outside the script
#$bl_timezone    = 'America/New_York';   // remove the comment mark to use your own time zone and set a valid timezone
If you are running the script stand-alone (not in other php script) you should set your own timezone by changing the second line
1. remove the comment mark, that is the # on the first position
2. If not in timezone New_York, find your correct PHP timezone here (http://php.net/manual/en/timezones.america.php)

Wim
Title: Re: Bloomsky, another script
Post by: Bob3rd on February 26, 2018, 11:44:48 AM
Thanks very much.  That fixed the problem.  Much appreciated.