Openhab app ios can't connect to openhab2 linux

In other words you were never able to get a connection to the openHAB server from another device? Not with the IOS app and not using a browser on the IPad.
I would say this problem is caused by a network problem and it is not related with the IOS app.
Dumb question, are the openHAB server and the IPad on the same network/ same Wifi?

The conclusion is correct. They are in the same network, with one difference. The PC is connected by cable, the iPad is connected by Wifi. They are using IP-addresses of which the X-part XXX.XXX.XXX.??? is the same. If it is a network problem, then it should be the router I think, because putting the firewall to on and off at the PC doesn’t make any difference.

Are you able to ping from and to both devices?
As I’m not a networking expert, my help into this problem is limited.

I have done several pings from 2 devices.
From iPad with a ping tool
I can ping my router, which is positive
I can also login to my router, which is positive
I can not ping my PC with openhab2, which is negative

From my PC with openhab2 form terminal window
I can ping my router, which is positive
I can login to my router, which is positive
I can ping my Ipad, which is positive

So it looks like, that my router won let pass my iPad to the internal network, but I can access internet with my iPad. The question is now how to solve this problem. I’m going to investigate this. Any help would be welcome.

Update

I’ve done some more investigation.
From my iPad connected by Wifi
I can ping my Synology NAS, which is positive
I can not ping my MacBook Pro, which is negative

From MacBook Pro connected by cable
I can ping my iPad, which is positive
I can ping my Synology NAS, which is positive
I can not ping my PC with openhab2, which is negative.

From my PC with openhab2 connected by cable
I can ping my MacBook Pro

Did you allow the Wifi devices to communicate directly (that is a setting in the Fritzbox WiFi section)? As your findings, that would not explain all incomplete pings, however I’d check it.

I checked in the Fritzbox wifi settings the sufggestion “The active wireless devices displayed below may communicate with each other”. This setting is enabled.

Ok. I am out of ideas! This is above my network knowledge!

Ok,
thanks for your help so far.

Let’s back up a few steps and focus on just two devices. The openHAB machine and the Pc or Mac.

I would like you to obtain the op address if both devices. Once you have them try to ssh from the pc or Mac to the openHAB machine. Let’s confirm that works.

If it works then try accessing openHAB in a browser. Once you report your findings we will see how to proceed.

Devices used.
MacbookPro
PC Linux Mint running openhab2

From MacBook Pro to PC
Firewall rules on PC: ports 8080 and 22 are open in and out
Terminal:
Firewall on PC ON
ssh username@xxx.xxx.xxx.xx
ssh: connect to host xxx.xxx.xxx.xx port 22: Connection refused
Firewall on PC OFF, no reboot
ssh username@xxx.xxx.xxx.xx
ssh: connect to host xxx.xxx.xxx.xx port 22: Connection refused

From PC to MacBook Pro
Firewall rules on PC: ports 8080 and 22 are open in and out

ssh admin2@xxx.xxxx.xxx.xx
The authenticity of host ‘xxx.xxx.xxx.xx (xxx.xxx.xxxx.xx)’ can’t be established.
ECDSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXX…
Are you sure you want to continue connecting (yes/no)?
Entered NO
Host key verification failed.
Didn’t go any further, because I don’t if that would damage anything for the future

Firewall ON
The authenticity of host ‘xxx.xxx.xxx.xx (xxx.xxx.xxx.xx)’ can’t be established.
ECDSA key fingerprint is SHA256: XXXXXXXXXXXXXXXX…
Are you sure you want to continue connecting (yes/no)?
Entered NO
Host key verification failed.
Didn’t go any further, because I don’t if that would damage anything for the future

Based on these results I didn’t give a try accessing openhab in a browser.

I have set up a second Linux Mint system (Linux Mint 20 Mate) I’m able to ping this device from different other devices like iPad, Macbook Pro. I can also ping from LM PC running openhab2 to the Linux Mint 20 system, but I can not ping from the Linux Mint 20 system to the Linux Mint system running openhab2.
From my point of view it seems, that something is broken in the Linux Mint system running openhab2. I will investigate this first before going any further. I will let you know when I have more information. Thanks for the help and support so far. I’ll be back in a couple of days.

1 Like

You could try to use wireshark ( a netwok sniffer ) to check the network packages that arrive on your openhab instance. You should be able to see the incoming network packages even in case of a firewall. How did you disable the mint firewall on your openhab instance ?

I have tried wireshark at the system which is running openhab2. I see some communication between my iPad and the system, but my knowledge is to little to understand what is going on.
The wirewall is disabled by the gui which Linux Mint provides for setting up the firewall. That said, I have disabled home, office and public just to see if anything happens. This didn’t change the communication in the way, that I didn’t see any response in the app.

Lets backup a little before we procede:

  1. Can you ssh into the mint system from the ipad or any other system?
    2. Have you verified openhab is running properly via the logs on the mint system?

It seems the mint system might be causing the issue. I have never tried mint only ubuntu. But it works out of the box for openhab once you install java.

What version of linux mint are you using, I would like to have a go.

**update I had a try with Linux mint 20. Out of the box following the steps I have used on Ubuntu it does not work. Appeared to possibly be a java problem, so I a couple methods of java install and still not working. I am not sure of anything except one thing, openhab is not running.

I suspect the reason you can’t connect is because it is not running. You need to login to the mint system and see if there is a log file in /var/log/openhab2 also you can manually run sudo systemctl status openhab2.

Lastly, it looks like by default ssh is not installed hence the reason I suspect you could not connect over ssh.

I did a manual install of openhab2 vs the package manager and it is running.

In my setup I am linux mint, zulu java 8, and manual install of openhab2.

Not sure why the package install did not work for me, I unfortunately don’t have time to retry. I do know that openhab now will run on mint, so I advise doing a manual install. It on the openhab install page.

1 Like

Thanks so far for the help and suggestions.
I’ve rebooted the system this morning (NL)
I have run systemctl status. See for the result, see uploaded file.
I’ve also made a copy openhab.log, but only the part from the reboot moment. See uploaded file.
I’ve also made a copy of the events.log, but only the part from the reboot moment. See uploaded file.
I’ve made several rules in PaperUI rule engine to switch on and off some lights. They switched on and off yesterday.
the difference I ca see Jav. Iǘe installed open JDK 11 jre, where you installed the preferred one Zulu java8.
Also is mentioned that ssh is not installed. That is true, so that coud/will be the problem. I’m going to that a try. The question is however if the app needs ssh installed or not. I couldn’t find anything about that aspect.
Will keep you all informed about the result.
Openhab_Status_20200723_0953.txt (4.1 KB) Openhab_Events_20200723.log (45.0 KB) Openhab_log_20200723.log (3.0 KB)

Ssh is not required for the app. If you can reach the paper ui from your iPad web browser then the app should work once you have a sitemap in basic ui.

Java 11 should work now. I run it on my production system. I am confident it would have worked on mint for me had I done a manual openHAB install.

As mentioned before, I’ve set up a second system with linux mint 20 mate. I’ve installed Azul Zulu and after that openhab 2.5.7-1. I copied some items, things and maps from openhab2 system on linux mint 19.3 mate to the new system. Now I’m able to connect to the new system as well from the openhab-app on my iPad, as well by a browser from my linux mint 19.3 mate system. So it seems that something is wrong with my linux mint 19.3 mate. I only can’t figure out what is wrong. As far as I know, the only difference is that I installed Azul Zulu on my new system with linux mint 20 before installing Openhab2. I didn’t install this package on my system linux mint 19.3.
Many thanks for the help and suggestions from the members of the community.

Just to let you know.
After re-install Linux Mint 20, everything works like a charm. :grinning: