openhab / openhab-ios

The repository of the iOS client
Eclipse Public License 2.0
192 stars 128 forks source link

iOS app does not show sitemap contents #803

Closed lsiepel closed 1 month ago

lsiepel commented 1 month ago

Upgraded from the v1 to the new app. Unfortunately the sitemap is no longer showing its contents. I can select the sitemap but when viewing it I don’t see any items/frames/ etc only a search bar. And that yields no contents

Meanwhile the v1 app is showing the contents as before.

App

Version: 3.0.5 Device: Apple iPhone 14 Pro / iOs 17.6.1 OH Version: 4.2.1

lsiepel commented 1 month ago

Tried for like 20mins. And now that I wanted to make screenshots it suddenly showed the map, without me changing anything. So it seems solved, but will leave this open if there are more users experiencing this ‘slow’ start

alfpf commented 1 month ago

I can confirm the bug reported by @lsiepel, after installation of the Openhab v1 app as well as the new Openhab app, non of these are showing any sitemap content (page is blank). On my Ipad I havent upgraded the openhab app yet, and there the sitemap content is shown as before. My environment is:

Not working

Working

digitaldan commented 1 month ago

can you post your sitemap code ?

digitaldan commented 1 month ago

also are you using this inside your network, through the cloud service, etc....

lsiepel commented 1 month ago

In my case it resolved after 20 mins of opening en closing en fiddling around. While i'm sure i did not change the network configuration (both local and remote set to the same dns), i was connected local., i have a reverse proxy setup. Has not changed. I can confirm both connections methods show the app as intended (now). If the network config was wrong, i would expect a different error and atleast not my sitemap name to be shown in the app.

In my case it did show up at somepoint, so i don't expect it to be the sitemap contents. Unfortunately i don't have any leads.

@alfpf just to be sure you experience the same. It showed nothing and after a while it did or it is still empty?

alfpf commented 1 month ago

Sure @digitaldan default.sitemap file attached (renamed it to sitemap.txt) sitemap.txt

regarding your second question, I’m using it both on my local network and through myopenhab.org (Cloud Connector), both give the same result (empty sitemap).

alfpf commented 1 month ago

In my case it resolved after 20 mins of opening en closing en fiddling around. While i'm sure i did not change the network configuration (both local and remote set to the same dns), i was connected local., i have a reverse proxy setup. Has not changed. I can confirm both connections methods show the app as intended (now). If the network config was wrong, i would expect a different error and atleast not my sitemap name to be shown in the app.

In my case it did show up at somepoint, so i don't expect it to be the sitemap contents. Unfortunately i don't have any leads.

@alfpf just to be sure you experience the same. It showed nothing and after a while it did or it is still empty?

I also fiddled around with this for a while, opening, closing connecting through the local network and through the cloud, still a blank sitemap. @digitaldan’s question though, brought me to think the parser in the app might have changed so I will try a very simple sitemap (mine is faily extensive).

I also noticed that the app does not differ between local or cloud access anymore, previously you got different messages ”Connecting to local URL” and ”Connecting to remote URL”. This distinction has helped me a lot over time when searching for errors and connectivity issues. Now it only says ”Connecting”

digitaldan commented 1 month ago

brought me to think the parser in the app might have changed so I will try a very simple sitemap (mine is faily extensive).

That would be very helpful, my guess is that it is exactly that, a sitemap widget probably combined with a specific state value that is causing the renderer to fail.

previously you got different messages ”Connecting to local URL” and ”Connecting to remote URL”.

yeah, i removed this a long while ago in our test flight builds once the MainUI itself added a connecting message toast popup. There were just too many things alerting you when connecting (was very annoying). But i agree, it was useful to know, I'll look at adding back in a way to determine the network connection type.

M-ax-G commented 1 month ago

Same here…\

Got the ‘legacy’ message in the iPhone app v1. Downloaded the ‘official’ app from the AppStore; v3.0.5 (11) iPhone 11 iOS 17.6.1 openHAB 3.4.3

Opened the new OH app v2 from the local network.

I did delete the v2 app and reinstalled it; same result.

alfpf commented 1 month ago

yeah, i removed this a long while ago in our test flight builds once the MainUI itself added a connecting message toast popup. There were just too many things alerting you when connecting (was very annoying). But i agree, it was useful to know, I'll look at adding back in a way to determine the network connection type.

