Support / Guides / Ud mobile

Geofencing

Beta geofencing added to UD Mobile for iOS in version 1.0.22 and Android version 1.0.30.

Video Examples

https://www.youtube.com/watch?v=Xw3tXbSo97E

Permissions iOS

UD Mobile requires ALWAYS location permission or iOS will not allow the app to run geofencing functions when the app is not in the foreground. If ALWAYS Location permission was not allowed or another selection was made users must enable these settings manually in iOS Settings > UD Mobile > Location.

iOS may ask the user to verify they want the app to recieve background location updates after a few days. The user must accept this or Geofencing will not work.

File:IOS UDM Used Background Location.jpeg

Permissions Android

UD Mobile requires ALLOW ALL THE TIME location permission or Android will not allow the app to run geofencing functions when the app is not in the foreground. If ALLOW ALL THE TIME Location permission was not allowed or another selection was made users must enable these settings manually in Android Settings > Location > UD Mobile. Note the location of this setting may be different depending on Android version and Manufacturer.

UD Mobile may require that Battery has "Allow background usage" (Enable for real-time updates, disable to save battery). Check this setting in Android Settings > Apps > UD Mobile > App Battery Usage > Allow background usage. Note the location of this setting may be different depending on Android version and Manufacturer.

Geofences

Geofences are located in UD Mobile > Settings-Tab > Geofencing.

Add Geofence

From the Geofences screen select the "+" button at the top of the screen.

Modify Geofence

Click the map to modify the geofence location and radius. Minimum radius is 200 meters, Maximum radius is determined by the device hardware.

Enter Commands

Add a new Enter command by clicking the "ADD" button next to the Enter Commands Header.

Exit Commands

Add a new Exit command by clicking the "ADD" button next to the Exit Commands Header.

Backups iOS

Geofence locations are saved in app backups but the enabled status is not. If a backup is imported onto another device then the geofence may need to be enabled if a geofence of the same name was not enabled before backup import. Any geofences enabled before import which do not have the same name as imported geofences will be automatically created when opening the Geofence settings in the app. If geofence radius or center coordinate is different from the imported backup then the location may not be changed until the geofence is re-saved or disabled then re-enabled.

If the geofence commands on enter or exit will be different on different devices then name them differently and create all on the device where the backup will be exported. Then enable/disable as needed after import. Enabled status should persist if the geofence name is the same after import.

Backups Android

Android system does not allow apps to view existing Geofences, so enabled status is saved in the apps backup file. After import please reboot Android device. If Android device is not rebooted then old Geofence data may still exist and enabled Geofences may not actually be enabled.

UD Mobile Location Services

Android Only.

Geofencing provided by Google Play Services is broken and acknowledged by Google. Play Services Geofencing will not trigger Geofences until an App or Operating System request an update to location using Play Services APIs. If no apps are running which request location, your Geofences will not trigger. To get around this issue UD Mobile on Android implements a optional Location Foreground Service.

UD Mobile Location Services are services to assist with Geofencing and will consume battery. UD Mobile Location Services are NOT required for Geofencing however Android may not update your geofences until another app or the Android system requests location. If you are in your vehicle with Android-Auto/Google-Maps running then UD Mobile Location Services should not be required as these types of apps will update the Android System Location. UD Mobile Location Services will run in the foreground and will be shown as actively running in Notifications and Android Settings.

Polling interval for UD Mobile Location Services can be updated manually or by any Geofence Enter/Exit commands. This will allow users to set larger Geofences to increase polling interval as the user gets closer to a desired smaller radius Geofence and decrease polling interval as they get farther from desired smaller radius Geofence.

Polling intervals:

  • Negative Number - When Polling Interval is a negative number UD Mobile will only request location when the mobile device connects or disconnects from WiFi. Currently the App waits 2 minutes after WiFi disconnect before checking location. Location is checked immediately after WiFi connection. This setting consumes the least amount of battery but geofences may be missed.

  • Zero - When Polling Interval is set to Zero UD Mobile is in continuous location monitoring mode. Location will be updated every minute or when the device moves 50 meters. This setting consumes the most battery and should only be used for short periods.

  • Positive Number - When Polling Interval is set to a positive number UD Mobile will request location at the specified interval and whenever the mobile device connects or disconnects from WiFi. Currently the App waits 2 minutes after WiFi disconnect before checking location. The higher the polling interval the less battery consumed.

Geofence Logs

UD Mobile keeps a limited amount of Geofencing log. Access logs from the Geofence Screen (screen which shows your list of Geofences) click the Document button at the top of the screen to view Geofence Logs. Logs include UDM Location Services logs.

Occupancy v2.0 Node Server

The Occupancy V2.0 Node Server is no longer required when using UD Mobile as UD Mobile will issue direct commands to your controller on Geofence crossings. However the Occupancy v2.0 Node Server may help tracking occupancy if there are multiple users at a location.

Setup

Notes: Occupancy V2.0 Node Server requires ISY/Polisy/eisy UUID is linked to a portal account with a valid license (remote access license)

Go to your Portal Account the press "Select tool" next to the UUID of your system. Go to Occupancy Node Server > Configuration. Press Configure Connection > Yes. Press Upload Node Definitions, this will reboot your system so please be on site before doing this operation. Also note that reboot may take some time if there are any pending updates which required reboot. Wait for the system to come back on line on portal, there should be a Green dot next to the systems UUID, Gray is not connected.

After System is connected to Portal, verify the Occupancy Node Server Configuration by going to "Select tool" > Occupancy Node Server > Configuration. The "Node Server Connection" and "Node Definitions" should be configured.

Troubleshooting Tip: If Node Definitions remain "Not Installed" after system is back online, then try removing (Remove button) the connection, then "Configure Connection" and "Upload Node Definitions" again.

Go to "Select Tool" > Occupancy v2.0. Click Add Geofence, in this example I use "Home Geofence", then save. Now go to the Mobile Devices tab > Add Mobile Device. In this example I've added 2 devices "Dad" and "Mom". Click the Geofences Tab then click Assign Mobile Devices. Select the Geofence (i.e Home Geofence) and the Mobile Device (i.e. "Dad") then save. Do the same for the other Devices (i.e. "Mom").

Your setup should now look similar to the following:

Finally press Synchronize > Yes.

Open the Admin Console (restart if left open during this process) and you should see the Geofence with grouped Devices in the Node Tree. Note that these nodes may be grouped in the root directory which may need to be expanded, i.e. click the right chevron ">" one the left side of the system (IoX) which will show root nodes.

The Parent Node (i.e. Home Geofence) will show the grouped status for all devices. On initial install the Occupied Status for the Device (Dad/Mom) is empty, so set the current occupied status by pressing the "On"/"OFF" buttons for the Device (Dad/Mom). You should now see the Parent (i.e Home Geofence) Occupied Status is only equal to False when both Devices (Dad/Mom) have Occupied Status equal to false. The Parent Node (i.e Home Geofence) can now be used in programs.

If using UD Mobile please synchronize or the app will not be aware of the new Nodes. Then go to your Geofence and set the commands to trigger the Device (Dad or Mom) depending on who carries the device.

Forum Posts for similar request:

https://forum.universal-devices.com/topic/41776-network-resource-for-occupancy-nodeserver/

https://forum.universal-devices.com/topic/42592-how-to-add-spouses-location-into-my-geofence/#comment-376436