Sitemaps empty in iOS app

I am running OH 2.3.0, which is also throwing this issues with newest IOS App.
Calling sitemaps via rest is resulting in exactly the same output compared between 2.3.0 and demo.openhab.org. Only difference is that demo is running https, while my internal url is http with 8080.
Perhaps an issue with unencrypted connection?

Don’t think 2.3.0 and demo.openhab.org produce same payloads, i.e. the later uses

	"version": "5",

while i.e. OH 2.5.12

	"version": "3",

so I assume 2.3.0 uses an even older version … Also test env I have setup with 2.5.12 uses http and works fine … so not an unencrypted connection issue imho

Issue is discussed here git . I’ve pulled 2.4.39 code base trying to reproduce the issue while debugging.

I am pretty sure new app thinks everything 2.4 and below is 1.0, which is why it tries to use xml syntax for sitemap. Version 2.0 and above uses json, will be read as “empty xml”.

2022-02-02 22:49:07.862127+0100 openHAB[7163:157792] [remoteAccess] This is an openHAB >= 2.X
2022-02-02 22:49:07.862271+0100 openHAB[7163:157792] [urlComposition] URL: http://10.x.y.z:8080/rest/sitemaps?limit=20
2022-02-02 22:49:07.862319+0100 openHAB[7163:157792] [viewcycle] Firing request
2022-02-02 22:49:14.587527+0100 openHAB[7163:157792] [viewcycle] openHAB 1
2022-02-02 22:49:14.587791+0100 openHAB[7163:157792] [remoteAccess] [{"name":"default","label":"BS7","link":"http://10.x.y.z:8080/rest/sitemaps/default","homepage":{"link":"http://10.x.y.z:8080/rest/sitemaps/default/default","leaf":false,"timeout":false,"widgets":[]}},{"name":"homewatch","label":"Homewatch","link":"http://10.x.y.z:8080/rest/sitemaps/homewatch","homepage":{"link":"http://10.x.y.z:8080/rest/sitemaps/homewatch/homewatch","leaf":false,"timeout":false,"widgets":[]}},{"name":"_default","label":"Home","link":"http://10.x.y.z:8080/rest/sitemaps/_default","homepage":{"link":"http://10.x.y.z:8080/rest/sitemaps/_default/_default","leaf":false,"timeout":false,"widgets":[]}}]

Can you please share what you get in http(s)://<youropenhab>/rest/?

There is Version 1… you are right.

{"version":"1","links":[{"type":"uuid","url"……

That is the problem, that is why the app “thinks” you have v1. If you can build the app yourself, try changing

let version = Int(self.serverProperties?.version ?? "2") ?? 2
self.appData?.openHABVersion = version

to something like

let version = Int(self.serverProperties?.version ?? "2") ?? 2
self.appData?.openHABVersion = 2

within OpenHABViewController.swift (around line 737) to force v2 and run the app …

I‘ve already tried this. Now I may select the sitemap, but loading the sitemap results in 406 error.

Just installed OH 2.4 and “forcing” v2 as described above I get a working client (sitemaps load fine) - so cannot comment on the 406 error, specially not without any logs/traffic …

I have captured two files, I hope they are useful:

oh2_4_from_2_4_36.cap → That works fine → https://drive.google.com/file/d/19zhdAjnUYzfZ4P8-eDG6OUiSpa0YNc6C/view?usp=sharing

oh2_4_from_2_4_39.cap → That don’t works → https://drive.google.com/file/d/19zhdAjnUYzfZ4P8-eDG6OUiSpa0YNc6C/view?usp=sharing

Both files has been captured with tcpdump -w.

Thanks

The workaround for me right now is:
If you have Basic UI installed, then you go with Safari to that Baisic UI web page and then tap Share… to Home screen. This will create an App which will open Basic UI interface directly. Not so responsive, but at least works until the main App will be fixed.

well it obviously looks like an issue in the app as it’s been stated already (Line 7hundredwhatevs in the swift code…)

so there should be an official fix for those who can’t afford to build iOS Apps on their own.

Why not updating your openHAB version to at least 2.5.12, which is proven to work fine with latest iOS App and sitemaps ?

Think of upgrading all your customer’s solutions, on site.

Just got a notification that a new TF version (2.4.41) is available, if anyone with OH 2.4 can check if now it works :crossed_fingers:

First test are ok. Sitemaps are loaded, commands react and graphs are displayed correctly. Will test more intensively this evening, as far as now, 100% good. Thanks for the reactivity!

1 Like

2.4.41 works perfectly. Pulled the changes and built fine.
Started migration to latest 3.x nevertheless… long way due to mqtt-eventbus.
Thanks for being such an active community!

1 Like

Version available on Testflight works on OH 3.2.

Awesome, just updated to 2.2.41 on official AppStore. Works like a treat with OH2.4. Thanks :pray:

1 Like

hello! I am using OH2.5 and I having problems with the iOS App.
From today I keep on daring to crash and when I manage to enter I get the “openhab returned an empty list of sitemaps”. Yet the sitemap from the Basic UI on PC works well both locally and remotely. Can anyone help me understand what happened this time? I also restored a backup from a few months ago, everything is fine, but when the iOS App still doesn’t want to work. Thank you.