Weather API Changes

You mean the json dump i sent first?
These are all values that are provided when calling the TWC conditions API.

Developing a device handler, I have to manage events that can be shared within ST smartapps and routines. If you use Pistons/IFTTT, my app/dth will not be very helpful. My devs are more for common (they just do the standard job) folks who want to stay inside ST rather than using additional services.

If you want more information, please have a check to the ST smartapp documentation regarding the TWC related functions

OK thank you.

The updated station device now supports PWS and there’s also a lux patch:

1 Like

I just fixed a couple things in mine. Update time and other minor caps and spelling errors.

I just now was able to generate an API on my Weather Underground (TWC) account (where I wasn’t able to prior). Is this something new since API changes from the first of this year? Would this somehow integrate with the current SmartWeather Station Tile?

All I want is to once again pull live data from my own personal weather station in my backyard and put it into SmartThings!

What weather station are you using?

if you need something working with the Weather undergroud you can refuse my Weather Underground https://github.com/philippeportesppo/WeatherUndergroundWeb_SmartThings

Should still work fine if you put your PWS string in the request. Please check ther ealier versions calling directly WU, not the versions using ST API.

I have the Davis Instruments vantage pro 2 which is online. I also use the Ambient Weatherbridge (Meteobridge) for those services that don’t integrate with Davis Instruments.

I may have missed things. I have a PWS, and put in my PWS:KTNASHLA20 or zip code and it pulls up ‘the right stuff’ sofar. But it will ONLY report in Centigrade/Celsius (yes, I am old) not Fahrenheit. We use Fahrenheit so dening metric temps throws us for a loop.

How can I get it to show Fahrenheit instead?

not sure which location you are and what your settings in the mobile app are but that has to be a combination of these if the DTH is properly implemented.
I remember the standard API provides the localized units so cannot choose. Not sure what is the PWS behaviout. Maybe it is related to your PWS itself on top of what I said above.

I am in the USA. The device seems to work and report well with the API. The device is physically an AcuRite rweather station. It supplies the data to the Weather Underground. Everything reports correctly through both of those. So I am guessing that the API or translation between APIs below the surface is doing it.

I did notice the ST Classic App has no option available to select the units for temperature, where the other items like pressure, etc do provide unit options.

It is a weird thing as the TWC API provides the values according your locations standard, and does not specify it anywhere what it is.

Just to make sure, that you are using the right location and units, you can go in the Classic app to the top left corner 3 horizontal lines, then press the cog wheel, what comes up in the menu.
In the following menu you can define your location and your temperature units. Make sure that both matches your preference.

By the way, what is the wind speed displayed? KMP or MPH?

I am not clear now. Which DTH are you using? The weatherunderground API has been decommissioned months ago in SmartThings. Are you using something that sends a http query to Weather Underground?
If so in the DTH you can see what unit is used to get the temperature: example of json can be resp.data.current_observation.temp_c which is in C.

If you are using the Weather Channel API, it doesn’t offer unit choice and provides per location. So people have to know what unit they get.

Otherwise, ST classic unit setting is available when you click the wheel on the top left and check you location/geofence setting.

The temperature units and location are set correctly.
Wind speed is displayed in MPH.

@servant74, And just to make clear, you are using the Smart Weather Station/Tile from Smartthings’ own devices. Correct?

DTH? sorry I don’t recognize the acronym. I guess I don’t know which API I am using.
Just using the

Correct. I just gave up and deleted this. Thanks for trying to help!

Then there must be some mismatch from TWC side. Or the API is misbehaving.

I try the following code:
twcForecast.daypart[‘precipChance’][0]
but it returns:
[null, 20, 10, 10, 10, 10, 10, 20, 20, 20, 40, 40, 40, 20, 20, 20, 10, 20, 40, 40, 40, 20, 20, 20, 10, 20, 20, 20, 20, 20]
Why is the [0] not giving me the first value? I also try [1] or [2] but same result

https://wiki.webcore.co/TWC_Weather#Partial_day_forecast

Note that the first value for some attributes may be blank in the evening. For example, running a piston in the morning you may get $twcweather.forecast.daypart[0].cloudCover => [ 25, 79, 100, ...] but that same evening $twcweather.forecast.daypart[0].cloudCover => [ null, 79, 100, ...] .

Preliminary testing shows that today’s morning/daytime data [0] turns null shortly after 3PM each day, and the next day’s data shifts to [0] and [1] shortly after 3AM. This means from approximately 3PM to 3AM, you will find [0] to be null, and [1] will show data from the evening/night in progress. This also means that at about 3AM, the data for the night in progress vanishes, and is replaced with data for the following day/night.