So similar to other problems and more.
So, I had OH2.2 working well on my RPi2. Via raspi-config the hostname was set to “ExampleName1”.
And on my Fritz router, I also assigned the IP “X.X.X.X” to be assigned to “ExampleName1” too.
Everything was working fine.
Then, I put the same SD-card from RPi2 to my RPi3.
Everything worked as expected, no issues, except 2 new phenomena:
a) OpenHab Android App on 2 of my devices, gave me the SSL Handshake failed error.
If I ticked Ignore SSL hostname and Ignore SSL certificate, then I could connect, but it was bothering me.
I think if I used Clear User Data for the app, it would have worked.
Reference, Juice SSH was having the same problem. But JuiceSSH has a “clear all locally saved hostnames and keys” option.
Keep in mind, everything was finding my RPi3 as usual. All my IoT devices, MQTT, ESP8266 etc.
Using chrome to open http://ExampleName1:8080 still worked.
Anyway, being 2am, I went for a stupid solution. I changed the RPi3 hostname definition via Rapsi-Config, and via my router.
The IP X.X.X.X = ExampleName2.
I say it was stupid, because I had to change several lines of configuration files (mqtt.cfg, some html links, my ESP8266, etc).
I broke the concept of using hostnames (i.e. rather than using a hostname to not care about the IP).
Anyway, after changing to ExampleName2 - everything is working again.
Using chrome to open http://ExampleName2:8080 also worked.
But i noticed one more issue…
While outside of the house, I connected to my home VPN via my router.
When I do so, all SAMBA folders, Juice SSH, etc worked fine.
But Openhab Android App, could not find my OH2.
It kept saying, “Please check that openHAB is running or configure OpenHAB URL or remote URL”.
But this is weird, because using chrome to open http://ExampleName2:8080 also still works.
Next weird thing is, if I add the exact same URL (copied and pasted) to the remote address settings, it works fine.
So openhab Android app, is resolving hostnames in a unique way beyond Android OS’ way of resolving.
I.e. once it connects, it seems to save the IP = hostname somewhere (potentially also some security key based on the upper issue too).
Any ideas?
Of course, I can use the browser, but it negates the purpose of having an app.
I prefer the app due to the voice command options too.