Geofence for Domoticz
Moderator: leecollings
-
- Posts: 19
- Joined: Thursday 03 March 2016 18:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Closed by peer
When i set things up using http the app works but when i try to use https i get a error connect closed by peer.
Checking the cert using chrome on a win machine it tells me its secure.
The dz log is not reporting faild logins.
Anyone any idea what is going wrong
Checking the cert using chrome on a win machine it tells me its secure.
The dz log is not reporting faild logins.
Anyone any idea what is going wrong
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
I have just put a version in beta that should work correctly on Android 8+. As I don't have an Android 8+ phone, please let me know if it works, thank you!
-
- Posts: 5
- Joined: Sunday 25 March 2018 21:17
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Thanks appesteijn the app work like a sharm on my and my wife's galaxy s8 wit android 8 thanks again for your work 

Verstuurd vanaf mijn SM-G955F met Tapatalk


Verstuurd vanaf mijn SM-G955F met Tapatalk
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Good to hear!
-
- Posts: 6
- Joined: Wednesday 24 October 2018 14:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9700
- Contact:
Re: Geofence for Domoticz
Hi,
Installed Domofence (on a Nokia 7 plus with Android 9). The virtual switch can be toggled bij Domofence by using the testing button in Domofence. So far so good. But when testing (walk in and out the geofence with my phone) nothing is happening. In my case the lamp outside my house has to switch on. After unlocking my phone the lamp is switched on immediately. So I set Domofence not te be controlled by the battery saving from Android and also that it can always use the data. So far no improvement. What can I do to make it work? Any ideas?
Edit: found that something is happening. When I switch notifications on, i find that entering or leaving the fence is noticed by the app, so I think a command is send to Domoticz. Next thing I noticed is that the virtual switch is toggled after ten minutes or something.
Installed Domofence (on a Nokia 7 plus with Android 9). The virtual switch can be toggled bij Domofence by using the testing button in Domofence. So far so good. But when testing (walk in and out the geofence with my phone) nothing is happening. In my case the lamp outside my house has to switch on. After unlocking my phone the lamp is switched on immediately. So I set Domofence not te be controlled by the battery saving from Android and also that it can always use the data. So far no improvement. What can I do to make it work? Any ideas?
Edit: found that something is happening. When I switch notifications on, i find that entering or leaving the fence is noticed by the app, so I think a command is send to Domoticz. Next thing I noticed is that the virtual switch is toggled after ten minutes or something.
-
- Posts: 132
- Joined: Tuesday 20 October 2015 12:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Geofence for Domoticz
Is it possible to add multiple geofences?
Or is the only possibility the Domoticz app itself which costs 7.50?
Or is the only possibility the Domoticz app itself which costs 7.50?
-
- Posts: 230
- Joined: Friday 03 April 2015 20:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany (near dutch border)
- Contact:
Re: Geofence for Domoticz
Try egigeofence from the appstore.. its free and works.
Alternatively you can use locative.. also free and works too.
Cheers, Hans
Alternatively you can use locative.. also free and works too.
Cheers, Hans
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Geofence for Domoticz
Since a couple of days i installed DomoFence beta on three phones (mine, wife and daughter)
What i have noticed:
Samsung S7 Android 8: Is working but not always
Samsung j5 Android 8.1: Only ON trigger works
HTC m9 Android 7 not fully tested yet
But leaving the fence my phone DomoFence detects and sends the http request
But leaving the fence with my wife here phone doesn't detect or doesn't/can't send the http request
When we came home my phone sended a On request instant while my wife here phone after a couple of hours still didn't
Don't know if it's the Android Background running policy or something else.
But apps are setup the same.
Running my own VPN with PiVPN and running openvpn on all phones.
And DomoFence there for connects to the local network IP no matter where we are in the world.
Second thing i noticed the DomoFence app doesn't check the current dummy device status, right.
If i test the connection the ON request is send and the dummy is changed to ON while it was ON same counts for leaving and entering the Fence fiscally.
Wouldn't it be better to check status before sending a request?
Same as for a missed request to let the app wake up phone with a by user or fixed wakelock to check the fence and switch the dummy?
What i have noticed:
Samsung S7 Android 8: Is working but not always
Samsung j5 Android 8.1: Only ON trigger works
HTC m9 Android 7 not fully tested yet
But leaving the fence my phone DomoFence detects and sends the http request
But leaving the fence with my wife here phone doesn't detect or doesn't/can't send the http request
When we came home my phone sended a On request instant while my wife here phone after a couple of hours still didn't
Don't know if it's the Android Background running policy or something else.
But apps are setup the same.
Running my own VPN with PiVPN and running openvpn on all phones.
And DomoFence there for connects to the local network IP no matter where we are in the world.

