openhab-android
openhab-android copied to clipboard
[FR] OpenHAB UI 3 URL is hard-coded to myopenhab.orgmyopenhab.org
Hi,
I plan to modify the following line of code in (org.openhab.habdroid.ui.activity.Oh3UiWebViewFragment) and add in a new setting to append user-configurable subdomain (etc “home.”) so that it will work for private OpenHab Cloud. What you think?
override fun modifyUrl(orig: HttpUrl): HttpUrl {
if (orig.host == "myopenhab.org") {
return orig.newBuilder()
.host("home.myopenhab.org")
.build()
}
return orig
}
I'd rather add a new API endpoint on the cloud server that returns the URL for main UI or hard-code a new path, e.g. https://cloud/mainui
-> return main UI.
I thought the configurable url needs to be at the cloud server base url in order for firebase notification to work?
On Fri, Jan 13, 2023 at 5:22 PM mueller-ma @.***> wrote:
I'd rather add a new API endpoint on the cloud server that returns the URL for main UI or hard-code a new path, e.g. https://cloud/mainui -> return main UI.
— Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-android/issues/3147#issuecomment-1381526599, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGIZDC6MQJOJMSRHVXWAJLWSENE3ANCNFSM6AAAAAATVRFTHU . You are receiving this because you authored the thread.Message ID: @.***>
I can tell for the official server:
-
myopenhab.org
is required for notifications -
home.myopenhab.org
is required for Main UI
Everything else works with both URLs. There's also an error message when you enter the wrong URL in the settings: https://github.com/openhab/openhab-android/blob/main/mobile/src/main/res/values/strings.xml#L180
It seems that the Main UI domain is hardcoded to home.
: https://github.com/openhab/openhab-cloud/issues/332