Content of weather variable

Posted on
Thu Apr 16, 2015 4:10 am
MortenB offline
Posts: 44
Joined: Jan 24, 2015
Location: Fredrikstad - Norway

Content of weather variable

Hi

I have two controlpages that both shows todays weather as an icon. The problem is that if I display the weather
as text I get it in Norwegian in one controlpage and in the other one I get it in english.
So if I switch to image I need two versions of all images, one with english name and one with norwegian names.

Has I done any configurationerrors or what? Anyone got any ideas?

Mac Mini with Indigo 6 - Testing Indigo 7
18 Qubino dimmers
6 Fibaro dimmers (v2)
13 Fibaro Smoke Sensors
13 HeatIt floor thermostats
Also running Node Red and OpenHab2

Posted on
Thu Apr 16, 2015 6:02 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Content of weather variable

Hi MortenB - I'm happy to try to help.

The language setting for the plugin will affect all weather devices together. If you have set the plugin configuration to Norwegian, then I put that preference into the URL that I use to request data from Weather Underground. We then must work with whatever data the API returns. I don't know for sure, but I suspect, that Weather Underground will return Norwegian for Current Conditions text and English for Current Conditions (Icon). I suspect this because it would allow users of the API to link to Weather Underground's own icons (which are named in English.)

It sounds like you are working with the following variables for your control pages:

Page 1
Current Conditions - Weather
Current Conditions - Icon (All Day) or Current Conditions - Icon (Day/Night)

Page 2
Current Conditions - Weather
Current Conditions - Icon (All Day) or Current Conditions - Icon (Day/Night)

If you link to the Current Weather Conditions - Icon state, and display that value as text (rather than as an image) I suspect that you will always get English. Regardless, let's first take a look at what device states each control page element is linked to and then take it from there. We'll get it sorted.

Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Apr 16, 2015 6:56 am
MortenB offline
Posts: 44
Joined: Jan 24, 2015
Location: Fredrikstad - Norway

Re: Content of weather variable

Hi Dave

Thanks for feedback. What I was discovering is that WU returns something in english and something in the language chosen.
I had used two different variables.

Icon - today: Returns the variable in english
Current Condition - Weather: Returns the variable in norwegian,

So I was actually using the wrong one on the second page. I am to use CC - Weather on all pages,

But what is the difference between them?

Mac Mini with Indigo 6 - Testing Indigo 7
18 Qubino dimmers
6 Fibaro dimmers (v2)
13 Fibaro Smoke Sensors
13 HeatIt floor thermostats
Also running Node Red and OpenHab2

Posted on
Thu Apr 16, 2015 7:27 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Content of weather variable

The icon value is used in conjunction with Indigo's image selection heuristics to display a custom icon for the weather. Have a look in the WUnderground forum for a post with instructions on how to make that work. If you have any questions about that information, or have suggestions on how to make those instructions more clear, please let me know.

Glad you were able to figure it out!

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat May 02, 2015 6:09 pm
Richard offline
Posts: 68
Joined: Feb 05, 2015

Re: Content of weather variable

Dave, a have a question about the 10 day forecast data. The value for d01_windDir = South but the value for west and north it show up as W and N don't know about east yet is that something that can fix or is it just the information your plugin is receiving? I was designing a new weather page and came across the differences.

Posted on
Sat May 02, 2015 6:28 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Content of weather variable

Yeah, WU has been inconsistent. The easiest fix for images is to have two--

...+S.png, and
...+South.png

I'll throw a fix in the next version to standardize them.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest

cron