Author Topic: Bloomsky, another script  (Read 7576 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Bloomsky, another script
« 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



« Last Edit: March 01, 2016, 10:24:27 AM by wvdkuil »
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 3617
    • KomokaWeather
Re: Bloomsky, another script
« Reply #1 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

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 547
  • BismarckWeather.net
    • BismarckWeather.net
Re: Bloomsky, another script
« Reply #2 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
http://www.BismarckWeather.net
Davis VP2, Cumulus, Blitzortung, Bloomsky, Saratoga Scripts

Offline StatenIslandWeather

  • Weather Hobbyist
  • Forecaster
  • *****
  • Posts: 528
  • Staten Island, New York
    • StatenIslandWeather
Re: Bloomsky, another script
« Reply #3 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
 
« Last Edit: February 27, 2016, 12:19:15 PM by StatenIslandWeather »
Saratoga http://statenislandweather.net
Leuven http://dhweather.net
Meteotemplate http://donganhillsweather.net
HomeWeatherStation http://nyweather.net
HomeBrew http://w.nyweather.net

Ambient 1001 | ObserverIP | Meteobridge | MeteoPlug

Offline ke9lz

  • De Pere - Athelstane Weather
  • Contributor
  • ***
  • Posts: 124
    • De Pere Weather
Re: Bloomsky, another script
« Reply #4 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 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?
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #5 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
« Last Edit: February 27, 2016, 02:07:21 PM by wvdkuil »
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #6 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 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
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #7 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
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline jerbo

  • Davis Vantage Pro2 with 24 Hour FARS located in the West End of Punxsutawney, PA - The Weather Capital of the World.
  • Member
  • *
  • Posts: 31
    • Punxsutawney West End Weather
Re: Bloomsky, another script
« Reply #8 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.

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3192
    • Carson Valley Weather
Re: Bloomsky, another script
« Reply #9 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!
Don - W3DRM - Minden, Nevada --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KRNO2
Davis Wireless VP2, WD 10.37S-b53,
StartWatch, VirtualVP, VPLive, , Win10 Pro
--- Logitech HD Pro C920 webcam
--- RIPE Atlas Probe - 32849

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3192
    • Carson Valley Weather
Re: Bloomsky, another script
« Reply #10 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.
Don - W3DRM - Minden, Nevada --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KRNO2
Davis Wireless VP2, WD 10.37S-b53,
StartWatch, VirtualVP, VPLive, , Win10 Pro
--- Logitech HD Pro C920 webcam
--- RIPE Atlas Probe - 32849

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #11 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
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #12 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.


Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline Fox_Of_The_Wind

  • Forecaster
  • *****
  • Posts: 369
  • Hi there!
    • http://www.desotowiwx.com
Re: Bloomsky, another script
« Reply #13 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.  ](*,)

My BloomSky Station
Blitzortung Station #1328
My 2nd weather site
Anthony

Offline chrisgrainger

  • Senior Member
  • **
  • Posts: 96
    • Top of The Rideau
Re: Bloomsky, another script
« Reply #14 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


Offline Fox_Of_The_Wind

  • Forecaster
  • *****
  • Posts: 369
  • Hi there!
    • http://www.desotowiwx.com
Re: Bloomsky, another script
« Reply #15 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!!!!!!

My BloomSky Station
Blitzortung Station #1328
My 2nd weather site
Anthony

Offline kc2kzz

  • Member
  • *
  • Posts: 32
    • Warren County Skywarn
Re: Bloomsky, another script
« Reply #16 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.
« Last Edit: February 28, 2016, 09:25:18 AM by kc2kzz »
http://www.warrenskywarn.org
Davis Vantage Vue
BloomSky

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #17 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
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline kc2kzz

  • Member
  • *
  • Posts: 32
    • Warren County Skywarn
Re: Bloomsky, another script
« Reply #18 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

« Last Edit: February 28, 2016, 09:50:08 AM by kc2kzz »
http://www.warrenskywarn.org
Davis Vantage Vue
BloomSky

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #19 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
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline ke9lz

  • De Pere - Athelstane Weather
  • Contributor
  • ***
  • Posts: 124
    • De Pere Weather
Re: Bloomsky, another script
« Reply #20 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.
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline jerbo

  • Davis Vantage Pro2 with 24 Hour FARS located in the West End of Punxsutawney, PA - The Weather Capital of the World.
  • Member
  • *
  • Posts: 31
    • Punxsutawney West End Weather
Re: Bloomsky, another script
« Reply #21 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.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1117
    • Support site Leuven Template and scripts
Re: Bloomsky, another script
« Reply #22 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.
:oops:
The corrected script (v3) is in the first post.
Wim
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline ke9lz

  • De Pere - Athelstane Weather
  • Contributor
  • ***
  • Posts: 124
    • De Pere Weather
Re: Bloomsky, another script
« Reply #23 on: February 28, 2016, 10:22:21 AM »
Works perfect now!  Thanks for a great script!
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline hankster

  • Forecaster
  • *****
  • Posts: 449
    • NFM Weather
Re: Bloomsky, another script
« Reply #24 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

 

anything