Page 2 of 20

Re: Geofence for Domoticz

Posted: Sunday 17 May 2015 11:24
by IanDury
It also depends on the phone / GPS radio accuracy. My SGS5 almost never gives false zone results even with a radius of 150 meters. My wife's SGS4Mini needs at least a radius of 500 meter to give acceptable results. Looking at Google's location history I see that her location itself is pretty correct but there is a large circle (radius ~500m) drawn around it that shows the possible inaccuracy. Is this something that can be improved (ignoring the circle and just use the centre) with the Google location API?

N.B. I also tried EgiGeoZone but got similar results. To improve the presence detection at home I combined it with an ip scan. Only if both Domofence and a ping show the same result the status will change.

Re: Geofence for Domoticz

Posted: Monday 18 May 2015 14:31
by RoadXY
tlpeter wrote:I have it set to a 100 metres.
What you say about gsm could be the problem.
Because of maintenance I have very little gsm reach at the moment and most of the time I am unreachable.
If you have Google Now enabled, you could look at your Google location history and see if you can see the glitch there also.
My guess is, it is...

https://maps.google.com/locationhistory/b/0

Re: Geofence for Domoticz

Posted: Monday 25 May 2015 23:29
by phred91
The instructions say to "open a port on your router". Which port? I've tried a bunch but each time I get "connection refused". Not by the router, but by the Raspberry Pi that is running Domoticz. How is the port number tied to the Dummy Switch?

Re: Geofence for Domoticz

Posted: Tuesday 26 May 2015 0:45
by pvm
phred91 wrote:The instructions say to "open a port on your router". Which port? I've tried a bunch but each time I get "connection refused". Not by the router, but by the Raspberry Pi that is running Domoticz. How is the port number tied to the Dummy Switch?
The outside port does not matter, choose an unused one (for example 5454), preferably not 8080 (used inside your network for domoticz). This makes it a little harder to hack into your system because it is not one of the default ports used.
Configure your router to allow this port and forward it to 8080 on your PI

Re: Geofence for Domoticz

Posted: Thursday 02 July 2015 19:11
by joostvanderlinde
Can it be that Domofence only detects enter/leave events when there is an actual internet connection available. Ie. when my son (who does not have a mobile internet bundle and resides fully on 'free wifi') leaves the house, by the time he passes the fence probably will not have an active internet connection. When the connection is re-established (eg. when passing a wifi-spot when he is on his bike) I kindof expected the fence-pass event is send.
I am not sure if this is the case.
When testing the event of moving out appears to be registered, but the moving in appears not to be registered.
Is this something I need to fine-tune, or would this need some coding in the app?

Re: Geofence for Domoticz

Posted: Wednesday 08 July 2015 22:05
by Appesteijn
joostvanderlinde wrote:Can it be that Domofence only detects enter/leave events when there is an actual internet connection available. Ie. when my son (who does not have a mobile internet bundle and resides fully on 'free wifi') leaves the house, by the time he passes the fence probably will not have an active internet connection. When the connection is re-established (eg. when passing a wifi-spot when he is on his bike) I kindof expected the fence-pass event is send.
I am not sure if this is the case.
When testing the event of moving out appears to be registered, but the moving in appears not to be registered.
Is this something I need to fine-tune, or would this need some coding in the app?
At the moment that you cross the geofence boundary a http request is directly done and in your case probably times out in the background. What he could do to test this is use the 'test' button once he is out of wifi range and see what happens, if I'm not mistaken it will give a URL not found error in 4 seconds.
I don't think you can set the geofence so small so that your son still has wifi when he leaves, you could try to set the geofence at a range where he does have internet connectivity, but that might take a lot of tweaking.

