Page 15 of 20
Re: Geofence for Domoticz
Posted: Monday 13 November 2017 15:55
by deennoo
Appesteijn wrote:CreatoX wrote: ↑Saturday 11 November 2017 15:39
Mobile: Samsung Galaxy A5
Android version: 7.0
Domofence version: 2.9.0
Geofence radius: 500
Anyone who can help me with the following issue:
When entering the geofence, nothing happens. Using a fake gps program, it switches on or off instantly.
But, when using the build in gps, nothing happens. Even started Google Maps, showing my phone is at home, it does not trigger Domofence to update the switch.
What if you set the radius to 1500 ?
Problème is that app doesn't run gps, as can do waze or maps...i'm using geofence to open garage door when i'm on a gps point near home. I need à small radius (50m)
Envoyé de mon MI 6 en utilisant Tapatalk
Re: Geofence for Domoticz
Posted: Tuesday 14 November 2017 7:41
by Appesteijn
deennoo wrote: ↑Monday 13 November 2017 15:55
Appesteijn wrote:CreatoX wrote: ↑Saturday 11 November 2017 15:39
Mobile: Samsung Galaxy A5
Android version: 7.0
Domofence version: 2.9.0
Geofence radius: 500
Anyone who can help me with the following issue:
When entering the geofence, nothing happens. Using a fake gps program, it switches on or off instantly.
But, when using the build in gps, nothing happens. Even started Google Maps, showing my phone is at home, it does not trigger Domofence to update the switch.
What if you set the radius to 1500 ?
Problème is that app doesn't run gps, as can do waze or maps...i'm using geofence to open garage door when i'm on a gps point near home. I need à small radius (50m)
Envoyé de mon MI 6 en utilisant Tapatalk
But with the large radius, you could see if the geofence functionality works or not. Maybe your phone can't get a accurate fix where you live (without using a lot of power/gps)
Re: Geofence for Domoticz
Posted: Tuesday 14 November 2017 7:44
by CreatoX
Setting the radius to 1500 does not matter.
I must say domofence is working when leaving the geofence location. So the (virtual) switch is turned off. But when entering the geofence it never turns on.
Did not test it when running waze ore maps when entering the geofence. Maybe this is working, I will test it, but when this works, this is not how I want to use it.
Thereby, when I'm at home (center of the geofence) and the switch is off, opening Google Maps showing my location based on GPS, then the switch still stays off. Also Google location history is working fine.
Can it be Domofence is going in some sort of stanby/sleep modus when the phone is not used for some time? If so, how should this be set? How can I keep domofence 'awake' all the time?
Re: Geofence for Domoticz
Posted: Tuesday 14 November 2017 8:50
by deennoo
CreatoX wrote: ↑Tuesday 14 November 2017 7:44
Setting the radius to 1500 does not matter.
I must say domofence is working when
leaving the geofence location. So the (virtual) switch is turned off. But when entering the geofence it never turns on.
Same for me, can be good if we can have some app log to check what happen
There is my virtual switch log :

