Page 13 of 20

Re: Geofence for Domoticz

Posted: Thursday 25 May 2017 9:37
by EdwinK
it says that everything is okay. (Don't have access right now), but something like that.

Using version 2.8.9

(Update) It seems now to be setting to 'on', but not to 'off'.

Re: Geofence for Domoticz

Posted: Thursday 25 May 2017 10:03
by Appesteijn
EdKo66 wrote:it says that everything is okay. (Don't have access right now), but something like that.

Using version 2.8.9

(Update) It seems now to be setting to 'on', but not to 'off'.
If you move outside of your geofence you can try to send an 'off' command with the testbutton. If you get a notification that your outside of your geofence, the app tries to send the off command. If it can't (because there is no data connection available) it is try again after a little while. You might have to wait a little bit (see if you have an internet connection when your outside of your geofence) before the switch is really flipped (but it should flip the switch within a minute).

Re: Geofence for Domoticz

Posted: Thursday 25 May 2017 10:11
by EdwinK
Going to try this later. Now I'm unfortunately bound to the house :(

Re: Geofence for Domoticz

Posted: Monday 29 May 2017 9:57
by ensingg
I am new to geofencing and Domoticz.

My Samsung Galaxy S7 runs with Android Nougat 7.0

When I use geofencing from M. Suurmond or the normal Domoticz Android version for geofencing. I have the same problem.

The phone is laying in house and not moving. But Every once and a while the geofencing says it that I left the geofence area. And in the same minute I am back in the area.

Looked at all power save options. But the program is not affected by that.

Maybe that the program is detecting no gps and sees that as my new position?

Please help. The geofence option is not working for me and I need it.

Re: Geofence for Domoticz

Posted: Monday 29 May 2017 13:40
by Appesteijn
ensingg wrote:I am new to geofencing and Domoticz.

My Samsung Galaxy S7 runs with Android Nougat 7.0

When I use geofencing from M. Suurmond or the normal Domoticz Android version for geofencing. I have the same problem.

The phone is laying in house and not moving. But Every once and a while the geofencing says it that I left the geofence area. And in the same minute I am back in the area.

Looked at all power save options. But the program is not affected by that.

Maybe that the program is detecting no gps and sees that as my new position?

Please help. The geofence option is not working for me and I need it.
This is usually because in 'power-save' mode the localisation depends on cell-tower signals. When you phone switches from cell-tower, you phone thinks it's location has changed and moves you out of your geofence. Domofence can't do anything about this.

Best thing to do is to use a large radius (eg 1500 meters) and/or switch only after your phone(s) are away for more then 1 or 2 minutes.

Re: Geofence for Domoticz

Posted: Monday 29 May 2017 13:50
by ensingg
"This is usually because in 'power-save' mode the localisation depends on cell-tower signals. When you phone switches from cell-tower, you phone thinks it's location has changed and moves you out of your geofence. Domofence can't do anything about this.

Best thing to do is to use a large radius (eg 1500 meters) and/or switch only after your phone(s) are away for more then 1 or 2 minutes."

So the solutions is to not react to sudden changes. Wait if a switch is in a specific state for more time.

I want to use it to open my electronic gate when I am near my home. The gate clothes automatically after 2 minutes of openening.

Isn't it better to let the geofence detecting mechanisme deal with it?

btw. Domoticz app is excluded from battery safe mode. Do I need to excluse more from this mode.

Re: Geofence for Domoticz

Posted: Monday 29 May 2017 14:04
by zicht
I use another approach for the same goal because of all the Samsung Galaxy S7 with Android Nougat 7.0 problems
(wifi and GPS power savings active : even when all powersavings are disabled in settings, causing Wifi and GPS sensor to be polled only periodicaly in sleep mode, what makes geofences and pings unreliable )

With Tasker I detect if wifinear (home SSID) or not, if so i set a uservar with the SSID of the wifi (json) and reset the uservar when not near the Wifi network. This works well for now and pretty accurate and fast. For me this turns out to be the only reliable way at the moment.
The only problem sometime occur if tasker tries to send during wifi negotiation/connect on arrival or depart. To avoid this i use a wait for a couple of seconds. This saves also battery as i do not use the GPS constantly ;)

Maybe the app could use a similar or combination of with methode to detect to be near the home SSID what is allready known in all cases (home network detection)

Re: Geofence for Domoticz

Posted: Monday 29 May 2017 23:06
by Appesteijn
zicht wrote:I use another approach for the same goal because of all the Samsung Galaxy S7 with Android Nougat 7.0 problems
(wifi and GPS power savings active : even when all powersavings are disabled in settings, causing Wifi and GPS sensor to be polled only periodicaly in sleep mode, what makes geofences and pings unreliable )

With Tasker I detect if wifinear (home SSID) or not, if so i set a uservar with the SSID of the wifi (json) and reset the uservar when not near the Wifi network. This works well for now and pretty accurate and fast. For me this turns out to be the only reliable way at the moment.
The only problem sometime occur if tasker tries to send during wifi negotiation/connect on arrival or depart. To avoid this i use a wait for a couple of seconds. This saves also battery as i do not use the GPS constantly ;)

