0
Discuss

Bloomsky Image

KevinJ 2 years ago in Media Tiles / Images updated by seafoodrice 4 months ago 14

New to ActionTiles and I can't seem to figure out how to get my Bloomsky Weather Picture to show up? I have it setup as a device in SmartThings and I am getting the readings from the Bloomsky but I don't see where I can add the image. Is this possible?

+1

The only way I know to do it is via weather underground.  If you connect to bloomsky to it, they publish an image that you can load via action tiles media tile.  I have this working.  See instructions here....


https://community.smartthings.com/t/bloomsky-weather-underground/39659


+1


my last BloomSky for today in ActionTiles

+1
Discuss

Is the Bloomsky image shown in the SmartThings App (it might not help us a lot though, because there is no API provided by SmartThings into their captured video...).


I recommend Googling for "Bloomsky video URL" as way to start research.


So far, I found a method that likely requires running a simple PHP server. Hopefully there's an easier option. https://www.wxforum.net/index.php?topic=29422.msg288611#msg288611

+1

This just became a much higher priority issue for lots of us, because Weather Underground has terminated its user-uploaded webcam program.  :( 


So, now we're trying to figure out other ways of getting our BloomSky images onto our ActionTiles panels.
The one you linked is one of only two alternatives I've found so far.

The other one uses IFTTT to send it to DropBox, and then one or another app/tool/service to grab it from there, and something else to upload it to where it would be linked to from the Panel. 

I think this should point to the thread on the SmartThings forum...

https://community.smartthings.com/t/bloomsky-weather-station/38202/1784

I haven't tried either alternative yet, but will be doing so shortly. 

Mainly, I wanted to come in here to make sure I'm subscribed to this thread, because I would be interested to see if anybody comes up with anything else for this.  :-)

+1

I finally decided to actually try the PHP script (links below) that's out there, and it works PERFECTLY (much simpler and easier than trying to do it with a complex mash of online services and locally running apps and services, etc)! 


With this method, the only catch (pointed out by Terry above) is that your webspace needs to support PHP; most do now days. So, give it a try.....if it works, you're good to go.  :-) 


VERY-basic-instructions: 
For anyone (like me) with multiple BloomSky units, you will need to 
 (if you only have a single BloomSky unit, just ignore step 3) 

1. Create a separate copy of the script for each BloomSky unit  

2. Insert your BloomSky API key where it says in the script 

3. In the line like this...
$imageURL = $data[1]['Data']['ImageURL'];
...the numerical value represents which BloomSky unit the image is being grabbed from.
The first one in your account will be digit 0, and the second one will be the digit 1, and so on. 

4. Upload (use plain, old notepade for editing, and ftp for uploading to make sure there is no odd formatting or anything) that PHP file to a directory in your webspace. 

5. Point the src= of wherever you're wanting the image to this PHP file. 
 i.e. in the case of those of use wanting these images on our ActionTiles Panels, etc, use the URL to this PHP file to create a new entry in 'My Media', and use as normal. 


Credits...


Originally shared by username Jáchym on WXforum.net
https://www.wxforum.net/index.php?topic=28883.0


Reposted by username Johnny on Meteotemplate Forum
http://www.meteotemplate.com/forum/viewtopic.php?t=160http://www.meteotemplate.com/forum/viewtopic.php?t=160

I put the php file up to the website http://skyimage.azurewebsites.net/index.php

but when I added the url as media, it is not able to load the image on the media tiles. Any idea?

Thanks in advance..

That's a web page address, not the address of an "image".

Unfortunately, the image address likely changes each time that web page changes. Right click (or long-tap) on the current picture, for example, and you get this URL below - which can be used in a Media Tile, but is likely static and will never change. You'd need to have a server that "scrapes" the web page to find the most current image file address.

http://s3-us-west-1.amazonaws.com/bskyimgs/faBiuZWsq6eqn5W4qJ1lrJqqmJermpU=.jpg

Thanks Terry for the reply. If that’s the case, is there anyway to update media url setting programmatically? REST api will be ideal?

An inbound API for ActionTiles (for dynamic Media Tile definitions, etc.) is not off the table, and we've heard a few requests for it. We know of many possible use cases.

Realistically and transparently, this is not something we are likely to do in the near future due to the fact it would only be used by a very small niche of "power users". Thanks for expressing interest.

I’m surprised it doesn’t work, the URL returns an image in chrome browser tab. It’s not appending random numbers like some sites do either. 

I’m not familiar with PHP, can you tweak code to store the image on your web server?  Just curious, running on Pi?

@Sgni still around?


Kevin... This is a pretty "random" number:  

faBiuZWsq6eqn5W4qJ1lrJqqmJermpU=

for me the url doesn’t change 


The URL returns a web page containing a single image tag "<img ...>..." rather than the required plain JPG, PNG, or GIF image data.

For this to be usable in ActionTiles, the <img> tag has to stripped from the received data and then next redirected to the actual JPG address for the image bytes to be returned. 

We don't have a built-in method to do this automatically, but perhaps injected Javascript can (see below).

+1

First of all, thanks Terry and Kevin of the prompt reply and support. Amazed that a 2 years old thread can be revived in the AT forum.

Redirect request in php is simple, $imageURL is the recent image url from BS api. 

header("Location: ".$imageURL)

Thank you for pointing to right direction.