Weather Underground widget with forecast

widgetgallery
weatherunderground
Tags: #<Tag:0x00007f0147679608> #<Tag:0x00007f01476794a0>

(Hammar) #84

I’ve stored my location as the latitude, longitude. Doesn’t this work?


(The Squid) #85

The widget uses information from the Weather Underground website…

Have you registered and received your API key?

There are multiple ways to enter your location in the thing, take a look at the bindings documentation to make sure you have entered a correct method.

https://docs.openhab.org/addons/bindings/weatherunderground/readme.html

Squid


(Mr. Yoinkz) #86

@KidSquid

Hey, thanks for getting back to me - I’m sorry but I’m not that sharp regarding these matters yet :(.
So thanks for being so kind and helpful!

So I already tried to look through the documentation and I also tried changing the location to pws:blablabla but it just doesn’t seem to work.

Can you perhaps try to tell me how the string should look like in my Things file if my city is: Hedensted (Denmark)?


(The Squid) #87

Is the weatherunderground thing showing online? Did you register and get an API key?


(Mr. Yoinkz) #88

@KidSquid

Yes it is showing online and I got the API key :).


(The Squid) #89

So what happens if you put 90210 in as the weather station with no pws…just put in 90210.

That’s the zip code for Beverly Hills, CA…do you get results?

Squid


(Arie Van Der Lee) #90

I solved this locally by using the ‘Time Of Day’ Design Pattern and a ng-class to the current-icon on line 33:

<i ng-class="{'wu-night' : itemValue('TimeOfDay') === 'EVENING' || itemValue('TimeOfDay') === 'NIGHT'}" class="wu wu-{{IconSet}} wu-256 wu-{{itemValue('Weather_ConditionId')}} current-icon pull-right"></i>

Only added this for the current weather because i want to know if tomorrow is sunny instead of ‘moony’ :wink:


(Mr. Yoinkz) #91

@KidSquid

Seems to be working ! So I tried with this ID and then it goes offline: IFREDERI129


(The Squid) #92

try

pws:IFREDERI129

Squid


(Mr. Yoinkz) #93

… and now if I try to change it to anything else - it wont update :frowning: OFFLINE


(Mr. Yoinkz) #94

WOW… and suddenly it started to update!

Seems to be working now :slight_smile:

@KidSquid Thanks for your persistance!


(The Squid) #95

Happy to share the OH assistance many have given me on these boards.

Squid


(Mr. Yoinkz) #96

You might not be done yet - now I can proceed with the rest of the weather widget and questions may arise.


(Mr. Yoinkz) #97

So, finally I’m about to get the widget working, but I’m unsure of how much I need to upload.

If we take a look at the https://github.com/manifestinteractive/weather-underground-icons

Then we have the folders, css and icons as shown here, but what about the rest of the files in the root of that library? Should they also be copied?


(The Squid) #98

I placed everything on my server to make sure the path structure remained in place. You do need the CSS files as well as the different icon sets in the event you choose to change the color.

Pictures always work better for me…here’s my path of what was downloaded and online.
image
Squid


(Mr. Yoinkz) #99

@KidSquid

Thanks man! All working brilliant now!

Thank god for so helpful people in here!


(Oneofayykind) #100

I can’t get these icons to show up even after going through all this. If I inspect the icon element the HTML ends up with

Not sure why I’m getting a NULL value here?


(Bastiaan van Haastrecht) #101

@oneofayykind, you are probably on an older version & build then advised in the first post.

Please note that you need the Weather Underground binding as of build version #1212, otherwise the iconKey channel wont work. The binding is packed in the latest snapshot version from 12’th of februari.


(Oneofayykind) #102

@bastiaan_van_h My binding is from the 2.3.0 snapshot


(Oneofayykind) #103

Sorry I figured it out. I had to appropriately link the items in paperui. I also had to change the image path to the root to /static/…