No connection via Android app

I looked at the app’s traffic and found that it tries to connect to a wrong IP address, in fact the (static) IP address of my raspberry Pi2 I used when I first tested openhab2, although the correct IP address is configured in the app settings.
(my current installation is now on a Pi3).

I deleted the cache and any settings of the openhab app, then uninstalled and re-installed it but it still looks for the wrong IP address. Not sure if the static IP addresses might cause this or some remains of the app.

Try connecting without any entry in that field. The app will search for active openHAB servers and connect automatically. It just takes one or two seconds longer this way…

No luck, it is still trying to connect to the initial IP address …

Buy a new phone :grinning:
Sorry, no more ideas.

Finally I re-assigned the IP addresses in the router to make the app work.
Quite cumbersome actually and hardly what I would call a real ‘solution’ of the issue.
Thanks again for the help.

Seems do be a timeout problem. When I connect from openhab android app, the port 8080 is opened for about half a second and closed, if there is no connection. So the app doesn’t work on first try. Connection from browser keeps the port open much longer.

I experienced a very similar issue today where the app did not connect while all web access worked perfectly.
After many trials the reason turned out to be the DNS of Fritz!OS v7.01 on my Fritz router. Over the years I had many problems with that Fritz DNS and its name resolution. The most common problem – which hit me again today – tends to happen when Fritz sees two devices, where the name of one device is a substring of the name of the other device. In my case I had connected 2 RasPis, one named openHABianPi (the default that openHABian communicates to the DNS) and the other one openHABianPiDemo. So the name of the first was a substring of the name of the second. I should have known from the past that this invites suffering, but I thought that AVM would probably have fixed this in the mean time.

Anyway, the result of this setup is that a DNS lookup for openHABianPi returns 2 (!) IP addresses.
Here is an nslookup issued from my Mac in the same subnet as the two RasPi boxes:

$ nslookup openhabianpi


While all browsers seem to use the second IP address and work fine, the app seems to use the first one, which is the address of the “Demo” RasPi. So trying to connect to the first box through the app you either access the second box, no matter what name you use (I had this case earlier today), or you do not get an app connection to the first box if the second box is down (which I enjoyed later today).

Unfortunately AVM has closed down all easy ways to access the Fritz shell through Telnet and purge the Fritz DNS cache. The solution I finally found was to remove the second box from the list of known connections in the Fritz administration website. This removed the second IP address in the DNS resolution and all works nicely now.

1 Like

hi, I do can connect to my local via http:\
but can’t using http:\openhab:8080
I also tried http:\openhab.local:8080 but doesn’t work
can anybody help?
Im using android 10

Really? It should be
If your system that is reachable as is named openhab it should be working, of course by using the correct syntax.

i need to know the correct way to use the local host instead of the local ip, any idea?
im talking about the phone app

When you install the Android app, it should try to find your local openHAB through autodiscovery. Once that’s working, insert your host name where the IP address is stated in the Android app settings.

If that’s not working, the problem might be Android (which sometimes struggles with local host names).

I tried http://openhabianpi:8080 also http://openhabianpi.local:8080
but doesnt work

Have you tried the address of the network of the machine where you have got openhab on?