HELP - weather Binding not working

when I try to run your out of http://10.1.1.3:8080/weather-data/layouts/example.html uncompleted variables… do you teamview?

email me if you do. dave AT thepackhams DOT com

Dave P

I get the same

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="weather-data/layouts/example.css" />
	<script type="text/javascript" src="weather-data/layouts/example.js"></script>
</head>

<body id="weather-body" onload="formatIframe()">
	<div id="weather-location-name">${config:name}, ${weather:condition.observationTime(%1$td.%1$tm.%1$tY %1$tH:%1$tM)}</div>

	<table id="weather-table">
		<tr>
			<td rowspan="2"><img id="weather-icon" src="weather-data/images/${param:iconset}/${weather:condition.commonId}.png"/></td>
			<td id="weather-temp">${weather:temperature.current(%.1f)}</td>
			<td id="weather-temp-sign">°C</td>
		</tr>
		<tr>
			<td colspan="2">
				<table id="weather-table-details">
					<tr>
						<td>Humidity:</td>
						<td>${weather:atmosphere.humidity} %</td>
					</tr>
					<tr>
						<td>Pressure:</td>
						<td>${weather:atmosphere.pressure(%.1f)} mb</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>

	<table id="weather-forecast-table">
		<tr>
			<td>Today</td>
			<td>${forecast(1):condition.observationTime(%1$tA)}</td>
			<td>${forecast(2):condition.observationTime(%1$tA)}</td>
		</tr>
		<tr>
			<td><img src="weather-data/images/${param:iconset}/${forecast(0):condition.commonId}.png"/></td>
			<td><img src="weather-data/images/${param:iconset}/${forecast(1):condition.commonId}.png"/></td>
			<td><img src="weather-data/images/${param:iconset}/${forecast(2):condition.commonId}.png"/></td>
		</tr>
		<tr>
			<td class="temp-max">${forecast(0):temperature.max(%.0f)}</td>
			<td class="temp-max">${forecast(1):temperature.max(%.0f)}</td>
			<td class="temp-max">${forecast(2):temperature.max(%.0f)}</td>
		</tr>
		<tr>
			<td class="temp-min">${forecast(0):temperature.min(%.0f)}</td>
			<td class="temp-min">${forecast(1):temperature.min(%.0f)}</td>
			<td class="temp-min">${forecast(2):temperature.min(%.0f)}</td>
		</tr>
	</table>

</body>

</html>

I also have just encountered this problem, that the html webview only works in local mode on my iOS app. Connecting remotely leads to the known error message Cannot GET /weather?locationId…

Has anyone here found a working and comfortable solution for this? @Phuong? @chimera? Or maybe @gerrieg himself?

Is this a problem of the iOS app only or does this also happens on the Android app?

And another question regarding this binding, but completely different issue, so I made another posting:

I can choose the item “condition” (or conditionID) or the item commonID. For me, it seems that these two expressions are (nearly) the same. Example: At the moment I get (german):

condition: überwiegend bewölkt
commonID (transformed with weather_de.map): Überwiegend Bewölkt

So mainly they are the same. Sometimes there a slight differences (Nebel/neblig), but the content means the same thing.

My question therefore: Why do they both exist? Which one is preferable to use?

ConditionID is the condition as provided by the Weather provider itself. CommonID is an internal ID which normalizes the different ConditionIDs into an ID that is common across all Weather providers.

For a fake example, if Yahoo uses 20 for cloudy and Wunderground uses 15, the CommonID could be 12. Therefore, if you use the CommonID you can change weather providers without needing to adjust and icons or rules which depend on the Condition ID.

However, this comes at a cost. The Common ID by necessity is the lowest common set of IDs so you might be able to get a more specific set of IDs if you use ConditionID, though that will tie you to that one provider.

The preferred one to use depends on your use case. If you want the freedom to be able to change weather providers without needing to change anything that depends on the ConditionID, use CommonID. If you depend on a specific condition ID only provided by one weather provider use ConditionID.

