Webpage in PC browser works, phone browser and app don't

  • Platform information:
    • Hardware: raspberry Pi 4 4GB
    • OS: raspbian 10
    • Java Runtime Environment: 11.0.12
    • openHAB version: 3.2.0.M3
  • Issue of the topic:I set up the openhab service and added bindings for a smart plugs and a bulb, added the models.
    All connections to the server are local ones i.e. the devices are all in he same network.
    From my PCs (Firefox) I can control the devices, but the Android app fails to connect telling me:" Authentication failed please check the configured username and password respectively the provided SSL client certificate (HTTP code 401).
    I use the same username and password as with the PC browser.
    I get the same message whether I use https://[ip address]:8443 or http://[ip address]:8080.
    Using https://[hostname]:8443 I get “Connection to local server failed and you haven’t configured a remote server.”
    https://[ip address]:8443, http://[ip address]:8080 or https://[hostname]:8443 gives me a blank browser window but no error message. Correction http://[ip address]:8080 and http://[hostname]:8080 work. So it is probably an issue with the SSL Certificate I did not replace yet.

Please give me advice on how to use the app,or at least the browser on the phone.

Thanks in advance and best regards.

I don’t think you should be using the Android app, instead just open a phone browser to the http://[ip address]:8080
I believe the app was for OH 2.x

Not sure why you think that. The Android app works fine with openHAB 3, and is still in active development.

When you install the app, it should automatically detect your server at setup. Did this happen? Ideally, it should be “http://ip-address:8080”, and you don’t need login information (though you can add it later).

My suspicion is that the app is looking for a sitemap, and you haven’t created one. When you use this IP address and get a blank page, are you able to swipe right from the left side of the screen to open the app menu? If so, click “openHAB 3 UI” to see the Main UI.

If this works, go into the app settings and and change “Start page” to “openHAB 3 UI”.

You don’t have to create a sitemap, but for a long time they were the default way to control OH. It might be that the app needs to be updated to point to MainUI as the default.

I use the Android app and it works fine with Openhab 3.

My local server url is only set to and the remote server url is not set.

What IP address are you entering in the app?

Admittedly my experience is only with iOS, not Android.
With iOS I abandoned the app with OH3.x MainGUI
Does the app expect sitemaps?

Yeah, I thought that might be the case. As far as I’m aware, they’re two completely different apps. I don’t know anything about the iOS one, but the Android app is quite powerful.

That’s what I think might be happening, but I can’t replicate the issue. At the same time, we’ve had lots of new users who likely haven’t made BasicUI sitemaps and haven’t raised this concern.

Autodiscovery works, but I get the aforementioned error. I copied the credentials from my KeePass, so it isn’t a typo.

How do I create a sitemap?

Sorry, but can you answer my question first? If my hunch is correct, we can fix this without you needing to create a sitemap.

Which question? As my edited post says, http via Firefox for Android works perfectly, https does not.

The app throws the http error 401 with an IP address/hostname set. Autodiscovery does not find a server.

FYI, I won’t see that you edited your post unless you tell me. When we’re trying to work through the problem, it’s better to answer inline.

https doesn’t work because you’re not connecting to a secure server (which isn’t necessary within your home network). It’s not expected to work.

As for the question, you quoted it, but didn’t directly answer.

Now I’m unclear on whether you’re getting a blank page or an error when you go to http://[ip address]:8080.

Actually, let’s try something else. Install the openHAB Beta app from the Play Store. You don’t have to uninstall the stable app. I’m just curious if it behaves the same or different.

In the app I get the error in the browser I got the blank screen if I used https.

BTW both the server and the phone are in the only difference is that the server is plugged into the router/dsl modem and the phone uses Wifi. So autodiscovery should work.

On the Beta App I get the same behavior.

Yeah, I don’t see any reason for it to be a network problem. But just to be sure, do you have another Android device that you can try? Best to rule out the possibility.

Hmm, I wonder if this is related to your issue. It’s not quite the same since they’re talking about regular web browsers, but the Android app is just using Android Webview (Chromium).