Weather Underground widget with forecast

I’m lost on how to get the IconSet icons to appear. I have this widget working fully and the ServerPath images load just not the IconSet images. They are in my dist folder under icons>white>svg

Not sure what the hell I’m doing wrong here.

Are you sure you have the correct version of the binding? Please look at the first post and see the minimum required build number. The icon key only became available recently.

Squid

I tried to do the same as you but is not working. I’m running on Raspberry Pi, with OH2 #1212. All the other data are showing correctly.image

There’s something wrong with your path configration as your images and icons do not show. Read the instructions in the first post.

@Corban987 Nice layout. Can you share your widget version?

I have the main one working as well. Thanks for all the tips in this thread.

@James_Hiscott I posted mine here

you were right, the path was not correct. The folder I downloaded with the icons had a differente name. It is working perfectly now. Thanks a lot!

Hi,

Where do you get the .css files from?

wu-icons-style.css
wu-icons-style.min.css

Those are included with the weather icons download…

Got it - thanks :slight_smile:

Was looking under css…

So I’m trying to set this up the “old” way I think, using the things file instead of doing it through the paperUI.

The below is taken from the openHAB documentation, but I’m kinda struggling with the Thing weatherunderground:weather:CDG which I can see is also set under Location - my guess is that it refers to Charles De Gaulle. Now, currently I’m not living there and I want to change it to lets say Aarhus in Denmark. Whats should I then use? I can’t find a “shortname” for that at the weatherunderground webpage

Thing weatherunderground:weather:CDG "Météo Paris CDG" [ apikey="XXXXXXXXXXXX", location="CDG", language="FR", refresh=15 ] {
    Channels:
        Type temperature : current#temperature [ SourceUnit="C" ]
        Type windSpeed : current#windSpeed [ SourceUnit="kmh" ]
        Type windGust : current#windGust [ SourceUnit="kmh" ]
        Type pressure : current#pressure [ SourceUnit="hPa" ]
        Type dewPoint : current#dewPoint [ SourceUnit="C" ]
        Type heatIndex : current#heatIndex [ SourceUnit="C" ]
        Type windChill : current#windChill [ SourceUnit="C" ]
        Type feelingTemperature : current#feelingTemperature [ SourceUnit="C" ]
        Type visibility : current#visibility [ SourceUnit="km" ]
        Type rainDay : current#precipitationDay [ SourceUnit="mm" ]
        Type rainHour : current#precipitationHour [ SourceUnit="mm" ]
        Type minTemperature : forecastToday#minTemperature [ SourceUnit="C" ]
        Type maxTemperature : forecastToday#maxTemperature [ SourceUnit="C" ]
        Type rainDay : forecastToday#precipitationDay [ SourceUnit="mm" ]
        Type snow : forecastToday#snow [ SourceUnit="cm" ]
        Type maxWindSpeed : forecastToday#maxWindSpeed [ SourceUnit="kmh" ]
        Type averageWindSpeed : forecastToday#averageWindSpeed [ SourceUnit="kmh" ]
}

Also, is the above enough for my things file in order to achieve the same setup if I was going the paperUI way?

Can someone please direct me in the right direction here?

If anyone is interested, I modified the original widget to show all 10 days of forecast, which should be fully scrollable. Modified Widget

1 Like

Hi all,

I’m having problems adding my city to this. Currently I’m using the default one from the documentation CDG.

For a start I’m only using the binding, and the things + items file. Then i create a few Text items in my sitemap to see the values.The only thing is, after I change some of the values in my things file, it starts to throw some errors (sorry I forgot to write them down, but as far as I remember is was Handler something) and the thing no longer appears in my paperui.

So I uninstalled the binding and removed the things file and items file.
Reinstalled it and I’m back to CDG as my location. How do I insert my location so it will work?

I’m running the snapsot 2.3 build 1219.

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

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

@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)?

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

@KidSquid

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

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

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: