I am working on Android project that utilises that Philips Hue SDK.
I've implemented some of the functionality so that I can successfully control the lights but I am also trying to make the app control the lights when the user is away from home.
I have set up port forwarding so that I can connect to my public IP address through port 80 and it forwards it to the bridge.
The idea is that the user connects to the bridge and authenticates with the bridge on its local ip addresss. The user is then able to enter what the external address is.
I have a function that when connecting to the bridge, I check to see if the user connected Wifi and are they on their own home wifi I then set the IP address of the PHAccessPoint of the users local bridge bridge address.
If the user is not on wifi, or they are but on the home wifi, then the PHAccessPoint IP address is updated to what the user entered as they're external address.
When I do this, I keep getting either Bridge not responding, not connected or bridge already connected and this keeps happening rapidly. Even though in the error handler, if I get bridge not responding or not connected, I ensure I disconnect the PHAccessPoint and attempt to re-connect again.
I've tried disabling the Heartbeat Interval or increasing it and it makes no difference.
If however I am on the wifi but still connect via my public IP address it works, I only get this problem if going through mobile data.
Are there any tricks to make this work I've seen other apps do something similar but its not open source so can't see how they've implemented it.
I have signed up to Philips Hue Remote API, but I've had no response from them.