Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchOS app v2 doesn't load a sitemap created from MainUI #800

Open
nelsonaponte opened this issue Aug 26, 2024 · 48 comments
Open

watchOS app v2 doesn't load a sitemap created from MainUI #800

nelsonaponte opened this issue Aug 26, 2024 · 48 comments

Comments

@nelsonaponte
Copy link

Description
When the sitemap with the name "watch" is created using the MainUI, it is not found by the watchOS app and the console reports a 404 error. Only when the sitemap is created from a file configuration with the name "watch.sitemap" it can be loaded.

Steps To Reproduce

  1. Go to MainUI and create a sitemap with the name "watch".
  2. Add any element to the sitemap and save it.
  3. Try to load the sitemap after configuring the openHAB v2 app on the watch to connect to the OH instance.
  4. Nothing is loaded.

Expected behavior
A sitemap created using the MainUI with the correct name should be successfully loaded by the app.

App

  • Version: 3.0.4
  • Device: Apple Watch / watchOS 10.6.1
  • OH Version: 4.1.3
@timbms
Copy link
Contributor

timbms commented Oct 31, 2024

Please try with latest TestFlight release

@alaub81
Copy link

alaub81 commented Oct 31, 2024

Hi @timbms,

I am running the latest testflight version, but can not load any sitemaps on my watch. I get the error sitemap without title
Sitemap watch.sitemap did work with the earlier TestFlight versions. Only the icon problem was there. I have a copy of that managed in MainUI and also switching to that one, the same error accrued.

Shall I create a new issue?

cheers
Andreas

@timbms
Copy link
Contributor

timbms commented Oct 31, 2024

We miss some instructions here. Please do the following:

  1. On iPhone go to Settings, select the relevant "Sitemap for Apple Watch"
  2. On Watch: swipe 2 times to the left, press "Sync Preferences", swipe back to sitemap

@alaub81
Copy link

alaub81 commented Oct 31, 2024

I did that many times, also switching between the two sitemaps, the main ui one and the watch.sitemap on my filesystem. Deleting the icon cache and so on.

Any other ideas?

here is my watch.sitemap perhaps I did a syntax mistake:

sitemap watch label="watch" {
    Frame label="Muase Facts" icon=group {
        Default item=NetatmoHomeOutdoor_Temperature label="Außen [%.1f °C]"
        Text item=Temperatur_Innen_ALL label="Innen [%.1f °C]"
        Default item=NetatmoRegenmesser_KumulierterNiederschlag1h label="Niederschlag (1h)"
        Default item=NetatmoWindmesser_Windgeschwindigkeit label="Wind"
        Default item=inverter1ActivePower label="PV Produktion"
        Default item=TotalPowerConsumption label="Stromverbrauch"
        Default item=inverter2BatStateCharge label="Batteriespeicher"
        Text item=Fenster_ALL label="Fenster [%s]"
    }
    Frame label="Camera" icon=camera {
        Image item=Snapshot_Garten_Snapshot_Image label="Garten"
        Image item=Snapshot_Terrasse_Snapshot_Image label="Carport"
        Image item=Snapshot_Carport_Snapshot_Image label="Carport"
        Image item=Snapshot_Schuppen_Snapshot_Image label="Schuppen"
    }
    Frame label="Muase Control" icon=group {
        Switch item=Lichter_ALL
        Switch item=Rolladen_ALL
        Default item=Markise_Control
        Default item=Lampe_Carport_Betrieb_2
        Default item=Anwesenheit
    }
}

@timbms
Copy link
Contributor

timbms commented Oct 31, 2024

This seems unrelated to the specific sitemap. Nevertheless, I copied the sitemap to my installation and was able to get it displayed on the watch in simulator (I broke my watch and therefore cannot test on a physical device currently).
To analyze this further:

  • Do you see a watch icon in the drawer menu on your iPhone?
  • Are you securing the access to your openHAB server?

@alaub81
Copy link

