Page 1 of 1

Google Weather plugin

Posted: August 24th, 2011, 1:18 pm
by nunopicado
Hi

I needed a weather plugin. Yahoo's doesn't show correctly on my location, BBC's not working, and couldn't find any for the Google Weather API, so... I made one!

What it does:
It supports any location and language supported by google weather, and can return current condition and forecasts up to 3 days in the future. Can show temperature of current conditions in either Celcius or Farenheit.

What is does not:
It doesn't allow the user to select Celcius or Farenheit for the Min and Max temperature forecasts. This is linked to the language used (Ex.: If you choose language EN, it returns temp in Farenheit. If you choose PT, it return in Celcius).

What is doesn't do yet:
Currently it refreshes it's information with google weather api every 15 minutes. This setting will be configurable as soon as I have the time for it, or if someone asks for it.




Instalation:
Just copy the file gweather.dll to the plugin folder in your LCD Smartie directory.

Usage:
$dll(gweather,1,<location>#<language>,<field>+<dayoffset)



Location:
Can be any accepted by google, either a postal code (for US locations) or a city (for everybody).
If the name of the city has spaces between them, they should be replaced by the + character

Language:
Again, any accepted by google, in the ISO 639-1 format (see yours in the following table: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)

Field:
There are two types of fields: The ones that accept a day offset (to specify the day of the desired forecast), and the ones that don't. All of them are case insensitive:

Day Offset not required:
PostalCode -> return the same location indicated by you (not very usefull, I now)
City -> returns the full city name, as understood by google
Date -> returns the date the forecast was made
DateTime -> returns current date and time
CurrentCondition -> returns current condition text
Ftemp -> returns current temperature in farenheit
Ctemp -> returns current temperature in celcius
Humidity -> returns current humidity percentage
Icon -> returns a link for the current condition icon (gif)
Wind -> returns current wind conditions

Day Offset required:
WeekDay - returns the day of the week initials (3 characters) of the day of choice
LowTemp - returns the lowest temperature expected for the day of choice
HighTemp - returns the highest temperature expected for the day of choice
FIcon - returns a link for the forecast conditions icon for the day of choice (gif)
Condition - returns condition text for the day of choice

Day Offset:
This specifies the day of the forecast conditions we want:
+0 - The forecast conditions of the present day (default: used if no day offset is specified on the fields that need it)
+1 - The forecast conditions of tomorrow
+2 - The forecast conditions of two days from now
+3 - The forecast conditions of three days from now



Examples:

$dll(gweather,1,Lisbon#Pt,CurrentCondition) --> Returns current condition in Lisbon, in portuguese
$dll(gweather,1,New+York#En,CurrentCondition) --> Returns current condition in New York, in english
$dll(gweather,1,Paris#It,Condition+1) --> Returns forecast condition for tomorrow in Paris, in italian


Hope you find this usefull...
Nuno Picado


GWeather.zip

Re: Google Weather plugin

Posted: October 14th, 2012, 12:44 pm
by Guest
I can't get the "Weekday+1"/"Weekday+2"/"Weekday+3" to work, the only thing i get on my display is a "P" - the "weekday+0" works great.

This is my code/string: $dll(gweather,1,Sindal#da,weekday+1) $dll(gweather,1,Sindal#da,Ctemp+1)

regards

Re: Google Weather plugin

Posted: September 2nd, 2013, 6:38 am
by aiza
Thanks for the testing, i've just updated the plug-in to add a function to display the time remaining the file attached to the first post is the latest version.

Re: Google Weather plugin

Posted: January 19th, 2017, 7:23 am
by James Kuo
Hi! I newly discovered LCD Smartie. And I am using version 5.4
I tried this plugin but it didn't work at all.
Maybe it's overdue. Can I have a update version for this plugin?