Get weather from WU

Guys
I’m getting started on porting one of my apps.
One part of this is getting weather forecasts from WU

I can get the correct full response ok but I’m having problems filtering the data
I can see the data in the logs by:
log.debug “response data: ${resp.data}”

In ST I used

sb << weather.forecast.txt_forecast.forecastday[0].fcttext_metric

I have tried:
sb << resp.data.forecast.txt_forecast.forecastday[0].fcttext_metric

I’m getting the error:
“something went wrong: java.lang.NullPointerException: Cannot invoke method leftShift() on null object

Any ideas where I’m going wrong?

Andy

1 Like

I’m interested how you are planning to utilize weather data with Hubitat Andy. I have an Acurite sensor and hub that uploads to WU. What does your app do with the data?

Nothing much at all :slight_smile:
It’s only a small part of my message central app
I use a variable %weather% and a sub routine to convert to a string so it can be read out
At 10am every day I get a verbal weather forcast for the day.

I think I can actually get most of the data I need by tweaking this driver a little more

I will just need to join it up

Andy

I see. I trust you know about Kevin Key’s Personal Weather skill for Alexa?

I didn’t, however; I need my variable because I will also use it in sms or pushover messages (not just voice announcements)

Andy

I see. I’m an iOS user, and the WU app supports their widgets. I just swipe right, even from the lock screen and I can see the conditions in my backyard. There isn’t something similar for Android?

As far as alerts, that’s handled by the Acurite app, or I can have it send me email.