Weather-binding work on basicUI but not work on iOSapps

Hello,
i make weather in openhab2 in classicui and basicui work well but in iOSapps i see only blank space :frowning:

/opt/openhab2/userdata/webapps/weather-data/layouts/example.html:

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

<body id="weather-body" onload="formatIframe()">

	<div id="static/weather-location-name">
	Stacja Lublin - Lotnisko
	</div>

	<table id="weather-table">
		<tr>
			<td rowspan="2"><img id="weather-icon" src="static/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>
					
				</table>
			</td>
		</tr>
	</table>

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

</body>

</html>

sitemap:

Frame label="Stacja pogodowa" {
        Text item= Temp_zew icon="temperature"           valuecolor=[<15="blue",>16="black",>26="red"]
        Text label="Prognoza pogody" icon="wind" {
		Webview url="/weather?locationId=domek&layout=example&iconset=colorful" height=7
				}
                                                 }

I don’t think webview works with the iOS app

Yes, but this could also be related to the old weather binding (1.x binding).

On my old OH1 installation (with weather binding 1.x), the webview has worked in local mode in the app, but not in remote mode. This was because myopenhab couldn’t handle the html data the correct way to give it to the app.

I haven’t used the weather binding 1.x in my OH2 installation yet, so I don’t know what causes the issue here (binding, myopenhab or the app itself).

But there is an open issue for this already:

Also I think there is some discussion about this here in the forum.

Ok, thanks.
I use OH2 build #675 with binding-weather1 - 1.9.0.SNAPSHOT and i used only local iOSapp by openVPN and when i add local IP address do Webview my weather show up on iOSapp :slight_smile:

Webview url="http://192.168.1.10:8080/weather?locationId=domek&layout=example&iconset=colorful" heigh 7
1 Like

I thought the iOS app proxied the local URLs?