|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Google Weather API v1
Since the weather.com feed has been closed, weather data in SageTV is now provided via the Google Weather plugin. To assist anyone updating the weather display in a customization, here are the available API calls that can be used directly in Studio:
First get an instance of this class using: Weather = sage_google_weather_GoogleWeather_getInstance() The version of this class can be obtained from: sage_google_weather_GoogleWeather_getWeatherVersion() The location for Google Weather can be set using: (can be a zip code, postal code, city,state, city,country, etc.) sage_google_weather_GoogleWeather_setGoogleWeatherLoc(Weather, "CityName") To clear the Google Weather location: sage_google_weather_GoogleWeather_removeGoogleWeatherLoc(Weather) The Zip Code location for NWS Weather can be set using: (must be a zip code in the US) sage_google_weather_GoogleWeather_setNWSZipCode(Weather, "01234") To clear the NWS Weather zip code location: sage_google_weather_GoogleWeather_removeNWSZipCode(Weather) The the units can be set using: (mus be "s" or "m", for standard/english or metric, respectively; default: "s") sage_google_weather_GoogleWeather_setUnits(Weather, "s") To cause an update to occur (it respects caching, returns a boolean): sage_google_weather_GoogleWeather_updateAllNow(Weather) To use an ISO 639-1 Language Code with Google weather: sage_google_weather_GoogleWeather_updateAllNow(Weather,"LangCode") To update only Google weather (with or w/o a lang code): sage_google_weather_GoogleWeather_updateGoogleNow(Weather) sage_google_weather_GoogleWeather_updateGoogleNow(Weather,"LangCode") To update only NWS weather (with or w/o a lang code): sage_google_weather_GoogleWeather_updateNWSNow(Weather) To Get more info: sage_google_weather_GoogleWeather_getGoogleWeatherLoc(Weather) returns String sage_google_weather_GoogleWeather_getNWSZipCode(Weather) returns String sage_google_weather_GoogleWeather_getUnits(Weather) returns String, "s" (default) or "m" sage_google_weather_GoogleWeather_isCurrentlyUpdatingAll(Weather) sage_google_weather_GoogleWeather_isCurrentlyUpdatingGW(Weather) sage_google_weather_GoogleWeather_isCurrentlyUpdatingNWS(Weather) sage_google_weather_GoogleWeather_getLastError(Weather) return String sage_google_weather_GoogleWeather_getLastUpdateTime(Weather) returns long sage_google_weather_GoogleWeather_getLastUpdateTimeGW(Weather) returns long sage_google_weather_GoogleWeather_getLastUpdateTimeNWS(Weather) returns long Get Google weather info: sage_google_weather_GoogleWeather_getGWCityName(Weather) return String Get current condition for properties: (propName can be one of: CondText, HumidText, Temp, iconURL, WindText) sage_google_weather_GoogleWeather_getGWCurrentCondition(Weather,propName) return String sage_google_weather_GoogleWeather_getGWCurConditionProperties(Weather) returns a Map sage_google_weather_GoogleWeather_getGWDayCount(Weather) return int Get forecast condition for properties on day #: (propName can be one of: CondText, high, iconURL, low, name) sage_google_weather_GoogleWeather_getGWForecastCondition(Weather,dayNum,propName) return String sage_google_weather_GoogleWeather_getGWForecastConditionProperties(Weather,dayNum) returns a Map Get NWS weather info: sage_google_weather_GoogleWeather_getNWSCityName(Weather) return String sage_google_weather_GoogleWeather_getNWSPeriodCount(Weather) return int Get forecast condition for properties in 12h period #: (propName can be one of: forecast_text, icon_url, name, precip, summary, temp, tempType - returns h or l) sage_google_weather_GoogleWeather_getNWSForecastCondition(Weather,periodNum,propName) return String sage_google_weather_GoogleWeather_getNWSForecastConditionProperties(Weather,periodNum) returns a Map
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#2
|
||||
|
||||
Thanks Andy. I installed the new STV update and all is well.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#3
|
|||
|
|||
SageMC weather update?
How do I get SageMC to use this for weather info?
|
#4
|
||||
|
||||
If you are asking whether SageMC will be updated, please post in the SageMC forum.
If you are asking how you would do it... then you would need to edit the SageMC STV in Studio to use the new weather API calls & changed data from those calls. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#5
|
|||
|
|||
SageMC weather update
so I better hope that someone else (with good knowledge of studio, I have none) posts step by step instructions. Knew I should have gotten more invovled in learning how to use studio.
|
#6
|
|||
|
|||
Thanks for posting the details.
Is there any other information available from these sources (pressure, UV etc) or have you exposed all the data available through the API? Thanks again k |
#7
|
||||
|
||||
As far as I know, I made all weather data in the XML files available & displayed it all in the STV update.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#8
|
||||
|
||||
Andy, could document the Map for the following API
Code:
sage_google_weather_GoogleWeather_getGWCurConditionProperties(Weather) returns a Map
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#9
|
||||
|
||||
While you're at it, how about these as well:
Code:
sage_google_weather_GoogleWeather_getGWForecastConditionProperties(Weather,dayNum) returns a Map sage_google_weather_GoogleWeather_getNWSForecastConditionProperties(Weather,periodNum) returns a Map Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#10
|
||||
|
||||
Now that I'm back home...
Those calls return a map with the applicable properties mapped to their values. So, for example, getGWCurConditionProperties() would return a map of the valid propName parameters for getGWCurrentCondition() mapped to the values for each propName. (I don't actually use those calls; they were added just to match the similar calls available in the previous weather API.) - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#11
|
|||
|
|||
Hi,
I had a problem getting an image URL for a location and although I was using another API in conjunction with this plugin we thought you may have an idea as to why it wouldn't pull a valid image URL. Here's a link to the original thead. Thanks Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#12
|
||||
|
||||
This is using an undocumented Google weather API that was found on the web; whatever it returns is what it returns.
If it returns no icon, maybe there is no weather. Either be careful when you go outside, or try configuring a different/better location description for where you are. In the other topic, you said "The locations I entered was Scotland and Edinburgh." How about configuring the weather to use something more specific like "Edinburgh,Scotland"? - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#13
|
|||
|
|||
I think it was just that there was no valid URL for that weather condition as I got all the other weather details... its not a problem as everything else works.
Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#14
|
||||
|
||||
The reason I suggested trying a different location description, such as "Edinburgh,Scotland", is because I only saw a lack of info for condition & condition icon when using just "Scotland" as the location.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Google weather - not working !!!! | jusjoken | SageTV Software | 95 | 10-12-2012 03:09 PM |
Suddenly Lost Google Weather | Savage1701 | SageTV v7 Customizations | 2 | 07-09-2012 11:15 AM |
Any plugin developers interested in porting Google Weather to STV3? | Rezolution | SageTV v7 Customizations | 16 | 12-14-2011 08:51 AM |
FYI - Google Weather Broken | peterjb | SageTV Australia/New Zealand | 1 | 11-21-2011 03:07 PM |
Downloaded Google Weather Update, No weather? | symgryph | SageTV v7 Customizations | 3 | 11-18-2011 08:55 AM |