Connection Issues With Owntracks, Orbot, and Android N (Nougat) - Solved?

I’m not sure where else to post this so I’m putting it here in the hopes that it helps someone else out down the line or aids me in fixing my configuration if something is broken.

I have the following setup on my Google Pixel (Android N) phone:
Owntracks -> Orbot App VPN -> Orbot -> MQTT

This is all working when I set it all up and messages were propagating HASS properly after starting the different apps. However, I noticed that when I was checking back a while later the endpoint state was showing as “Data connection not available” and the Endpoint state message was “Not available” and HASS wasn’t getting position updates.

I eventually ended up playing with the Doze settings in Android N and that seems to be the culprit. Once I excluded Orbot and Owntracks from optimization, I haven’t been seeing the problems any more and background updates seem to be working as expected.

Which version of Owntracks do you use?

Version 1.1.6 from the Google Play Store.

You need to switch back to 1.1.4. 1.1.6 has a bug. After some time mqtt lib lose connection to server. If you restart mqtt configuration in app it will immediately report your location.

That’s interesting. Any insight into why changing the Doze behaviour also seems to resolve the issue?

Oh, just one more thought to clarify. I did come across a bunch of other posts regarding connection issues with Owntracks and MQTT but I couldn’t find any that had the specific error messages from my original post.