I use the Openhab Beta on my mobile phone to access my Raspi with Openhab 2.10. Local address and remote access are set up and working. For presence detection, I use the event-based sending of the WLAN name to the server through the app. It actually always works when entering the WiFi. However, when leaving the WiFi it only works in 3 out of 10 cases. The error message appears in the app:
1 item could not be updated.
Update of item xxx
failed http code 500
If I had to guess, and to elaborate on what rossko57 was trying to get across with his question, at the time that the app sees you have left the WiFi network it is in the process of switching over from WiFi to cellular data and not yet connected to any network. Consequently the app can’t reach either your OH server nor your myopenhab.org (or how ever you have remote access configured).
I imagine this could be fixed with just a slight delay or a retry but I bet either will require changes to the app.
But, this is all just based on the behavior. In point of fact, if the 500 error code is accurate, everything I just said above is bunk. You wouldn’t get an “Internal server error” if the app can’t connect. Though there could be a timing issue with trying to post an update before the app is done authenticating or the like.
For the most part the REST API is unchanged so the app works just fine. Most of the updates to the app were made to support MainUI.
Actually there’re no changes in the REST API that is used by the app from openHAB 2 to 3. When new features are implemented there, the REST API version is bumped so the app can work with both versions.
The app always retries such background item updates, in case of the wifi name up to 10 times.
The log of the app would help here, but if I had to guess I’d say it’s just a timeout. The http library returns 500 is this case.