I’ve been stumped on a networking issue. I have two devices on which the Android OpenHAB client connects just fine, and two devices where it just “spins” and is unable to connect. All devices are given a 10.20 private IP address, but the openhab server is inside a wifi router (another private LAN) that’s in a 192.168. The router is port forwarding correctly, and the app on all four devices is pointed to the router’s external IP address. So it looks like this:
Wifi Network for phone/tablets devices are in:
Within this network, a router w/ IP 10.20.22.103 and openhab server on private LAN inside this router:
Connections to 10.20.22.103:8080 are port forwarded to 192.168.1.7:8080
When all the phones/tablets are inside the 192.168, and pointed to server 192.168.1.7:8080, the openhab app works for all devices.
When the phones/tablets are outside of that 192.168 LAN, and use the 10.20.22.103:8080 URL, only two of the devices apps connect; the other two do not. For the tablets that don’t connect, I’ve tried putting the URL on both local and remote fields, either alone or both, so all combinations. And I’ve made sure all the settings are the same
App Setting “local” or “remote” URL:
- Nexus 6, running Android 7.0, Habdroid 188.8.131.52
- Moto E, running Android 5.1, Habdroid 184.108.40.206
- Samsung Tab, Android 4.4.2, Habdroid 220.127.116.11
- Samsung Tab, Android 5.1.1, Habdroid 18.104.22.168
I want to emphasize that if I just open up a browser and to go http://10.20.22.103:8080/openhab.app?sitemap=demo, that works on all four devices, even on the two devices where the mobile app has trouble connecting. Weird?
Is there something tricky to this? I’ve made sure the openhab settings on the non-connecting devices are exactly the same as the connected devices.