I see your point, an alternative might be to remove the message alltogether (you will intuitively understand that you are connected anyhow if the sitemaps shows) and instead add some indicator if it local or remote to the settings menue or even to the top of the screen

okuehn commented 1 month ago

Hi @digitaldan I have the same issue with my main sitemap is empty after the update. Meanwhile I found the entry in the sitemap which is causing the issue:

Switch item=FAN_BATH1_MODE label="Fan Mode" mappings=[MODE_ABLUFT="Abluft",MODE_INVERTER="Inverter",FAN_POWER="Off"]

When I delete or uncomment this line the sitemap is working again.

digitaldan commented 1 month ago

Thats interesting, what does the item look like ? (either from the items file, or screenshot in the mainUI if configured there). Also whats the current state of that item?

okuehn commented 1 month ago

that's the item configuration

String FAN_BATH1_MODE "Fan bath1 mode" { channel="broadlink:rm3:34:ea:34:58:b1:17:command" }

mjeshurun commented 1 month ago

Hi @digitaldan I have the same issue with my main sitemap is empty after the update. Meanwhile I found the entry in the sitemap which is causing the issue:

Switch item=FAN_BATH1_MODE label="Fan Mode" mappings=[MODE_ABLUFT="Abluft",MODE_INVERTER="Inverter",FAN_POWER="Off"]

When I delete or uncomment this line the sitemap is working again.

Hi @digitaldan , I'm seeing the same behaviour as @okuehn . Once I temporarily uncomment ( // ) all the items lines that include "mappings" in a specific frame, the other items show up properly.

For example: This code leads to no items being shown in the openhab app:

Text label="Salon Climate" icon="climate" {
                Frame label="Fan" {
                    Switch item=SalonTV_Switch1 label="Salon Fan" icon="fan_ceiling"
                    Switch item=rf_command label="Fan Speed[]" icon="qualityofservice" mappings=[salon_fan_1=" 1   ",salon_fan_2=" 2   ",salon_fan_3=" 3   ",salon_fan_reverse="REV"]
                    Switch item=rf_command label="Fan Timer[]" icon="time" mappings=[salon_fan_0h="OFF",salon_fan_1h=" 1h ",salon_fan_3h=" 3h ",salon_fan_6h=" 6h "]
                }
                Frame label="AC" {
                    Switch item=SalonAC_ONOFF label="Salon AC" icon="climate"
                    Selection item=SalonAC_Cool_Mode label="Cool Mode" icon="heating" mappings=[auto="Auto", cool="Cool", dry="Dry", wind="Fan", heat="Heat"]
                    Selection item=SalonAC_Temperature label="Set Temperature [%.0f °C]" mappings=[16="16°C", 17="17°C", 18="18°C", 19="19°C", 20="20°C", 21="21°C", 22="22°C", 23="23°C", 24="24°C", 25="25°C", 26="26°C", 27="27°C", 28="28°C", 29="29°C", 30="30°C"]
                    Setpoint item=SalonAC_Temperature label="Set Temperature [%.0f °C]" minValue=16 maxValue=30 step=1
                    Text item=SalonAC_Room_Temperature label="Room Temperature [%.0f °C]" icon="temperature"
                    Text item=SalonAC_Room_Humidity label="Room Humidity [%.0f ]" icon="humidity"
                    Selection item=SalonAC_Fan_Mode label="Fan Speed" icon="qualityofservice" mappings=[auto="Auto", low="Low", medium="Medium", high="High", turbo="Turbo"]
                    Selection item=SalonAC_Operation_Mode label="Operation Mode" icon="flow" mappings=[off="Off", quiet="Quiet", windFree="Windfree", speed="Fast Turbo"]
                }
                Frame label="Fire" {
                    Switch item=Fire label="Fire Heater" icon="fire"
                    Switch item=rf_command label="Fire Heater[]" icon="fire" mappings=[fire_heater_off="OFF",fire_heater_on="ON"]
                    Switch item=rf_command label="Fire ▲/▼[]" mappings=[fire_heater_h="▲",fire_heater_h="▲",fire_heater_l="▼",fire_heater_l="▼"] icon="none"

but if I uncomment the lines with "mappings", the other items will show up properly in the app:

Text label="Salon Climate" icon="climate" {
                Frame label="Fan" {
                    Switch item=SalonTV_Switch1 label="Salon Fan" icon="fan_ceiling"
                    //Switch item=rf_command label="Fan Speed[]" icon="qualityofservice" mappings=[salon_fan_1=" 1   ",salon_fan_2=" 2   ",salon_fan_3=" 3   ",salon_fan_reverse="REV"]
                    //Switch item=rf_command label="Fan Timer[]" icon="time" mappings=[salon_fan_0h="OFF",salon_fan_1h=" 1h ",salon_fan_3h=" 3h ",salon_fan_6h=" 6h "]
                }
                Frame label="AC" {
                    Switch item=SalonAC_ONOFF label="Salon AC" icon="climate"
                    //Selection item=SalonAC_Cool_Mode label="Cool Mode" icon="heating" mappings=[auto="Auto", cool="Cool", dry="Dry", wind="Fan", heat="Heat"]
                    //Selection item=SalonAC_Temperature label="Set Temperature [%.0f °C]" mappings=[16="16°C", 17="17°C", 18="18°C", 19="19°C", 20="20°C", 21="21°C", 22="22°C", 23="23°C", 24="24°C", 25="25°C", 26="26°C", 27="27°C", 28="28°C", 29="29°C", 30="30°C"]
                    Setpoint item=SalonAC_Temperature label="Set Temperature [%.0f °C]" minValue=16 maxValue=30 step=1
                    Text item=SalonAC_Room_Temperature label="Room Temperature [%.0f °C]" icon="temperature"
                    Text item=SalonAC_Room_Humidity label="Room Humidity [%.0f ]" icon="humidity"
                    //Selection item=SalonAC_Fan_Mode label="Fan Speed" icon="qualityofservice" mappings=[auto="Auto", low="Low", medium="Medium", high="High", turbo="Turbo"]
                    //Selection item=SalonAC_Operation_Mode label="Operation Mode" icon="flow" mappings=[off="Off", quiet="Quiet", windFree="Windfree", speed="Fast Turbo"]
                }
                Frame label="Fire" {
                    Switch item=Fire label="Fire Heater" icon="fire"
                    //Switch item=rf_command label="Fire Heater[]" icon="fire" mappings=[fire_heater_off="OFF",fire_heater_on="ON"]
                    //Switch item=rf_command label="Fire ▲/▼[]" mappings=[fire_heater_h="▲",fire_heater_h="▲",fire_heater_l="▼",fire_heater_l="▼"] icon="none"
timbms commented 1 month ago

Can you please try to enclose each cmd in each mapping cmd=label=icon with quotes "" ie. replace Switch item=FAN_BATH1_MODE label="Fan Mode" mappings=[MODE_ABLUFT="Abluft",MODE_INVERTER="Inverter",FAN_POWER="Off"] with Switch item=FAN_BATH1_MODE label="Fan Mode" mappings=["MODE_ABLUFT"="Abluft", "MODE_INVERTER"="Inverter", "FAN_POWER"="Off"]

mjeshurun commented 1 month ago

Can you please try to enclose each cmd in each mapping cmd=label=icon with quotes "" ie. replace Switch item=FAN_BATH1_MODE label="Fan Mode" mappings=[MODE_ABLUFT="Abluft",MODE_INVERTER="Inverter",FAN_POWER="Off"] with Switch item=FAN_BATH1_MODE label="Fan Mode" mappings=["MODE_ABLUFT"="Abluft", "MODE_INVERTER"="Inverter", "FAN_POWER"="Off"]

Hi @timbms , I tried your suggestion and changed these lines: from:

Switch item=rf_command label="Fan Speed[]" icon="qualityofservice" mappings=[salon_fan_1=" 1   ",salon_fan_2=" 2   ",salon_fan_3=" 3   ",salon_fan_reverse="REV"]
                    Switch item=rf_command label="Fan Timer[]" icon="time" mappings=[salon_fan_0h="OFF",salon_fan_1h=" 1h ",salon_fan_3h=" 3h ",salon_fan_6h=" 6h "]

to:

Switch item=rf_command label="Fan Speed[]" icon="qualityofservice" mappings=["salon_fan_1"=" 1   ","salon_fan_2"=" 2   ","salon_fan_3"=" 3   ","salon_fan_reverse"="REV"]
                    Switch item=rf_command label="Fan Timer[]" icon="time" mappings=["salon_fan_0h"="OFF","salon_fan_1h"=" 1h ","salon_fan_3h"=" 3h ","salon_fan_6h"=" 6h "]

But this change didn't solve the issue.

digitaldan commented 1 month ago

that's the item configuration

Thanks, but whats the current state of the item ?

digitaldan commented 1 month ago

Ok, thanks to @mjeshurun i was able to test against a live system, as i suspected this was triggered by the state, or rather state command descriptions. I'll push something to testflight right now to try.

digitaldan commented 1 month ago

Just fyi 3.06 (13) is waiting for Apple to review before they allow it on testflight for external use, its kinda random how long this can take. Sometimes its minutes, sometime 24 hours or more......

Gadget-Guy commented 1 month ago

I’m also having a problem with my sitemap that results in a blank page. Please see the screenshot for details. IMG_3363

digitaldan commented 1 month ago

So the latest build is now available on testflight, if people could try it out that would be helpfull

https://testflight.apple.com/v1/app/6505005945?build=149447167

I’m also having a problem with my sitemap that results in a blank page. Please see the screenshot for details.

Looks like you have errors? You should fix those before posting that IOS can't render it as thats not an iOS issue as far as i can tell.

M-ax-G commented 1 month ago

Would love to test; installed TestFlight, but it is asking for a Redeem code to participate. Can you share? I can also click on the provided link, but it says "Couldn't load app".

Gadget-Guy commented 1 month ago

Looks like you have errors? You should fix those before posting that IOS can't render it as thats not an iOS issue as far as i can tell.

This system has been working fine for several years and has not been updated since it will be decommissioned in a few months. Even with this syntax error (which I just noticed) the web interface and older iOS app (v2.4.56) are still working fine. I assume the syntax error occurred after the system was inadvertently updated to version 4 at some point. FWIW, it appears to be an issue with groups. I removed them and all is well.

digitaldan commented 1 month ago

Would love to test; installed TestFlight, but it is asking for a Redeem code to participate. Can you share?

Hmm, maybe try this link? There should not be any code... 🤞 https://testflight.apple.com/join/0uFYONeF

mjeshurun commented 1 month ago

Would love to test; installed TestFlight, but it is asking for a Redeem code to participate. Can you share?

Hmm, maybe try this link? There should not be any code... 🤞 https://testflight.apple.com/join/0uFYONeF

I think the new build is not available yet on Testflight. I’m still seeing version 3.0.4 (10), that was posted about 20 days ago.

IMG_5489

M-ax-G commented 1 month ago

Hmm, maybe try this link? There should not be any code... 🤞 https://testflight.apple.com/join/0uFYONeF

Yes, this works... thanks.

okuehn commented 1 month ago

Link is working now, but as mentioned by @mjeshurun the Testflight version is still the old 3.0.4 (10)

M-ax-G commented 1 month ago

Just fyi 3.06 (13) is waiting for Apple to review before they allow it on testflight for external use, its kinda random how long this can take. Sometimes its minutes, sometime 24 hours or more......

Well, for what it is worth, version (10) works for me; it opens, I can log in, see all me stuff, and can select a sitemap, which it shows. I think (11) was the one most recently released. Can't look as that version as the beta replaced it (which is fine).

timbms commented 1 month ago

I’m also having a problem with my sitemap that results in a blank page. Please see the screenshot for details. IMG_3363

Have a look at : https://github.com/openhab/openhab-webui/issues/2701 Your mappings may be wrong.

alfpf commented 1 month ago

So the latest build is now available on testflight, if people could try it out that would be helpfull

Hi, just tested 3.0.4 (10) both with local and remote connection and screen is still blank.

digitaldan commented 1 month ago

Sorry, i jumped the gun after getting an email saying the build was ready (internal testing).

image

Hopefully they approve in the next few hours 🤞

digitaldan commented 1 month ago

Ok, Apple says its available now

https://testflight.apple.com/join/0uFYONeF

image
mjeshurun commented 1 month ago

Ok, Apple says its available now

https://testflight.apple.com/join/0uFYONeF

image

Thank you very much, Dan 🙏 I can confirm TestFlight version 3.0.6 fixes the sitemap issue I had, and all items are now showing again.

alfpf commented 1 month ago

Ok, Apple says its available now

https://testflight.apple.com/join/0uFYONeF

Yup, that did the trick 👍🏻, with version 3.0.6 (13) sitemap is back and working as before (both local & remote). Many thanks @digitaldan!

M-ax-G commented 1 month ago

Can also confirm 13 works. Thank you.