1 Like

Thanks Rich! Helpful as always!

As there are weather icons in the example files of the Wiki tutorial, do they match to a specific weather provider? And are they linked to the commonID or to the conditionID?m

Same issue here - I never found a solution to the “Cannot GET /weather?locationId…” problem. Would be interested to fix it though.

@rlkoshak: Sorry for bothering you again, but can you also reproduce this error (Cannot GET…) with the webview in remote mode in you configuration? AFAIK you are using Android and iOS devices.

I just tried it on my android phone through the VPN and I get a 500 error with “Weather locationId ‘home’ does not exist.”

However, I tried in through the browser as well and get the same error.

I don’t know if what I’m seeing is the same as what you are seeing or if I have another error.

I frankly rarely if ever use the sitemap so figuring out my particular problem is low on my priority list right now.

Hi guys,

I recently changed my weather provider from openweathermap to yahoo. I did not make any other changes and nearly all items are still correct. Nearly all…

Oddly enough my pressure item now shows an improper value.

The pressure (“Luftdruck”) should be normally around 1000mb (=hPa). This at least was a common value with openweathermap. But now it is at 33999 mb. Just for information: It’s 1004mb on the yahoo weather website for my location right now.

My item definition is:
Number Luftdruck "Luftdruck [%.2f mb]" { weather="locationId=home, type=atmosphere, property=pressure" }

Any hints?

Thanks,
Stefan

Found out on my own. I had to change the unit to “INCHES” to get the correct mb value. I know, this doesn’t make any sense, but it has worked!

I think this is an error of the binding…

Same problem here with Android app. Does anybody found a solution?

Fantastic info in this thread! Excellent work to all who have contributed.

I am having an issue with the “Outside Temperature” charting (it’s not showing up at all, I get a “broken image” icon), and secondly, the max and min temperatures display the current temperature only. I assume these problems are related, and I’m beating my head against the wall trying to determine the problem. Any help would be appreciated. Thanks!

@rlkoshak Any ideas on this issue? I have checked and double check everything and cannot find my error. What am I missing?

Hey @rlkoshak: I have a question about this line in your configuration: Is your sitemap icon “yahoo_weather” updated automatically (=dynamic icon), based on the icon images yahoo_weather- …-47?

I have stored the icons according to your link (github, sample for yahoo icons), but I’m not sure this is working (it has been cloudy for the last days here, so there is not much movement with different icons… :slight_smile: ).

When I was using this with Yahoo!, yes it did. The icons are named so the icon names correspond with the Condition_Id. So if Condition_Id for snow is 25 (guessing), you should save the snow icon as yahoo_weather-25.png. When Condition_Id is 25.

NOTE: in OH 2 you need to have a yahoo_weather.png file or else this won’t work. Find a question mark or some other reasonable icon for undefined.

Now I use HTTP with XSLT to pull the data I need from Wunderground. There were some fields that the Weather Binding didn’t provide I wanted to help with controlling my irrigation.

Remove <>
weather:location.LuBu.latitude=48.885901

Hey,

I try to get the weather bining running, but i am discovering one Problem after one is fixed.
My api is from openweathermap and i have edited the weather.cfg like it is written in the documentation. I am using the item list of the documentation as well.

But I don´t get forecasts I tried with “forecast=1” for the values of the next day, but with ni luck.

Has someone a solution for me?

Thanks in advance
Joko

OpenWeatherMap does not provide all the possible forecasts for free API keys.

There is a dedicated OWM binding for OH 2.4

1 Like

@Joko

You can also try ForecastIo (=DarkDky) with weather1, if you need a daily forecast.

In weather.cfg just use the parameters for ForecastIo (if you got a new apikey), exactly like in documentation.

But there is also no daily forecast with a free apikey.

Thank You,

I will try ForcastIo

1 Like