Skip to content

Weather Image for ActionTiles

    These image generators are now available directly from the ActionTiles cloud. Links below have been updated accordingly.  

    Introduction

    ActionTiles is a great interface for managing and controlling SmartThings. Having previously created a webpage that delivered a calendar image for use in ActionTiles I thought I’d have a go at creating some more ‘dynamic’ images.  Below are details for a Weather image.  The dynamic image can be found at https://mtg.actiontiles.com/weather.php

    Although it has a php extension the page returns a PNG image.

    Parameters / Customising the look

    Users can pass formatting options as URL parameters to override the default format.  For example:

    https://mtg.actiontiles.com/weather.php?backgroundColor=FFFFFF&bodyColor=00FF00&titleColor=000000

    Colors are entered as hex values (without the # symbol – using a # symbol will cause formatting requests to be ignored). The above sets the background color to white, the body color (the weather details) to green and the title (location name) color to black.  The full list of parameters is shown below.

    • layout – The size/proportion of the tile. Matches ActionTiles values. Valid values are 1×1, 1×2, 1×3, 2×1, 2×2, 2×3, 3×1, 3×2, 3×3  (3×2 is default).
    • backgroundColor – the background color of the image.
    • titleColor – the color of the title containing the location name.
    • bodyColor – the color of the text and icons showing the weather forecast.
    • loc – the location for which you want the weather.  Accepts zip/postal codes and city/town names. It is recommended that you use a country code (see below) if outside of USA.
    • country – the country of the location. This is given as a two letter ISO code. See http://www.nationsonline.org/oneworld/country_code_list.htm.
    • units – whether to show temperature in metric or imperial units.  Acceptable values are metric and imperial. Imperial is default.
    • static – (valid values – true or false) by default the image will ‘page’ through an extended forecast.  If you wish to have the image fix on the first ‘page’ of the forecast use static=true. False is default.

    Adding To ActionTiles

    Once you have determined the exact formatting that you wish to use, copy the URL including parameters and then:

    1. Go to https://app.actiontiles.com/media#panels (you must have an account and be logged in to view this page)
    2. Click on the Plus symbol in the bottom-right-hand corner of the screen to add new media.
    3. Select ‘This Media is a still image or GIF’
    4. Enter the URL in the URL field.
    5. Enter a refresh rate, if desired.  We recommend every hour which would be a value of 3600 seconds.  We strongly request that you don’t refresh more regularly than every 900 seconds.