Openhab app ios can't connect to openhab2 linux

Tags: #<Tag:0x00007f6173daae90> #<Tag:0x00007f6173daad00>

Hello,
I’ve downloaded and installed openhap-app on an iPad Air. After starting the app, I have turned off the demo mode and pushed save. After the restart I get the notification, that the app is “discovering openHAB”. After that I get the notification that the app “Connecting to the the discovered URL”. After about 30 seconds I get an error “ERROR, the request timed out”. I try to connect via the internal network.
I didn’t try to connect to MyopenHab, because I haven’t an account for this service.

Technical specifications
iPad Air Software version 12.4.6.
OpenHAB app version 2.3.1
Openhab 2.5.6-2 running on
OS Linux Mint 19.3 Mate including latest updates
Firewall is on. Port 8080 is open
OS Linux Mint runs on Lenovo Thinkpad Edge E130 RAM 8Gb
Router Fritzbox 7490
I have taken a look at the community of openHAB under Apps & Service IOS App but couldn’t find anything for this problem.
The openHAB logfile doesn’t give me any information. The logfile of Linux Mint also doesn’t give me any information.

Does anyone know what I’m doing wrong or is it just not possible to remote connect via the internal network to openHAB when running on Linx OS?
I know that Linux isn’t very friendly for connections from outside besides SSH. I would think, that that problem should have been solved by the app.

Any suggestions or possible solutions are welcome.

Don’t rely on discovery manually set the local
url to the ip of your openHAB server.

Http://openHABip:8080 I believe is what you need.

Thanks for the answer and suggestion.
I didn’t mention this one in my topic, but I’ve done your suggestion also,including http: and not https:. That didn’t give any positive results too.

Checked iptables? Maybe your distro has firewall enabled by default

Firewall is enabled by default. But even when turning the firewall off it is not possible to connect to openHAB. BTW port 8080 is set open in the firewall.

What do you get when you open a browser on your iPad and connect to your openhab instance ?

When I use safari I get the following text “Safari couldn’t open page, because the server stopped responding”. I also tried putting on my VPN. That gives the same reaction in safari as without VPN. I also tried with the firefox browser. That gives the same result. I also tried to put the fireall off. Also that gives the same result.

Did you use the internal IP address when trying to connect with a browser ?
Please login to your openhab instance and run the command

sudo netstat -tulpe |grep LISTEN

this will list all listening ports.
Please post this list.
You may redirect the output to a file by adding

> /tmp/file.txt

at the end of the above command. The output will be stored in file file.txt in directory /tmp.
You can get it from there by e.g. using sftp to connect to your openhab instance.

Yes, i did use the internal address.
Just for the record. What do you mean with login to your openhab. Openhab is running and I can use paperui, habpanel and so on. So I suppose, I’m logged in. Is that correct?

In /etc/default/openhab the rule for port 8080 and port 8443 are:
#OPENHAB_HTTP_PORT=8080
#OPENHAB_HTTPS_PORT=8443
So these are not used by default. Could that be the problem?

Anything not changed in /etc/default/openhab2 shows the default values. They only need to be uncommented to override.

Use openhab-cli info to see what the URL and port should be currently set to.

do you have a sitemap in basicui?

I’ve uncommented the two lines in /etc/defaut/openhab restarted openhab. Didn’t solve the problem.
Openhab-cli gives the following info.
User Groups: openhab adm tty dialout mosquitto

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab2 | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab2/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab2 | openhab:openhab
OPENHAB_CONF | /etc/openhab2 | admin1:adm
OPENHAB_LOGDIR | /var/log/openhab2 | openhab:openhab

URLs: http://xxx.xxx.xxx.xx:8080
https://xxx.xxx.xx.xx:8443

In basicui I see the sitemaps I’ve created.

Can you post a screen capture of your app settings?

If basic ui is reachable in a browser, then the app should just work.

Added the screenshot of the app, only stettingspage
Added the result of sudo netstat -tulpe |grep LISTEN
file.txt (1.1 KB)


Thanks for the help so far.

The Local URL just shows port 8080.
Although already stated that you tried it before please enter http://:8080 in the field Local URL. Leave Remote URL empty.

EDIT:
Yes of course it has to be http://your local IP here:8080. I used some kind of tagging above which was removed by the forum software

Actually local should be http://openhabip:8080

I rebooted my PC with Linux Mint 19.3 and openhab2. I also rebooted my iPad. In the iPad openhab app I used http://openhabip:8080. I get the same response “ERROR, the request timed out”, as mentioned the first part of my topic. May worth mentioning. I installed openhab2 from the Software Manager in Linux Mint. So I didn’t download the software from openhab.org. Thanks for your help so far.

When looking at BasicUI/PaperUI which device(s) are you using ( with which OS)? I suppose not the one on which openHAB is running.

The device I use to look at the BasicUI/PaperUI is the same device on which Openhab2 is running. It is running with Linux Mint Mate 19.3. as OS. I try to connect to from my iPad to that device. So, yes its the same device.