alaub81 commented Oct 31, 2024

Thank you for Testing it! Yes i See a Watch Icon on the selected Sitemap for the watch. You mean the Secure Connection with SSL Port 8443? Yes i am using it. But also the Remote Connection does not work.

@timbms
Copy link
Contributor

timbms commented Oct 31, 2024

  • Are settings synched to the watch?
  • Are you using certificates for authentication?

@alaub81
Copy link

alaub81 commented Oct 31, 2024

No, i am using no certificates for authentication. Watch is synchronized and is showing the selected sitemap. I also tested other sitemaps without success. Active URL is the myopenhab Cloud. User is my cloud user. I played around with send credentials everytime and other options. But no success. Will have a look at the logfile later, perhaps something is logged.

@alaub81
Copy link

alaub81 commented Oct 31, 2024

I think i found the problem. Local direct connection is working. I was remote connected at the beginning of my tests. But i can not get it work over the Cloud connection. And also i can‘t See and icons. Changed settings from SVG to PNG and back. But no Icon was shown. I know that change should also fix the Icon problem.

@timbms
Copy link
Contributor

timbms commented Oct 31, 2024

We will then have to investigate two issues:

  • SVG icons not working
  • Remote connections

@digitaldan
Copy link
Contributor

I noticed the cloud connection issue as well, i'll take a look at that today.

@timbms
Copy link
Contributor

timbms commented Oct 31, 2024

@alaub81 Can you post the SVG icon that is not working?

@alaub81
Copy link

alaub81 commented Oct 31, 2024

@alaub81 Can you post the SVG icon that is not working?

I am using the standard openHAB icons. e.g.:

  • temperature
  • humidity
  • solarplant
  • rollershutter
  • window
  • switch

in the older versions of the watch TestFlight app, a kind of placeholder icon with a grey crossed out circle, but now, if I choose SVG as icon Typ in the IOS app Seetings, there is nothing shown, so just the background is there. Am I right, that I have to switch from PNG to SVG in the settings, because there aren't any PNG icons anymore?

@alaub81
Copy link

alaub81 commented Oct 31, 2024

And another issue, scrolling with the scroll wheel is not working with that new version. Scrolling is only working on the display itself.

after restarting my Apple Watch scrolling does work. so no issue here.

@GeVaSta
Copy link

GeVaSta commented Nov 19, 2024

I noticed the cloud connection issue as well, i'll take a look at that today.

digitaldan, were you able to chase this bug?

@maxulm
Copy link

maxulm commented Jan 2, 2025

Any News?

@GeVaSta
Copy link

GeVaSta commented Jan 2, 2025

It looks like the Testflight version is not required anymore. You can revert to the normal production version in the App Store.
At least it works now both on my iPhone and Apple Watch.

@maxulm
Copy link

maxulm commented Jan 2, 2025

Yeah, but the problem with the icons on the Watch is still Not solved. :/

@GeVaSta
Copy link

GeVaSta commented Jan 2, 2025

Right. I meant the Sitemap not loading issue.
On my watch however the icons load fine. But I did not follow that discussion.

@nelsonaponte
Copy link
Author

nelsonaponte commented Jan 5, 2025

I can finally load a Sitemap created using MainUI.
Moreover, we can select the Sitemap to display, from all available Sitemaps, even with a different name:
image

I cannot see icons on the watch when I load the Sitemap created with MainUI, but I can see icons when I load the one created with textual configuration.
The icon type is SVG, and I’m also using the standard openHAB icons.

Here is the code of my MainUI Sitemap:
sitemap watch_test label="watch Test" { Text icon=frontdoor label="Presence & Alarm" Switch icon=switch item=Override_Vacation_Mode label="Vacation Mode" Switch icon=lock item=Frontdoor_LockState label="Frontdoor Lock" Switch icon=cinema item=LR_Scene_Movie label="Movie Scene" Text icon=projector label="Scenes" Switch icon=switch item=Override_Home_Away label="Away Mode" }