- geofence.PNG (38.68 KiB) Viewed 5307 times
probleme is the same for domoticz android app and domofence, using api can be good when user is walking or riding a bike, but when driving a car or a mortorcycle, it doesn't look to be quicker as it have to
Re: Geofence for Domoticz
Posted: Wednesday 15 November 2017 13:35
by CreatoX
deennoo wrote: ↑Tuesday 14 November 2017 8:50
CreatoX wrote: ↑Tuesday 14 November 2017 7:44
Setting the radius to 1500 does not matter.
I must say domofence is working when
leaving the geofence location. So the (virtual) switch is turned off. But when entering the geofence it never turns on.
Same for me, can be good if we can have some app log to check what happen
There is my virtual switch log :
geofence.PNG
probleme is the same for domoticz android app and domofence, using api can be good when user is walking or riding a bike, but when driving a car or a mortorcycle, it doesn't look to be quicker as it have to
Because of all testing my log does not represent a good overview. I cleared the log and shall put te results in a couple of days.
I also got an old mobile with android 5.0.2. I shall install Domofence on this device also. Maybe we can figure out if it has something to do with the Android version.
Re: Geofence for Domoticz
Posted: Wednesday 15 November 2017 13:45
by deennoo
CreatoX wrote:deennoo wrote: ↑Tuesday 14 November 2017 8:50
CreatoX wrote: ↑Tuesday 14 November 2017 7:44
Setting the radius to 1500 does not matter.
I must say domofence is working when
leaving the geofence location. So the (virtual) switch is turned off. But when entering the geofence it never turns on.
Same for me, can be good if we can have some app log to check what happen
There is my virtual switch log :
geofence.PNG
probleme is the same for domoticz android app and domofence, using api can be good when user is walking or riding a bike, but when driving a car or a mortorcycle, it doesn't look to be quicker as it have to
Because of all testing my log does not represent a good overview. I cleared the log and shall put te results in a couple of days.
I also got an old mobile with android 5.0.2. I shall install Domofence on this device also. Maybe we can figure out if it has something to do with the Android version.
I'm running Android 7, à good option can be to set multiple geofence, and allow to choose between API or gps
Re: Geofence for Domoticz
Posted: Wednesday 15 November 2017 22:29
by Appesteijn
I did just released a new beta version that uses new libraries. Maybe you could add yourself to this beta (in the Play store)?
Re: Geofence for Domoticz
Posted: Saturday 18 November 2017 19:49
by CreatoX
After a couple of days, and not opening the Domofence App, nothing has been logged. Om my other phone (Android 5) it works like a charm.
There must be something in the new Android versions and I found this:
https://android.gadgethacks.com/how-to/ ... s-0168960/
It has something to do with Doze and App Standby. I just configured this and hope this is given me the expected results. Keep you updated.
Re: Geofence for Domoticz
Posted: Sunday 19 November 2017 8:01
by Appesteijn
Thanks! There were some changes in Android 7.0 that were fixed with the 2.9.0 version of DomoFence. But if I read your link Dozing is for more 'agressive'.
Please keep us posted on your results!
Re: Geofence for Domoticz
Posted: Wednesday 29 November 2017 19:12
by dizzyweb
Updated my OnePlus 3 to Android Oreo a few days... and Domofence stopped working.
I do get an error every reboot:
"Unknown Error: the Geofence service is not available now. 0"
Re: Geofence for Domoticz
Posted: Thursday 30 November 2017 7:50
by Appesteijn
And what happens when you manually add the geofence after a few minutes?
Re: Geofence for Domoticz
Posted: Wednesday 06 December 2017 9:39
by dizzyweb
Doesn't work. But, the connection test option doesn't work either, it is always set to OFF. It does toggle the dummy off when it's on though, but it never switches to "Test connection (ON)".
However, the geofence bit simply doesn't work. I'm using the domoticz app now, but that simply less reliable. It keeps on switching on when I'm already in the fence (could be worse though, could be toggling it off and on like it used to).
Re: Geofence for Domoticz
Posted: Friday 08 December 2017 9:42
by jannl
Because results with the domoticz app regarding geofence are not so good, I am now trying domofence. However with the same settings as the app (ports, password etc) it does not work. Testing gives an error. I more than triple checked the settings.
I am using an s7 and android 7.0.
Jan
Re: Geofence for Domoticz
Posted: Saturday 09 December 2017 10:40
by Appesteijn
dizzyweb wrote: ↑Wednesday 06 December 2017 9:39
Doesn't work. But, the connection test option doesn't work either, it is always set to OFF. It does toggle the dummy off when it's on though, but it never switches to "Test connection (ON)".
However, the geofence bit simply doesn't work. I'm using the domoticz app now, but that simply less reliable. It keeps on switching on when I'm already in the fence (could be worse though, could be toggling it off and on like it used to).
The test button reflects if you are inside or outside the geofence (at least where your phone thinks it is). So if you can only press 'OFF', your phone thinks it is outside of the geofence.
jannl wrote: ↑Friday 08 December 2017 9:42
Because results with the domoticz app regarding geofence are not so good, I am now trying domofence. However with the same settings as the app (ports, password etc) it does not work. Testing gives an error. I more than triple checked the settings.
I am using an s7 and android 7.0.
Jan
Are you using 'Basic auth' ? What happens if you go to
Code: Select all
http://_your_server_ip:_port/json.htm?type=command¶m=switchlight&idx=_your_idx&switchcmd=On
in the browser on your phone?
Re: Geofence for Domoticz
Posted: Saturday 09 December 2017 14:51
by jannl
When I issue that command locally I get an error. Status ERR
Edit: according to the manual a command should be added. When I add for instance switchcmd=Toggle it works. So it seems to me something is wrong in the command
Re: Geofence for Domoticz
Posted: Saturday 09 December 2017 23:14
by Appesteijn
jannl wrote: ↑Saturday 09 December 2017 14:51
When I issue that command locally I get an error. Status ERR
Edit: according to the manual a command should be added. When I add for instance switchcmd=Toggle it works. So it seems to me something is wrong in the command
Forgot to add the last part:
Code: Select all
http(s)://_your_server_ip_:_port_/json.htm?type=command¶m=switchlight&idx=_your_idx_&switchcmd=_On_
This is what the app sends to you server. If you can use it in your browser from your phone, your phone can connect to domoticz and the app should also be able to send it.
Re: Geofence for Domoticz
Posted: Friday 15 December 2017 7:18
by jannl
I changed to basic auth and now it works.
Problem is, when I am in my car which has a wifi access point without internet access and I forget to turn of my phone's wifi, domofence sends the correct string but it never arrives at my Domoticz.
Isn't it possible to add some sort of check? For instance check in predefined intervals if the configured switch in the state according to the fence settings until it is verified the state of the switch is correct?
Re: Geofence for Domoticz
Posted: Friday 15 December 2017 22:01
by Appesteijn
jannl wrote: ↑Friday 15 December 2017 7:18
I changed to basic auth and now it works.
Problem is, when I am in my car which has a wifi access point without internet access and I forget to turn of my phone's wifi, domofence sends the correct string but it never arrives at my Domoticz.
Isn't it possible to add some sort of check? For instance check in predefined intervals if the configured switch in the state according to the fence settings until it is verified the state of the switch is correct?
The app already caches a geofence transition if there is no data connection available, I'll have a look if it is easy to check the response of a request. Data connections also cost battery so I want to avoid those.
Re: Geofence for Domoticz
Posted: Sunday 17 December 2017 10:40
by jannl
I understand. The in this is that the phone has a networkconnection, but accesspoint has no internetconnection.
So for me a optional setting to check regularly if the switch is in the correct state would be nice. Either on regular intervals or on increasing intervals, until the switch reaches the state it is supposed to have. Also a limit on the time could be wise.
Re: Geofence for Domoticz
Posted: Sunday 17 December 2017 11:08
by blauwebuis
Here's how I created privacy friendy geo-fencing:
- Installed an app on my phone that turns the wifi on or off depending on nearby cell towers.
- Check for phone presence on the network.
This works without any cloud service, and stops wifi tracking when out and about at the same time.