Is there a high temperature weather forecast tile?

This is a great idea. I have it installed, but when I try to configure it in the ST app, when I try to toggle “High” on, it takes me to a blank page where there is nothing to input. If I click “Done” on that page it says “Error saving unnamed page. Please contact SmartApp developer”. Any idea what’s up?

So this thread has been resurrected and hopefully after all this time since it started someone might have some info/ideas

I need a device type that will display the high and low forecast temps for the day. I need this for running thermostat programming routines with webCore. I can get away with just a high temp for the day. Is there anything someone has created to pull Hi temp forecast for the day?

Is there a smartapp that can do it and assign it to a virtual temp sensor, or a source that can can assign a value to device or variable with webcore?

ideas guys?

You should be able to do that in webCoRE directly using the $weather composite variable. Use the daily feature (look up Weather underground API for the daily feature. Others can help you figure it out, on my phone right now

@ady624
In the WU API, The forecast is simply an html link, it is not individual data points like all the current data is.

Nah, they have various data features you can call. Which one are you calling? One of them is called “forecast” - it’s not the .forecast property that contains an URL, it’s a whole different data feature. You can call it in the SmartApp with app.getWeatherFeature(‘forecast’) or you can do your own API with your own key.

Just trying to understand the data WU returns, is hour 1 the hour you initiated the request?

@ady624
Practically speaking, how would be the best way to access the data?

  1. Update weather station DTH capability to include and to poll it, regardless of it being added to tile page?

  2. Is there a direct webcore integration possibly like with a login to directly pull WX (weather) data into a possibly default piston for all users that contains all the variables preset to WU values? Or we could create it ourselves from a list of capabilities preloaded into webcore. This would be universal WX access for all webcore users without the Weather Station DTH.
    I’d assume you could locate it in the settings page, user enters zip code or WU cridentials like you would for your IFTTT cridentials.

  3. any other ideas?

I ask as I’m adaptive and can get a lot done with instructions but coding on my own is a little beyond my personal capabilities. So something either (doesn’t need to be advanced, just something basic but) tutorial style or turnkey would be the best. Any thoughts?

Have you tried @mbustillos1’s suggestion?

1 Like

I didn’t see that. Does that code get added to the WEather station DTH or use as an expression in webcore?

It’s an expression that you can use to get the highs/lows, save the result in a local or global variable.

Edit: Correction, actually you can use it as is.

1 Like

I am so on this tonight.
Set variable value to those “expressions” right?
Then just use the variables where needed?

Not sure how much overhead it introduces to ST’s system but you can just use $weather.forecast.forecast.simpleforecast.forecastday[0].high.fahrenheit anywhere you need it or… save it to a global variable once a day to be used on any of your pistons that would need it.

1 Like

Each run that uses the $weather triggers a request to WU - don’t know if ST is caching that info in any way, but I’d recommend storing the value in a variable and only reading it once in a while, say once per hour?

1 Like

Regarding the original poster’s request, is there a way to simply display the forecasted high temperature in SmartThings? Accuweather devices aren’t working, and neither v1 nor v2 of the smart weather station show the forecast temperature high (nor low) for the day.

You can. Use this expression:

$weather.forecast.forecast.simpleforecast.forecastday[0].high.fahrenheit

Look up https://www.wunderground.com/weather/api/d/docs?d=data/forecast for more details. You can parse through the JSON response from Weather Underground and pick up on any part you need.

This is a sample of the forecast feature of WU which I used to figure out the path to the high of today’s:

{
	"response": {
		"version": "0.1",
		"termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
		"features": {
			"forecast": 1
		}
	},
	"forecast": {
		"txt_forecast": {
			"date": "2:00 PM PDT",
			"forecastday": [
				{
					"period": 0,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Tuesday",
					"fcttext": "Partly cloudy in the morning, then clear. High of 68F. Breezy. Winds from the West at 10 to 25 mph.",
					"fcttext_metric": "Partly cloudy in the morning, then clear. High of 20C. Windy. Winds from the West at 20 to 35 km/h.",
					"pop": "0"
				},
				{
					"period": 1,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Tuesday Night",
					"fcttext": "Mostly cloudy. Fog overnight. Low of 50F. Winds from the WSW at 5 to 15 mph.",
					"fcttext_metric": "Mostly cloudy. Fog overnight. Low of 10C. Breezy. Winds from the WSW at 10 to 20 km/h.",
					"pop": "0"
				},
				{
					"period": 2,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Wednesday",
					"fcttext": "Mostly cloudy. Fog early. High of 72F. Winds from the WSW at 10 to 15 mph.",
					"fcttext_metric": "Mostly cloudy. Fog early. High of 22C. Breezy. Winds from the WSW at 15 to 20 km/h.",
					"pop": "0"
				},
				{
					"period": 3,
					"icon": "mostlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/mostlycloudy.gif",
					"title": "Wednesday Night",
					"fcttext": "Overcast. Fog overnight. Low of 54F. Winds from the WSW at 5 to 15 mph.",
					"fcttext_metric": "Overcast. Fog overnight. Low of 12C. Breezy. Winds from the WSW at 10 to 20 km/h.",
					"pop": "0"
				},
				{
					"period": 4,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Thursday",
					"fcttext": "Overcast in the morning, then partly cloudy. Fog early. High of 72F. Winds from the WSW at 10 to 15 mph.",
					"fcttext_metric": "Overcast in the morning, then partly cloudy. Fog early. High of 22C. Breezy. Winds from the WSW at 15 to 25 km/h.",
					"pop": "0"
				},
				{
					"period": 5,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Thursday Night",
					"fcttext": "Partly cloudy in the evening, then overcast. Fog overnight. Low of 54F. Winds from the WNW at 5 to 15 mph.",
					"fcttext_metric": "Partly cloudy in the evening, then overcast. Fog overnight. Low of 12C. Breezy. Winds from the WNW at 10 to 20 km/h.",
					"pop": "0"
				},
				{
					"period": 6,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Friday",
					"fcttext": "Overcast in the morning, then partly cloudy. Fog early. High of 68F. Winds from the West at 5 to 15 mph.",
					"fcttext_metric": "Overcast in the morning, then partly cloudy. Fog early. High of 20C. Breezy. Winds from the West at 10 to 20 km/h.",
					"pop": "0"
				},
				{
					"period": 7,
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"title": "Friday Night",
					"fcttext": "Mostly cloudy. Fog overnight. Low of 52F. Winds from the West at 5 to 10 mph.",
					"fcttext_metric": "Mostly cloudy. Fog overnight. Low of 11C. Winds from the West at 10 to 15 km/h.",
					"pop": "0"
				}
			]
		},
		"simpleforecast": {
			"forecastday": [
				{
					"date": {
						"epoch": "1340776800",
						"pretty": "11:00 PM PDT on June 26, 2012",
						"day": 26,
						"month": 6,
						"year": 2012,
						"yday": 177,
						"hour": 23,
						"min": "00",
						"sec": 0,
						"isdst": "1",
						"monthname": "June",
						"weekday_short": "Tue",
						"weekday": "Tuesday",
						"ampm": "PM",
						"tz_short": "PDT",
						"tz_long": "America/Los_Angeles"
					},
					"period": 1,
					"high": {
						"fahrenheit": "68",
						"celsius": "20"
					},
					"low": {
						"fahrenheit": "50",
						"celsius": "10"
					},
					"conditions": "Partly Cloudy",
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"skyicon": "mostlysunny",
					"pop": 0,
					"qpf_allday": {
						"in": 0,
						"mm": 0
					},
					"qpf_day": {
						"in": 0,
						"mm": 0
					},
					"qpf_night": {
						"in": 0,
						"mm": 0
					},
					"snow_allday": {
						"in": 0,
						"cm": 0
					},
					"snow_day": {
						"in": 0,
						"cm": 0
					},
					"snow_night": {
						"in": 0,
						"cm": 0
					},
					"maxwind": {
						"mph": 21,
						"kph": 34,
						"dir": "West",
						"degrees": 272
					},
					"avewind": {
						"mph": 17,
						"kph": 27,
						"dir": "West",
						"degrees": 272
					},
					"avehumidity": 72,
					"maxhumidity": 94,
					"minhumidity": 58
				},
				{
					"date": {
						"epoch": "1340863200",
						"pretty": "11:00 PM PDT on June 27, 2012",
						"day": 27,
						"month": 6,
						"year": 2012,
						"yday": 178,
						"hour": 23,
						"min": "00",
						"sec": 0,
						"isdst": "1",
						"monthname": "June",
						"weekday_short": "Wed",
						"weekday": "Wednesday",
						"ampm": "PM",
						"tz_short": "PDT",
						"tz_long": "America/Los_Angeles"
					},
					"period": 2,
					"high": {
						"fahrenheit": "72",
						"celsius": "22"
					},
					"low": {
						"fahrenheit": "54",
						"celsius": "12"
					},
					"conditions": "Partly Cloudy",
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"skyicon": "mostlysunny",
					"pop": 0,
					"qpf_allday": {
						"in": 0,
						"mm": 0
					},
					"qpf_day": {
						"in": 0,
						"mm": 0
					},
					"qpf_night": {
						"in": 0,
						"mm": 0
					},
					"snow_allday": {
						"in": 0,
						"cm": 0
					},
					"snow_day": {
						"in": 0,
						"cm": 0
					},
					"snow_night": {
						"in": 0,
						"cm": 0
					},
					"maxwind": {
						"mph": 11,
						"kph": 18,
						"dir": "WSW",
						"degrees": 255
					},
					"avewind": {
						"mph": 9,
						"kph": 14,
						"dir": "WSW",
						"degrees": 252
					},
					"avehumidity": 70,
					"maxhumidity": 84,
					"minhumidity": 54
				},
				{
					"date": {
						"epoch": "1340949600",
						"pretty": "11:00 PM PDT on June 28, 2012",
						"day": 28,
						"month": 6,
						"year": 2012,
						"yday": 179,
						"hour": 23,
						"min": "00",
						"sec": 0,
						"isdst": "1",
						"monthname": "June",
						"weekday_short": "Thu",
						"weekday": "Thursday",
						"ampm": "PM",
						"tz_short": "PDT",
						"tz_long": "America/Los_Angeles"
					},
					"period": 3,
					"high": {
						"fahrenheit": "72",
						"celsius": "22"
					},
					"low": {
						"fahrenheit": "54",
						"celsius": "12"
					},
					"conditions": "Partly Cloudy",
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"skyicon": "partlycloudy",
					"pop": 0,
					"qpf_allday": {
						"in": 0,
						"mm": 0
					},
					"qpf_day": {
						"in": 0,
						"mm": 0
					},
					"qpf_night": {
						"in": 0,
						"mm": 0
					},
					"snow_allday": {
						"in": 0,
						"cm": 0
					},
					"snow_day": {
						"in": 0,
						"cm": 0
					},
					"snow_night": {
						"in": 0,
						"cm": 0
					},
					"maxwind": {
						"mph": 14,
						"kph": 22,
						"dir": "West",
						"degrees": 265
					},
					"avewind": {
						"mph": 12,
						"kph": 19,
						"dir": "WSW",
						"degrees": 256
					},
					"avehumidity": 80,
					"maxhumidity": 91,
					"minhumidity": 56
				},
				{
					"date": {
						"epoch": "1341036000",
						"pretty": "11:00 PM PDT on June 29, 2012",
						"day": 29,
						"month": 6,
						"year": 2012,
						"yday": 180,
						"hour": 23,
						"min": "00",
						"sec": 0,
						"isdst": "1",
						"monthname": "June",
						"weekday_short": "Fri",
						"weekday": "Friday",
						"ampm": "PM",
						"tz_short": "PDT",
						"tz_long": "America/Los_Angeles"
					},
					"period": 4,
					"high": {
						"fahrenheit": "68",
						"celsius": "20"
					},
					"low": {
						"fahrenheit": "52",
						"celsius": "11"
					},
					"conditions": "Fog",
					"icon": "partlycloudy",
					"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
					"skyicon": "mostlysunny",
					"pop": 0,
					"qpf_allday": {
						"in": 0,
						"mm": 0
					},
					"qpf_day": {
						"in": 0,
						"mm": 0
					},
					"qpf_night": {
						"in": 0,
						"mm": 0
					},
					"snow_allday": {
						"in": 0,
						"cm": 0
					},
					"snow_day": {
						"in": 0,
						"cm": 0
					},
					"snow_night": {
						"in": 0,
						"cm": 0
					},
					"maxwind": {
						"mph": 11,
						"kph": 18,
						"dir": "West",
						"degrees": 267
					},
					"avewind": {
						"mph": 10,
						"kph": 16,
						"dir": "West",
						"degrees": 272
					},
					"avehumidity": 79,
					"maxhumidity": 93,
					"minhumidity": 63
				}
			]
		}
	}
}

$weather.forecast should get you the above JSON, so from there, you work up the tree to get the value you want. Because they have a property called forecast in that reply, it means you’ll end up using $weather.forecast.forecast.... with the first forecast being the data feature selection, while the second forecast picking up on the JSON forecast property.

Did not know you joined smartthings!
Any news of getting webcore rule engine locally on smartthings? :smiley:

Ok thanks, I started building a Tile following the tutorial. But it looks like I also need to build a SmartApp to poll the WUnderground service? Then I found a Wunderground app, and looked at the source code, and can’t figure out how it polls. Then I started looking at the “Smart Weather Station Tile 2.0” and I see this magical line of code

 def obs = get("conditions")?.current_observation

which calls

getWeatherFeature(feature, zipCode)

for which I can’t find any reference. Is this a magical included feature in SmartThings that anyone can call? Or is it something specific to “Smart Weather Station Tile 2.0” that I’m missing and can’t find.

You don’t need a SmartApp, webCoRE will pull the WU data for you. Just use this expression:

$weather.forecast.forecast.simpleforecast.forecastday[0].high.fahrenheit

For example, in a value field, you can say:

The high temp forecast today is {$weather.forecast.forecast.simpleforecast.forecastday[0].high.fahrenheit}°F

Ahh, thank you. I haven’t installed webCoRE yet, I’ve been working with the off-the-shelf automation structure (combining virtual switches with SmartLighting for slightly more complex relationships.) That explains why I’m clueless. I will get on it.

I was able to create a Simulated Temperature Sensor (which is showing up hear as “Dimmer 5” for some reason) and then used the following piston in WebCore to reset the “temperature” as the daily high at a specific time each day. I set mine to check the forecast as of 4AM each day. I chose this route because then I could have it display the forecast high in ActionTiles as well as using it in pistons in WebCore. (Edit: I replaced the version I originally pasted with an updated version; I’d messed up one of the variables.)