Second thing i noticed the DomoFence app doesn't check the current dummy device status, right.
If i test the connection the ON request is send and the dummy is changed to ON while it was ON same counts for leaving and entering the Fence fiscally.
Wouldn't it be better to check status before sending a request?
Same as for a missed request to let the app wake up phone with a by user or fixed wakelock to check the fence and switch the dummy?
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Could you try without the vpn? Just to rule out the possibility that the VPN messes up the call. The http request is scheduled to also have a data connection available, maybe in combination with the VPN this doesn't work always?
Is it possible to check power-saving options or location options for the app specifically?
How large is you radius? I have 1500 meters and that is usually enough to get it triggered before I'm home.
It is correct that the app doesn't check the current status, but just fires a ON or a OFF when entering/leaving.
Is it possible to check power-saving options or location options for the app specifically?
How large is you radius? I have 1500 meters and that is usually enough to get it triggered before I'm home.
It is correct that the app doesn't check the current status, but just fires a ON or a OFF when entering/leaving.
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Geofence for Domoticz
Yesterday I tried with and without a VPN connection and all phone set to 800m as further away isn't possible.
Then my phone will be home while I'm at work.
No phone in my house reacts like it should do.
Could be a android issue due to its background policy.
But not sure but it's for sure my VPN ain't the culprit.
At the moment testing with Tasker for which I wrote a profile.
Although I hate tasker due to its battery consumption it does the job well at a radius of 200mtr.
And set net check at 5min which is normally 60seconds.
Then my phone will be home while I'm at work.
No phone in my house reacts like it should do.
Could be a android issue due to its background policy.
But not sure but it's for sure my VPN ain't the culprit.
At the moment testing with Tasker for which I wrote a profile.
Although I hate tasker due to its battery consumption it does the job well at a radius of 200mtr.
And set net check at 5min which is normally 60seconds.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 69
- Joined: Saturday 19 November 2016 17:02
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
In case it may help... I had a similar issue, my phone worked correctly, my wife's worked when at home but not when out of home. After a lot of investigation, it turned out to be a "%" character in the domoticz password, in conjunction with authentication set to be only required when connected from an external ip. Once I removed that character, everything started to work properly.
Why was this character illegal in one phone and not in the other? No idea. But turned me crazy for months.
Why was this character illegal in one phone and not in the other? No idea. But turned me crazy for months.
-
- Posts: 69
- Joined: Saturday 19 November 2016 17:02
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
By the way - personally I would leave the present setup that on and off fence notifications are always sent whichever the current status of the switch is. This allows Domoticz to record the time of each change in case it's needed. At most, I would recommend leaving this as an option.
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Geofence for Domoticz
Thx for the tip but my password doesn't contain any upper characters.manutremo wrote: ↑Tuesday 08 January 2019 14:52 In case it may help... I had a similar issue, my phone worked correctly, my wife's worked when at home but not when out of home. After a lot of investigation, it turned out to be a "%" character in the domoticz password, in conjunction with authentication set to be only required when connected from an external ip. Once I removed that character, everything started to work properly.
Why was this character illegal in one phone and not in the other? No idea. But turned me crazy for months.
Just plain characters met some in tab.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Some investigation steps I thought of:Siewert308SW wrote: ↑Tuesday 08 January 2019 19:04 Thx for the tip but my password doesn't contain any upper characters.
Just plain characters met some in tab.
- You could check the domoticz logs to see if the requests reaches the domoticz server?
- If your wife is outside of the geofence, does the test button send a OFF command? If not Domofence still thinks your inside of the geofence. The status of the test button should also change when in- or outside of the geofence.
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Geofence for Domoticz
Test button outside the geofence with connection via a VPN or not via VPN does work...Appesteijn wrote: ↑Wednesday 09 January 2019 7:33Some investigation steps I thought of:Siewert308SW wrote: ↑Tuesday 08 January 2019 19:04 Thx for the tip but my password doesn't contain any upper characters.
Just plain characters met some in tab.
- You could check the domoticz logs to see if the requests reaches the domoticz server?
- If your wife is outside of the geofence, does the test button send a OFF command? If not Domofence still thinks your inside of the geofence. The status of the test button should also change when in- or outside of the geofence.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
What is the response you get in domofence? Do you use https?Siewert308SW wrote: ↑Wednesday 09 January 2019 7:37 Test button outside the geofence with connection via a VPN or not via VPN does work...
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Geofence for Domoticz
Don't use https and response is as expected when pressing the test button.Appesteijn wrote: ↑Wednesday 09 January 2019 9:13What is the response you get in domofence? Do you use https?Siewert308SW wrote: ↑Wednesday 09 January 2019 7:37 Test button outside the geofence with connection via a VPN or not via VPN does work...
On when inside the fence and Off when outside the fence.
But would this point to the culprit as the screen/device is awake with the app running in the foreground
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Hmm at least domofence than correctly thinks you are in/outside of the geofence. If you had domofence in the background while crossing the geofence that looks like it works correctly, maybe android terminates it when it is in the background for a longer time. To see that you should check the app if you cross the geofence but the switch is not switched. If the test button is ON/OFF correctly the app has gotten the correct status from Android, but sending the http request has failed somewhere.Siewert308SW wrote: ↑Wednesday 09 January 2019 19:49Don't use https and response is as expected when pressing the test button.Appesteijn wrote: ↑Wednesday 09 January 2019 9:13What is the response you get in domofence? Do you use https?Siewert308SW wrote: ↑Wednesday 09 January 2019 7:37 Test button outside the geofence with connection via a VPN or not via VPN does work...
On when inside the fence and Off when outside the fence.
But would this point to the culprit as the screen/device is awake with the app running in the foreground
Who is online
Users browsing this forum: No registered users and 0 guests