GeoFence

From Domoticz
Revision as of 09:20, 10 April 2024 by Walter vl (talk | contribs) (Deprecated)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

GeoFence is a basic app to create a geofence and communicate your phones presence to a Domoticz server (which should be made accessible from the internet!)

Google Play download (DEPRECATED!!!)

For alternatives see forum topic: https://www.domoticz.com/forum/viewtopic.php?t=6099&start=360


When you enter or leave your geofence this app calls a URL on your Domoticz server so you can flip a virtual switch. Entering sends a 'On' and leaving sends a 'Off'

Setup:

On your Domoticz server:

Create a virtual switch that GeoFence will trigger

  1. Go to 'Setup -> Hardware' and add a 'Dummy device'
  2. Go to 'Switches' and add a 'Manual light/switch'
  3. Select the right 'Hardware' and 'On/Off' the rest doesn't matter.
  4. Add the device
  5. Now go to 'Setup -> Devices' and note the 'Idx' of the switch you just created.

Secure your Domoticz server with a username and password

  1. Go to 'Setup -> Settings'
  2. At 'Website protection' fill in a username, password and select 'Basic-Auth'
  3. Now Save your settings

Open a port on your router and pass it to your internal domoticz server (usually through NAT)

  1. Check instructions on Wiki page Configuration#Remote Access
  2. Test the connection to your Domoticz server by using the button on the bottom right of the app.


You can use http://www.latlong.net/ to get the coordinates for the center of your geofence. I use a radius of 100 meters myself, but it is also possible to make the geofence smaller. Because of the errors on gps and location services, setting the radius too small (e.g. 10 meters) might give false 'enter' and 'leaves'. This depends on your environment, so you should experiment a little to find the optimal setting.