@GeVaSta
Copy link

GeVaSta commented Jan 5, 2025

I also tried this Testflight 3.0.8 version but I still get keeping the error ‘Sitemap without title’ when connected using the openHab cloudconnector.
When I start a VPN it works ok; not remote.

@GeVaSta
Copy link

GeVaSta commented Jan 7, 2025

I noticed the cloud connection issue as well, i'll take a look at that today.

This what digitaldan wrote more then 2 month ago but we did not hear anything after this. Is this still on someones plate?

@digitaldan
Copy link
Contributor

Yes i am still working on this, no i don't have an eta

@GeVaSta
Copy link

GeVaSta commented Jan 7, 2025

No problem. Glad to know it’s still on your list.

@xxshazxx
Copy link

Hello, by testing the API, I've realized the REST API works properly only by using rest/sitemaps/uicomponents_watch and not rest/sitemaps/watch
On the iOS app, the request seems to be made for "watch" only.
I hope this could help.
Is it possible to be added to the testflight version?

Thanks
Regards
Edy

@GeVaSta
Copy link

GeVaSta commented Feb 1, 2025

Is there someone who managed (with some kind of workaround) to get the Testflight IOS app working on a remote connection using openhab cloud on a version higher than 3.0.5?

I still get the error “Sitemap without title” (since november 2024), but priority to fix this seems low.

@digitaldan
Copy link
Contributor

but priority to fix this seems low.

Its not low, but going slowly given this is a bigger issue to fix internally and we all do this in our spare time, nights and weekends.

You can see the latest PR thats being worked on
#857

@GeVaSta
Copy link

GeVaSta commented Feb 2, 2025

Sorry Dan, did want to upset you and appreciate all your work.
The issue is I had no idea if someone is working on it because I could not find any updates on this issue.
But I understand any updates on this issue will appear in #PR 857.

@digitaldan
Copy link
Contributor

There is a test flight version out that may solve this, let me know the results, thanks.

@maxulm
Copy link

maxulm commented Feb 20, 2025

It Looks great !!

@alaub81
Copy link

alaub81 commented Feb 20, 2025

Tested it, too. Connection via 5G works now. And I figured out, via 5G the icons are shown in my sitemap on the watch, but not via WIFI. Can someone test that, too? Or do I have to change something?

@GeVaSta
Copy link

GeVaSta commented Feb 20, 2025

My sitemaps load ok now and after switching the icontype to png and restarting the Watch app, the icons also returned.
One issue however. The systemtime (right-top) of the Apple watch is overlaid on openHAB all the time. So also when scrolling down its stays overlaid.
See screenshots.

Image
Image
Image

@xxshazxx
Copy link

Hello, is it possible to have the code to be part of the testflight ?
Thanks a lot

@alaub81
Copy link

alaub81 commented Feb 20, 2025

I played around a little bit, but I can't get the icons shown when I am connected via WIFI.

I tried to use SVG and PNG Icons, deleted the icon cache, delete the web cache.
When I disable WIFI on my iPhone the connection is working fine over myopenhab.org, when I close the app on the watch, and enable wifi, all icons are not shown anymore. Also when I am on 5G and switching to wifi, all icons are disappearing.
My local connection is via https, so port 8443.

@GeVaSta can you please try it again, you have to be sure that the active connection is not the direct, local one.

@digitaldan
Copy link
Contributor

The systemtime (right-top) of the Apple watch is overlaid on openHAB all the time.

Is this new, or has it always done this, i don't think i modified the UI in any way

And I figured out, via 5G the icons are shown in my sitemap on the watch, but not via WIFI.

Thats certainly strange, my are working, but i'm going through a caddy server with a real certificate, myopenhab also has a real cert, so that may be the issue, i'll take a look, its likely i missed moving image downloading over to the new HTTP stack for the watch

Hello, is it possible to have the code to be part of the testflight ?