Android has a callback for internet connectivity, so it should be possible to listen for it and then send the last status change. I might have a look at this next week (I'm on vacation now :) )

Re: Geofence for Domoticz

Posted: Saturday 18 July 2015 11:51
by Appesteijn
I just released a new version to the play store.
When you cross the geofence and you aren't online the call to your server gets saved and is send when your phone gets online. It sends the latest state so crossing the geofence multiple times while offline, should work ok. If your phone is online, the message is send to your server directly.

Re: Geofence for Domoticz

Posted: Tuesday 28 July 2015 17:43
by brandie21474
Error
Error
Screenshot_2015-07-28-17-53-05.png (240.58 KiB) Viewed 5421 times
I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?

Re: Geofence for Domoticz

Posted: Tuesday 28 July 2015 18:02
by Appesteijn
brandie21474 wrote:
Screenshot_2015-07-28-17-53-05.png
I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
When do you get this error, when crossing the geofence or when you test it?

Possible errors I can think of:
- Temporary network error, so the message can't be send
- Slow network so time-out occurs (time out is set to 3 seconds)
- Username/password error (but then the test shouldn't work, but maybe you accidentally changed it?)

Re: Geofence for Domoticz

Posted: Thursday 30 July 2015 17:52
by brandie21474
Appesteijn wrote:
brandie21474 wrote:
Screenshot_2015-07-28-17-53-05.png
I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
When do you get this error, when crossing the geofence or when you test it?

Possible errors I can think of:
- Temporary network error, so the message can't be send
- Slow network so time-out occurs (time out is set to 3 seconds)
- Username/password error (but then the test shouldn't work, but maybe you accidentally changed it?)
I get it while testing. Immediately after pushing the button. In my opinion it's none of the possibilities mentioned above. I get it at home and beyond the geofence border

Re: Geofence for Domoticz

Posted: Thursday 30 July 2015 20:43
by Appesteijn
brandie21474 wrote:
Appesteijn wrote:
brandie21474 wrote:
Screenshot_2015-07-28-17-53-05.png
I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
When do you get this error, when crossing the geofence or when you test it?

Possible errors I can think of:
- Temporary network error, so the message can't be send
- Slow network so time-out occurs (time out is set to 3 seconds)
- Username/password error (but then the test shouldn't work, but maybe you accidentally changed it?)
I get it while testing. Immediately after pushing the button. In my opinion it's none of the possibilities mentioned above. I get it at home and beyond the geofence border
Could you try if opening the url in your browser? If you get the 'OK' message there, reinstalling the app might work.

Re: Geofence for Domoticz

Posted: Sunday 02 August 2015 22:01
by brandie21474
I reinstalled the app. It works. Thx

Re: Geofence for Domoticz

Posted: Wednesday 16 September 2015 13:47
by markk
Hi. The app works well for me. Just wondered, Is there an option to use this if you haven't set up a username and password in Domoticz? It appears these fields are mandetory.

Re: Geofence for Domoticz

Posted: Wednesday 16 September 2015 22:11
by Plaagje
I got the error too after testing.... forgot to put authentication on "basic-auth" :roll:

Re: Geofence for Domoticz

Posted: Thursday 17 September 2015 13:21
by Appesteijn
markk wrote:Hi. The app works well for me. Just wondered, Is there an option to use this if you haven't set up a username and password in Domoticz? It appears these fields are mandatory.
Hmm, I'm not sure if I should implement this. As crossing the geofence will (besides of the people living in castles) be outside of your home, you will have to access your Domoticz-server from the internet. If you setup your Domoticz server to be accessible for everyone from the interwebz this might be a big security risk.

Or am I missing a use case here?

Re: Geofence for Domoticz

Posted: Thursday 17 September 2015 14:02
by markk
Has anyone else experience severe battery drain on their device whilst using this?

Re: Geofence for Domoticz

Posted: Friday 18 September 2015 22:48
by Appesteijn
markk wrote:Has anyone else experience severe battery drain on their device whilst using this?
On my own phone I didn't notice any battery drain. But it might depend on how big your geofence is (mine is 500 meters). If you come near the border of the geofence, your phone will start to measure more accurate and thus use more power. If you set a small radius (for example 20 meters) your phone will almost always measure very accurate and that might cost more battery.

Re: Geofence for Domoticz

Posted: Saturday 19 September 2015 1:05
by markk
Appesteijn wrote:
markk wrote:Has anyone else experience severe battery drain on their device whilst using this?
On my own phone I didn't notice any battery drain. But it might depend on how big your geofence is (mine is 500 meters). If you come near the border of the geofence, your phone will start to measure more accurate and thus use more power. If you set a small radius (for example 20 meters) your phone will almost always measure very accurate and that might cost more battery.
Thanks for your reply. my wife has a new android phone which is draining battery so the reason is a bit of trial and error at the moment. I've now disabled the domofence app and have started using the ping method. This didn't work well on IOS as iPhones disconnect from wifi when not in use. seems to be working ok on he android though.

Re: Geofence for Domoticz

Posted: Wednesday 23 September 2015 11:06
by thaui
Thank you for this great app. It works fine after I switched to Basic-Auth. I have tried a lot of things before but this time I was succesful very fast and it worked just out of the box. I am using the app from my phone via a VPN connection directly to my ASUS router. Save and comfortable. Curently it seems only possible to switch on and off an IDX. How about using the app to change the status of the secpanel? arm/disarm/status?
I believe there are many users out there looking for this kind of functionality not using a virtual switch. Pls. think about and keep on going. :)

Re: Geofence for Domoticz

Posted: Thursday 24 September 2015 7:39
by Appesteijn
Thank you, it is nice to hear you like it! I don't have any experience with a securtiy panel, but I'll have a look at it.