Geofence for Domoticz
Moderator: leecollings
-
- Posts: 47
- Joined: Wednesday 08 April 2015 15:22
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Geofence for Domoticz
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.
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.
- RoadXY
- Posts: 278
- Joined: Monday 07 April 2014 12:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2331
- Location: Near Gorinchem
- Contact:
Re: Geofence for Domoticz
If you have Google Now enabled, you could look at your Google location history and see if you can see the glitch there also.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.
My guess is, it is...
https://maps.google.com/locationhistory/b/0
-
- Posts: 8
- Joined: Tuesday 04 February 2014 9:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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?
-
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Geofence for Domoticz
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.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?
Configure your router to allow this port and forward it to 8080 on your PI
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
-
- Posts: 44
- Joined: Tuesday 23 June 2015 23:06
- Target OS: Linux
- Domoticz version: 2023.2
- Location: NL + SE
- Contact:
Re: Geofence for Domoticz
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?
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?
Domoticz on BPI-M2-Pro (compiled on Ubuntu 22.04) and RPI (binary on Raspian 10)
RFXCom, Sonoff Zigbee stick, eBusd Adapter 5, P1, S0, Husdata H60 integration
Zigbee2MQTT AD, MQTT local, AirconWithMe, Ebusd, VolvoRecharge, PSA Car Controller
RFXCom, Sonoff Zigbee stick, eBusd Adapter 5, P1, S0, Husdata H60 integration
Zigbee2MQTT AD, MQTT local, AirconWithMe, Ebusd, VolvoRecharge, PSA Car Controller
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.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?
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 )
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.
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.
-
- Posts: 7
- Joined: Tuesday 14 July 2015 20:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: ß
- Location: everywhere
- Contact:
Re: Geofence for Domoticz
I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
When do you get this error, when crossing the geofence or when you test it?brandie21474 wrote:I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
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?)
-
- Posts: 7
- Joined: Tuesday 14 July 2015 20:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: ß
- Location: everywhere
- Contact:
Re: Geofence for Domoticz
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 borderAppesteijn wrote:When do you get this error, when crossing the geofence or when you test it?brandie21474 wrote:I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
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?)
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Could you try if opening the url in your browser? If you get the 'OK' message there, reinstalling the app might work.brandie21474 wrote: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 borderAppesteijn wrote:When do you get this error, when crossing the geofence or when you test it?brandie21474 wrote:I get an error, and its not the handshake, because I tested it. It looks like the command cannot be executed. Any ideas?
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?)
-
- Posts: 7
- Joined: Tuesday 14 July 2015 20:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: ß
- Location: everywhere
- Contact:
Re: Geofence for Domoticz
I reinstalled the app. It works. Thx
-
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
- Plaagje
- Posts: 42
- Joined: Thursday 30 April 2015 10:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest
- Location: Netherlands
- Contact:
Re: Geofence for Domoticz
I got the error too after testing.... forgot to put authentication on "basic-auth"
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.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.
Or am I missing a use case here?
-
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
Has anyone else experience severe battery drain on their device whilst using this?
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.markk wrote:Has anyone else experience severe battery drain on their device whilst using this?
-
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.Appesteijn wrote: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.markk wrote:Has anyone else experience severe battery drain on their device whilst using this?
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
-
- Posts: 58
- Joined: Sunday 15 March 2015 19:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Hamburg
- Contact:
Re: Geofence for Domoticz
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.
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.
-
- Posts: 134
- Joined: Friday 10 April 2015 23:53
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Geofence for Domoticz
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.
Who is online
Users browsing this forum: No registered users and 1 guest