as stated in the README, its available at
https://testflight.apple.com/join/0uFYONeF

@GeVaSta
Copy link

GeVaSta commented Feb 20, 2025

I noticed immediately the ‘look’ had changed and it had to be the time I thought. I found however an older video I made in the past with an older version and there I found out the truth is different.
The time was there all the time including the text ‘openHAB’ below it, but it got blurred when scrolling through the items. So it was not really overlaid but more on the background. In the screenshot (still from the video) it is shown how it looked.

Image

I tried again, also on request of alaub81, to test the showing of the icons with both a remote connection (over the openhabcloud) and when switching on my VPN to my homeserver, like a local connection (I am not in the country where my homeserver is). In both situations my icons are displayed fine.

@GeVaSta
Copy link

GeVaSta commented Feb 20, 2025

An extra screenshot without scrolling the items.so the top of the sitemap.
Blurring starts when turning the crown or sliding the screen up.

Image

@GeVaSta
Copy link

GeVaSta commented Feb 20, 2025

Another thing I noticed is scrolling through the items does not always work with the Digital Crown (nothing happens when you turn the crown) but sliding the screen up and down works.
Sometimes after force closing the openHAB app solves this but not always. Reboot8ng the watch then helps.
This is not new but was already the case in the last versions.

@GeVaSta
Copy link

GeVaSta commented Feb 21, 2025

A question/request.
When you open the app on the Apple Watch. You see the previous displayed information for a fraction of a second. Then the screen goes blank until new refreshed information is available. This can take some seconds.
Would it be possible to leave the ‘old’ information displayed and then let the new information refresh the older information. This way you don’t have to look at a blank screen an one can already scroll to the desired place until the up-to-date info appears.
I thought this was the behaviour in the previous versions.

@digitaldan
Copy link
Contributor

digitaldan commented Feb 21, 2025

@GeVaSta please open separate issues up for things not related to this ticket so we can track them better. I can see about fixing some of them while i am actively in the code base.

@alaub81
Copy link

alaub81 commented Feb 21, 2025

I think, that this issue can be closed, because, UI created sitemaps are working now via openhab cloud and local, or am I wrong? I will also open up a new issue, with my icon problem, but I will first play around with this, perhaps I have a problem on my setup.

@GeVaSta
Copy link

GeVaSta commented Feb 21, 2025

Dan, should I open just a new issue also when its related to the latest Testflight version like now?

@digitaldan
Copy link
Contributor

This issue is around not loading sitemaps, you have brought up quite a few different issues not related, each should be it own issue, i can't keep track of long threads like this, as i work across half a dozen repos and have to context switch often .

@GeVaSta
Copy link

GeVaSta commented Feb 21, 2025

All clear Dan. New issues created.

@alaub81
Copy link

alaub81 commented Feb 24, 2025

And I figured out, via 5G the icons are shown in my sitemap on the watch, but not via WIFI.

Thats certainly strange, my are working, but i'm going through a caddy server with a real certificate, myopenhab also has a real cert, so that may be the issue, i'll take a look, its likely i missed moving image downloading over to the new HTTP stack for the watch

I found out that the problem must be related to the self signed certificate of my openhab setup. If I change the local connection to 8080, so without ssl, the icons are there, as they are when I connect remote over myopenhab. Shall I open a new ticket for that?

@digitaldan
Copy link
Contributor

I found out that the problem must be related to the self signed certificate of my openhab setup.

Right, i stated that a few posts up. No don't open another ticket, thats still related to this one and moving all networking to the new http stack on the watch, and its still being worked on.

@digitaldan
Copy link
Contributor

There's a new Testflight release being rolled out, hopefully this fixes image loading.

@alaub81
Copy link

alaub81 commented Feb 28, 2025

Thanks @digitaldan, now it is working with the new TestFlight version!

cheers
Andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@digitaldan @timbms @alaub81 @maxulm @xxshazxx @GeVaSta @nelsonaponte and others