Raspberry Pi 3 Model B Rev 1.2
openHABian (latest image as of May 5, 2018)
Raspbian GNU/Linux 9 (stretch)
Linux 4.14.34-v7+
openHAB 2.2.0-1 (Release Build)
mqttitude 1 - 1.11.0
On an openHAB restart, the state of any mqttitude presence switches are unknown at best, unreliable at worst (if captured from the last persisted state).
The OwnTracks mobile app sends a region event only when a geofence transition occurs. If one does not cross a geofence boundary, there won’t be any event messages sent by the app in order to properly set the state of any configured presence switches.
However, the OwnTracks app will send location data periodically based on the mobile device location update characteristics (differences between Android & iOS noted). Nevertheless, location data updates do occur regardless of geofence transitions.
Has anybody used location data updates to “initialize” the state of any geofence presence switches?
I know that the Google Maps API provides the means to get distance and even travel duration (using current traffic conditions) between two points (e.g., the geofence focus and the current location). The former could be used to initialize or set a region “state” to determine presence. The latter to determine when to trigger actions (e.g., when I’m within three hours from home, set my Nest structure to Home, if currently set to Away). Has anybody used either of these in openHAB?
Regards.
Mike