webCoRE Update v0.3.10a.20190223 - adds $twcweather to replace discontinued $weather, bug fixes


#1

Please update your smart apps and reload the dashboard for this release.

$weather API shutdown

The Weather Underground API powering $weather has been shut down.

We hustled to get this release out before that happened but it took a bit longer to test due to the nature of the changes. While the v0.3.10a.20190223 update is backwards compatible with $weather, now that the API is shut down all $weather.* values will return zero or null.

$twcweather added

SmartThings has licensed data from The Weather Company to serve as an alternative to WU. All SmartThings smart apps were updated to the new API last week and the new $twcweather in webCoRE uses it as well.

Unfortunately The Weather Company provides much less data in a format that prohibited us from automatically updating $weather to work with it. All pistons that used $weather will need to be updated and simply swapping $weather for $twcweather will not work. Much of the commonly used forecast and condition data is simpler to use. For example, tomorrow’s low temperature is available at $twcweather.forecast.temperatureMin[1] rather than $weather.forecast.forecast.simpleforecast.forecastday.low.fahrenheit[1].

See the TWC Weather wiki article for for detail and stay tuned for a more detailed announcement from @Robin. Contributions to improve this wiki page are very welcome!

Temperature Scale

$twcweather uses your location’s preferred temperature scale which is also now available via the new system variable $temperatureScale. Use the celsius() and fahrenheit() functions to convert temperatures away from the location’s default.

Migration

To aid with migration to $twcweather you will see warning messages at account.smartthings.com > Live Logs any time a piston uses $weather. Additionally, for those of you with dozens or even hundreds of pistons the piston backup and import feature now includes a warning message for any piston using $weather. No need to reimport pistons, but it may be a convenient way to see which still need to be fixed:

New weather icons

There are two new weather icon sets available for use in pistons with over 40 icons for all of your weather condition needs. See the documentation and icons on the wiki.

We also made sure that the old icon sets (e.g. :wu-a-sunny: :wu-b-snow: and :wu-v2-rain:) continue to work when you pass in the numeric icon codes from $twcweather. However, it is recommended to use the :twc- or :wu-v4- icon sets shown in the wiki for a more expressive palette of weather conditions.

Also in this release

  • FontAwesome is updated to the latest version 5.7.2 which includes over 600 new icons
  • Local network HTTP requests now include the correct Content-Type header

pinned globally #2

#3

I guess I should have expected this…

temp

Especially considering they killed WUnderground practically moments after TWC was implemented.


#4

I just updated all 4 components for webCoRE via the IDE…
(and did a hard refresh in my browser)

Now, my fuel streams are completely blank:

temp

Is this a bug? Is this intentional so we can start fresh?
Or is this just blank because WU is returning bad data?


#5

Looking through the wiki, for the new TWC weather, how can I get the forecast just for one day? I don’t see a variable for that. I see narrative, but it gives more than one day. Thanks.


#6

I can’t get announcements (with Echo Speak) to work with the new weather service.

Could it be because the system adds a “[” (square bracket) before the result? Two examples:


Could someone please also guide me on how I can create a variable that will change the change the time which is e.g. reported for sunset, to a manageable format which can be used for announcements (i.e., change the sunrise time to 06:02)


#7

Odd, I have mine still with up-to-date data. Fuel streams shouldn’t be affected by weather. Can you check your browser network console to see if the fuel stream API is failing (I think the request will show up with path list)? Does anyone else have a problem with fuel streams?

There is no hourly forecast, I believe that The Weather Company API provides the information but it is not accessible through SmartThings. If you just need “today” the forecast values include 14 days of which the first is today. For example, $twcweather.forecast.temperatureMin[0] for today’s low temp.


#8

The value is an array of values representing the next 14 days. You can use $twcweather.forecast.sunriseTimeLocal[0] to get just today’s value.


#9

Ok. Thanks, but I’m looking for a way to get the weather for the entire day spoken, not just the low temp… ( The high and the low and conditions for the day. )


#10

I got now…

{$twcweather.forecast.narrative[0]}

Speaks the forecast for today.


#11

I just converted my weather pistons this morning. So, using the following in webCoRE/Echo Speaks:

“It’s currently ‘{$twcweather.conditions.wxPhraseLong}’ with a temperature of ‘{$twcweather.conditions.temperature}°F’. The projected Min/Max temperatures for today are: ‘{$twcweather.conditions.temperatureMin24Hour}°F’ and {$twcweather.conditions.temperatureMax24Hour}°F’. Today’s forecast is: '{$twcweather.forecast.narrative[0]}”

Results in:
It’s currently ‘Partly Cloudy’ with a temperature of ‘38°F’. The projected Min/Max temperatures for today are: ‘22°F’ and 38°F’. Today’s forecast is: 'Partly cloudy. Highs in the low 40s and lows in the upper 30s.


#12

Is there a code for severe weather alerts?


#13

If there is, I have been unable to find it yet.


#14

Thanks for sharing!
If I want to add the sunset time in the format “19:24” e.g., how would I do that? (I realize the easiest would be to get it from $sunset, but the result is also in a long format.
Thank you!


Weather alerts!
#15

Yes there is some alert data available but we don’t have documentation in the wiki for it yet. You can see sample data for an alert in the ST documentation which would be accessed in webCoRE as $twcweather.alerts[0].eventDescription (0 for the first alert 1 for the second and so on, $twcweather.alerts.length to get the current number of alerts).


#16

I cannot get anything to evaluate. Example:


#17

@Nezmo - An Expression must be in the following format:
“It’s currently {$twcweather.conditions.wxPhraseLong} with a temperature of {$twcweather.conditions.temperature}°C. The projected Minimum and Maximum temperatures are: {$twcweather.conditions.temperatureMin24Hour}°C and {$twcweather.conditions.temperatureMax24Hour}°C. Tomorrow’s forecast is: {$twcweather.forecast.narrative[1]}”
Note the " at the start and end of the expression. You can remove the single '.


#18

I will admit I get mixed-up on the syntax in expressions. I had already tried that though:


#19

You’re missing the { and }.
Copy and past the examples above.


#20