SmartThings Community

Weather API Changes

(Alex) #83

What? I thought only the stock Weather Tile works with ActionTiles!?

(Brian) #84

This is brand new information to me, too. I had no idea.

(Kurt Sanders) #85

I determined that DTH’s are unique by DTH name and namespace. So this SmartWeather Station Tile is created until my developer’s namespace. :face_with_raised_eyebrow: and can be picked up by ActionTiles™ as long as it has the same number of fields as the SmartThings version!

(Working on a secret project, are we, sir?) #86

Only if you have a Ambient WS like the WS-2902A.

(Kurt Sanders) #87

Or any of the network connected Ambient models that report their data to the Ambient network servers should work with STAmbientWeather App.

Here is a link to Ambient’s web page of those compatible models

(Dominick Barile) #88

Kurt is this something I can run without having a pws? Maybe I can use my zip code.

(Eric Anderson) #89

Not action tiles but SmartThings new Samsung app

(Kurt Sanders) #90

The stock “SmartWeather Station Tile” from SmartThings allows for a zipcode to be entered in the devices preferences section. Is this what you are asking?

(Kurt Sanders) #91

Wow, I hadn’t seen this display as I have not migrated to the new Samsung SmartThings App.

STAmbientWeatherApp, like so many other end user’s applications with custom attributes, are not supported in the new SmartThings Mobile App. The STAmbientWeather app only runs in the classic version of SmartThings mobile client.

SmartThings/Samsung does not {currently} support many of typical weather attributes generated by a weather station, like wind, rain, dewpoint, pressure, feelslike, etc… Therefore the only attributes/values that will display in the new SmartThings/Samsung mobile app are the few standard attributes you are seeing that I could map a weather value to.

That is why so many end users are not migrating to the SmartThings new Samsung app.

(Dominick Barile) #92

I hope samsung eventually supports this & other custom apps. Let’s hope they are listening…or reading I should say.

(PPO16) #93

Are you really in a place that is at 47.8C or you are facing a unit issue with F?

Not sure what is running behind your device but one drawback of the new TheWeatherCompany is that you have to guess the units based on your location.

(Eric Anderson) #94

Unit issue. Motion and power! I guess it thinks the rain is motion and solar radiation is power.

(Kurt Sanders) #95

@Philippe_Portes: I’m not sure why the new Samsung SmartThings Mobile App defaults a user’s temperature readings to ºC. I am guessing that @RottenMutt is in the USA and it should default UNITS to the value of SmartThings API getTemperatureScale() or leave it blank if it is not sent in the sendEvent. I have not activated the new Samsung SmartThings client since it does not support non standard attributes, so who knows?

@RottenMutt: per STAmbientWeather documentation:

Ambient Weather Custom Attribute Mappings

  • Only a subset of Ambient weather attributes can be viewed from ActionTiles™. Per ActionTiles™ website, ActionTiles™ only supports Things that are fully compliant with a standard Capability (device type abstraction) as defined by SmartThings Capabilities.
  • SmartThings publishes a partial list of “WWST” (Works with SmartThings) Certified Devices but not all of those are compatible with ActionTiles, because some of them claim a “Capability” that ActionTiles™ has not built a Tile Type for.
  • Units of measure on ActionTiles™ cannot be modified

Name of Action Tile Thing (Checkmark) Ambient Weather Attribute


Wind Speed, mph
Illuminance Measurement Solar Radiation, lux or w/m²
Light, lux or w/m²
Motion Sensor Wind Speed > 0 Detected, active
Relative Humidity Measurement Outside Relative Humidity, %
Temperature Measurement Outside Temperature, °F
Ultraviolet Index Ultraviolet Index, uv
Water Sensor Rain Detected, wet/dry

(PPO16) #96

This is in your “Location” setting. I have no clue how to change it in the new app (searched for a while) while this was easy to set in the classic app.

I used to have a conversion function to adjust WU results based indeed on the getTemperatureScale() and I was managing the string C/F accordingly.

Now I just call my tiles with:
sendEvent(name: “TWCdewpointlevel”, value: mymap[‘temperatureDewPoint’], unit: temperatureScale)

where temperatureScale is the result of getTemperatureScale.

In the US, TWC will return F and if I have F it seems working fine. If I change to C, it works also fine.

What I don’t know is what happens if you are in a country in Celsius and get Celsius from the TWC report. I suspect the same sendEvent would not work, just like we see in the snapshot we commented.

(Kurt Sanders) #97

Thanks @Philippe_Portes…Good points…

So I wonder if @RottenMutt’s SmartThings location has a value of ‘C’ for’ Temperature Scale’ which might explain why in the new Samsung SmartThings App it shows ‘ºC’ for a temperature value where UNITS were not indicated on the sendEvent() and should be null?

I am leaning toward using the SmartThings API getTemperatureScale() in next STAmbientWeather (v3.06) to explicitly define the units of measure for Ambient weather data. The Ambient API reports all data in imperial units, and the user can select metric units on their weather console for display.

In STAmbientWeather, the app would need to dynamically calculate all the weather values in metric units if the getTemperatureScale() returned ‘C’ as well for attributes like wind in KPH, pressure in MMHg and Rain in CM or MM. To add insult to injury, the UNIT does not display in the valueTiles.


(HousePanel Author) #98

Thanks so much for this @Brad_ST - it was just what I needed to fix the weather tile in HousePanel.

The weather tile is now happily restored with the icons back and with the new forecast text fields available as an option via the usual Tile Editor use. Here’s what our crappy weather looks like today in Michigan!! LOL.


(Eric Anderson) #99


(Todd M) #100

I am trying to use SmartWeather to add the ForcastToday text to my ActionTiles. I can get the weather tile that you have. But I just want the ForcastToday text. Is that an api call?

(Mark C) #101

Basicly morning and aft details

def newforcast = getTwcForecast(settings.postcode)
def forcastdetail = "${newforcast.daypart[0].daypartName[0]} - ${newforcast.daypart[0].narrative[0].toString()} \n${newforcast.daypart[0].daypartName[1]} - ${newforcast.daypart[0].narrative[1]}"
sendEvent(name:"UGW_web", value: forcastdetail , displayed:false)

the “UGW_web” is the tile you have set up to dsiplay the text

(SmartThings) #102

All SmartThings published SmartApps and device types have been converted to use the new The Weather Company (TWC) API.

Many individuals’ SmartApps continue to use the old Weather Underground (WU) APIs. Although these APIs have have continued to work since the Jan 1, 2019 shutdown, we were informed by The Weather Company that there will be a firm shutdown on Feb 2, 2019. Calls from these individuals’ SmartApps and devices will start failing after the WU shutdown.

To improve the integrations with Personal Weather Stations (PWS), we’ve added a new API to retrieve this data:

def getTwcPwsConditions(stationId)

Return personal weather station data for the specified ID

Example PWS data