Thats what I thought. But I can’t seem to figure out where the array element goes. I’m only interested in the first one, so don’t need to iterate. Everything I’ve tried gives me an error.
Try wxalerts.alerts[0] or wxalerts.alerts.getAt(0)
Is anyone thinking to updating the excellent SmartWeather Station Tile 2.0 device handler supplied via the takissd repository?
Do you think it would work on the new APIs if I use ‘pws:xxxxxx’ in the zip code field instead where xxxxxx is the station ID?
What about the WU’s getWeatherFeature(‘astronomy’) API call? I have a ST tile that displays the moon phase data… Will that API be ported to the TWC API?
I’ve tried all these and get an error every time.
log.debug "Alert = ${wxalerts.alerts[0].phenomena}"
log.debug "Alert = ${wxalerts.alerts[0][phenomena]}"
log.debug "Alert = ${wxalerts.alerts[0].getAt(0)}"
log.debug "Alert = ${wxalerts[0].alerts.phenomena}"
log.debug "Alert = ${wxalerts[0].alerts[phenomena]}"
This one doesn’t error, but not sure it’s correct. I get a null response, which may be correct. I keep trying different fields thinking there may be one of them filled in even if there is no alert.
log.debug “Alert = ${wxalerts.alerts.phenomena[0]}”
Yeah, thought I was all set until I realized I was using the custom weather tile not the stock one. If it doesn’t get updated, may have to go back and figure out why I didn’t use the ST one.
Rboy, can you copy the weather underground app and add a place for your api key and a update interval. Would be useful for people who upload to wu.
It seems the custom location string as zip code is not working, or it needs additional parameters.
When I call it I get a location in south america.
Is it really the postal code, or postal code with some country setting?
I also find the alerts coming back as a empty list. Is this a sign there are no alerts, or something else? I expected from the docs it would be the core map object, with not alerts in the alerts list.
What are you using to see the alerts? I can’t seem to get the syntax right.
I know right now there is a dense fog alert for our location, but the alerts is returning null unless I don’t have it right. See my above posts as to what I tried.
Figured it out.
def wxalerts = getTwcAlerts("36.67,-93.34")
log.debug "Alert = ${wxalerts[0]['phenomena']}, Description = ${wxalerts[0]['eventDescription']}"
log.debug "Alert = ${wxalerts[1]['phenomena']}, Description = ${wxalerts[1]['eventDescription']}"
Does anyone know where I can find a list of the alert types or phenomena codes? In the old system there was a 3 character type. Apparently in this system there is a 2 character. But I have searched and can’t find a listing of those. I am only interested in certain ones so need that info to effectively limit my alerts to the ones I want. I figured out FL is flash flood, and BZ is blizzard.
Any chance you could provide a method to get the TWC 48-hour hourly forecast?
What happens if the API call fails for whatever reason? Do these methods throw an exception? Return a null value or ?? I don’t see any mention of how to handle failures in the documentation
I assume this is why my use of the getDevice routine to grab the weather tile is no longer returning icon names, and instead giving nonsense. I will rewrite my tile to use TWC instead. You might consider grabbing the names of the forecast and creating compatible icon names for backward compat purposes.
Users of HousePanel in the meantime, please be patient as the icons in your weather tiles will be broken.
Darnit! … ActionTiles’s official Weather Tile is affected too!
Even though @625alex and I were assured it would not be affected.
…Terry.
Yup… my tile look equally empty.
There are three new text fields where the first word appears to be the same name as the icon, so I think you could scrape the name from there and apply as before. I’m using this as an opportunity to move on to a different approach for weather tile. I already have Frame weather tiles that most of my users prefer anyway, so this isn’t too horrible, but I hate surprises…
I’m so pissed at TWC/IBM @tgauchat myself… for over 5 years I shared my 3 stations weather data and this API change really pissed me off. They want YOU to make 3 API calls now for the same damn info we were getting from WU API. Just fuc*ery to the max.
I get a similar problem on Zip. My town and Madrid ES have the same “Zip Code.” So much for US data…
I too am curious why I can still successfully use my PWS:XXXXX in the zip field for takissd’s SmartWeather Station Tile 2.0, but doing so in the stock SmartWeather Station Tile fails. If I remove PWS:XXXXX in SmartWeather Station Tile I get results but no longer from my PWS on my roof
The display of SmartWeather Station Tile in Action tiles is much better and is preferred but also using my PWS.