Maybe the app could use a similar or combination of with methode to detect to be near the home SSID what is allready known in all cases (home network detection)
It is true that in Android 7.0 you can no longer send http-requests in the background, but you have to 'ask the phone' to schedule this call. That has been in the latest updates of domofence. So if you cross you geofence, a http-request is scheduled and send when your phone allows it. Domofence should work correctly (or even better) with Android 7.0 as it did before. Even after a reboot a http-request is send (only if it couldn't send it before) and a geofence is re-registered.

Re: Geofence for Domoticz

Posted: Sunday 04 June 2017 13:32
by zicht
That is great, tnx !

Re: Geofence for Domoticz

Posted: Sunday 11 June 2017 19:55
by thecosmicgate
Does anybody know a solution : geofence switches okay when connected to the 4g connection this because of the HTTPS (444) port I use. But when the WiFi is in range and connected this HTTPS port isn't available anymore and changed to http (8080) so the change isn't send to domoticz .

As a workaround a can change the radius to 400 m so it's not possible that the phone is connected to the WiFi signal. But it should be better/nicer .
So if it's possible to send the On / off signal to 2 different ports or addresses would be the solution (for me )

Sent from my SM-G935F using Tapatalk

Re: Geofence for Domoticz

Posted: Monday 12 June 2017 12:41
by Appesteijn
thecosmicgate wrote:Does anybody know a solution : geofence switches okay when connected to the 4g connection this because of the HTTPS (444) port I use. But when the WiFi is in range and connected this HTTPS port isn't available anymore and changed to http (8080) so the change isn't send to domoticz .

As a workaround a can change the radius to 400 m so it's not possible that the phone is connected to the WiFi signal. But it should be better/nicer .
So if it's possible to send the On / off signal to 2 different ports or addresses would be the solution (for me )

Sent from my SM-G935F using Tapatalk
Why can't you reach port extern_ip:444 from within your LAN?

Re: Geofence for Domoticz

Posted: Monday 12 June 2017 12:52
by thecosmicgate
Appesteijn wrote:
thecosmicgate wrote:Does anybody know a solution : geofence switches okay when connected to the 4g connection this because of the HTTPS (444) port I use. But when the WiFi is in range and connected this HTTPS port isn't available anymore and changed to http (8080) so the change isn't send to domoticz .

As a workaround a can change the radius to 400 m so it's not possible that the phone is connected to the WiFi signal. But it should be better/nicer .
So if it's possible to send the On / off signal to 2 different ports or addresses would be the solution (for me )

Sent from my SM-G935F using Tapatalk
Why can't you reach port extern_ip:444 from within your LAN?
Because port redirection ( on the firewall)

Sent from my SM-G935F using Tapatalk

Re: Geofence for Domoticz

Posted: Tuesday 13 June 2017 7:47
by Appesteijn
thecosmicgate wrote:
Appesteijn wrote:
Why can't you reach port extern_ip:444 from within your LAN?
Because port redirection ( on the firewall)

Sent from my SM-G935F using Tapatalk
But you should be able to reach your external ip also from within your LAN or doesn't your router allow that?

Re: Geofence for Domoticz

Posted: Tuesday 13 June 2017 8:00
by thecosmicgate
That's indeed supported but the 443 port is already used for some other programme that's why external 444 is needed

Sent from my SM-G935F using Tapatalk

Re: Geofence for Domoticz

Posted: Tuesday 11 July 2017 7:17
by sjoerd1953
I have a question about the server address that is required in the DomoFence app. It may have been asked before, it is a long thread. If it has I apologize beforehand.

At first I entered the private IP address of my Raspberry Pi (192.168.xxx.xxx:8080) and that seemed to work fine until I left my home and lost the connection. When I entered the public IP address I of my modem/router and forwarded that to the address of the Raspberry Pi it works as expected. I get my public IP by DHCP so it might change when I reboot the modem. Further on I am not comfortable with exposing my public IP address in an app.

My question is: is that really how it is supposed to be done?

Re: Geofence for Domoticz

Posted: Thursday 13 July 2017 8:25
by Appesteijn
sjoerd1953 wrote:I have a question about the server address that is required in the DomoFence app. It may have been asked before, it is a long thread. If it has I apologize beforehand.

At first I entered the private IP address of my Raspberry Pi (192.168.xxx.xxx:8080) and that seemed to work fine until I left my home and lost the connection. When I entered the public IP address I of my modem/router and forwarded that to the address of the Raspberry Pi it works as expected. I get my public IP by DHCP so it might change when I reboot the modem. Further on I am not comfortable with exposing my public IP address in an app.

My question is: is that really how it is supposed to be done?
You can use https but then the app still needs to know where your server is to contact it, so yes that is how it should be done.

Re: Geofence for Domoticz

Posted: Sunday 16 July 2017 20:25
by sjoerd1953
OK, thanks.

Re: Geofence for Domoticz

Posted: Saturday 05 August 2017 14:04
by titof2375
Hello i just installed geofence and i just can not get it done. For accede a domoticz I do not pass no ip, I enter the address of no ip in geofence. I have a mistake: conet time out, it means what thanks

Re: Geofence for Domoticz

Posted: Monday 07 August 2017 7:40
by Appesteijn
titof2375 wrote:Hello i just installed geofence and i just can not get it done. For accede a domoticz I do not pass no ip, I enter the address of no ip in geofence. I have a mistake: conet time out, it means what thanks
That the app can't reach your server or your server is not responding on that port. You could try to check by using the no ip and port in your browser and see what happens.

Re: Geofence for Domoticz

Posted: Thursday 31 August 2017 13:37
by leon33
Hello, i just installed geofence. But i can get it working. when i enter the geozone it give the message that i'm entered but it doesn't switch the switch.

if i test then i get the message Error:http://----------json.htm?type=command&param=switchlight&idx=1187&switchcmd=on

if i test direct in browser i got
{
"message" : "Error sending switch command, check device/hardware !",
"status" : "ERROR",
"title" : "SwitchLight"
}

The port is open because i can reach it, authenticatie is on basic auth. and i created a new dummy on/off light switch.

What am i doing wrong?