Geofence for Domoticz

Moderator: leecollings

Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

leon33 wrote: Thursday 31 August 2017 13:37 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?
Is the IDX correct? When I use a IDX greater than 231 I get an error from my domoticz. You even have 1187, do you have that many devices?
leon33
Posts: 6
Joined: Thursday 31 August 2017 13:24
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Contact:

Re: Geofence for Domoticz

Post by leon33 »

No i don't have so many devices but that's the idx i get. i have more dummy switches with high idx numbers. i have a look if i can change this.
leon33
Posts: 6
Joined: Thursday 31 August 2017 13:24
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Contact:

Re: Geofence for Domoticz

Post by leon33 »

I tested with a lower idx number, but still the same error
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

leon33 wrote: Thursday 31 August 2017 14:06 I tested with a lower idx number, but still the same error
Hmm, is the type of the switch correct? Is it a on/off switch?
Screen Shot 2017-08-31 at 14.42.37.png
Screen Shot 2017-08-31 at 14.42.37.png (36.29 KiB) Viewed 4511 times
leon33
Posts: 6
Joined: Thursday 31 August 2017 13:24
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Contact:

Re: Geofence for Domoticz

Post by leon33 »

Yes it's a light on/off switch, the only differnce i see is the hardware, Geofences instead of dummy.
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

leon33 wrote: Thursday 31 August 2017 14:56 Yes it's a light on/off switch, the only differnce i see is the hardware, Geofences instead of dummy.
And it is not passwords protected or something?
leon33
Posts: 6
Joined: Thursday 31 August 2017 13:24
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Contact:

Re: Geofence for Domoticz

Post by leon33 »

I just noticed that I get an error in domoticz

2017-08-31 14:05:12.084 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 192.168.1.1)

I will check this one first

thanks for the support so far
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

leon33 wrote: Thursday 31 August 2017 15:26 I just noticed that I get an error in domoticz

2017-08-31 14:05:12.084 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 192.168.1.1)

I will check this one first

thanks for the support so far
Your welcome, let me know how you solved it.
leon33
Posts: 6
Joined: Thursday 31 August 2017 13:24
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Contact:

Re: Geofence for Domoticz

Post by leon33 »

Good morning. Still after some changes it didn't work. Now I put the server settings in the domoticz app itself and it's working. So I will use this app and see how it's going.

Thank's
jvaassen
Posts: 2
Joined: Sunday 03 January 2016 0:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Eindhoven
Contact:

Re: Geofence for Domoticz

Post by jvaassen »

Hi,

I am using the Domoticz app now for quite some time in combination with Domoticz on Pi.
I wanted to start using geofences and NFC on my phone to control multiple switches. Easiest way to do so is using scenes.
My request to enable scenes from geofences and NFC was honored, for which I am very thankfull.
However, some scenes I can select to be activated by geofence/NFC, and some I cannot.
I tried the following things :
- Remove spaces from their names.
- Create new scene, with similar name.

I am happy to test/investigate things... But I cannot get this to work with some scenes, and have no clue why.

Thanks in advance,
Jos
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

jvaassen wrote: Wednesday 06 September 2017 0:13 Hi,
.....

Thanks in advance,
Jos
I'm thinking you are mixing up two different apps. This thread is for 'DomoFence - Geofence for Domoticz' app.
dizzyweb
Posts: 20
Joined: Tuesday 20 June 2017 13:46
Target OS: Linux
Domoticz version: 4.10007
Contact:

Re: Geofence for Domoticz

Post by dizzyweb »

Using this for a little while now since the geofence functionality in the Domoticz app was buggy. But I'm experiencing the same issues with domofence.

The odd thing is, when I get near my home, it switches the dummy. Perfect. But when I'm at home... it regularly switches again. I regularly enter the fence again when I'm already in it. No leaving actions, just entering again. Maybe it does leave and enter again right away, so I only see the entering notification...

But that does mean my hallway lights keep popping on when I'm just sitting on the couch at home. Or at night, when my phone is charging on my nightstand.

It's almost as if it's using highly inaccurate data when I'm indoors. But it's really hard to debug what's happening, since there's no log. It'd be really helpful if you could visualize the last X actions on a map or something.
ArieKanarie
Posts: 41
Joined: Saturday 12 December 2015 13:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by ArieKanarie »

I have the same issues, see the log of the connected switch:

Image
DutchHans
Posts: 229
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Geofence for Domoticz

Post by DutchHans »

Hi, maybe you can try egigeozone..you can switch between google and pathsense. I use Locative and it works very well...btw they are all free.

Regards, Hans
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

dizzyweb wrote: Wednesday 18 October 2017 10:15 Using this for a little while now since the geofence functionality in the Domoticz app was buggy. But I'm experiencing the same issues with domofence.

The odd thing is, when I get near my home, it switches the dummy. Perfect. But when I'm at home... it regularly switches again. I regularly enter the fence again when I'm already in it. No leaving actions, just entering again. Maybe it does leave and enter again right away, so I only see the entering notification...

But that does mean my hallway lights keep popping on when I'm just sitting on the couch at home. Or at night, when my phone is charging on my nightstand.

It's almost as if it's using highly inaccurate data when I'm indoors. But it's really hard to debug what's happening, since there's no log. It'd be really helpful if you could visualize the last X actions on a map or something.
This can happen when your phone connects to another GSM transmitter. All geofence apps will have this as your phone 'thinks' it has moved because of the low-power location measurement.

I have solved this by only switching when my 'virtual switch' is on/off for 2 minutes.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Geofence for Domoticz

Post by manjh »

Just found this thread and installed the app. Configured Domoticz. Works in a few minutes!
The app itself is simple to use. But it took me a llittle while to understand the test button, since it will not switch off when inside the geofence. But I got through that.

Suggestions:
1. it might be nice to pull lat/long from Domoticz. But since this is for the one-time setup, not a big deal to enter it manually.
2. It would be very useful to have two levels of geofencing. For instance: define the first area to 50 meters, in order to switch lights etcetera. But then define the second level to 10KM, so I can switch the heater off when I exit that circle, since it means I am not just making a trip to a store but am actually leaving town.
Perhaps a good extension for future development?
Hans
dizzyweb
Posts: 20
Joined: Tuesday 20 June 2017 13:46
Target OS: Linux
Domoticz version: 4.10007
Contact:

Re: Geofence for Domoticz

Post by dizzyweb »

Appesteijn wrote: Friday 20 October 2017 20:24
dizzyweb wrote: Wednesday 18 October 2017 10:15 Using this for a little while now since the geofence functionality in the Domoticz app was buggy. But I'm experiencing the same issues with domofence.

The odd thing is, when I get near my home, it switches the dummy. Perfect. But when I'm at home... it regularly switches again. I regularly enter the fence again when I'm already in it. No leaving actions, just entering again. Maybe it does leave and enter again right away, so I only see the entering notification...

But that does mean my hallway lights keep popping on when I'm just sitting on the couch at home. Or at night, when my phone is charging on my nightstand.

It's almost as if it's using highly inaccurate data when I'm indoors. But it's really hard to debug what's happening, since there's no log. It'd be really helpful if you could visualize the last X actions on a map or something.
This can happen when your phone connects to another GSM transmitter. All geofence apps will have this as your phone 'thinks' it has moved because of the low-power location measurement.

I have solved this by only switching when my 'virtual switch' is on/off for 2 minutes.
Any suggestions how to do that easily? My first though is to use a second dummy switch that gets toggled only when the switch domofence uses isn't toggled off for X minutes... But I doubt that would be built easily in blockly, so I'd have to sharpen my LUA-fu.
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

dizzyweb wrote: Monday 30 October 2017 21:30
Any suggestions how to do that easily? My first though is to use a second dummy switch that gets toggled only when the switch domofence uses isn't toggled off for X minutes... But I doubt that would be built easily in blockly, so I'd have to sharpen my LUA-fu.
I have two virtual switches, one switches immediately when one or more phones are outside of the geofence. This one is called 'IemandMischienThuis'.

The second one switches when 'IemandMisschienThuis' is on or off for more than two minutes:

Code: Select all

-- script_time_iemand_thuis_switcher.lua
t1 = os.time()
s = otherdevices_lastupdate['State - IemandMisschienThuis']
-- returns a date time like 2013-07-11 17:23:12
 
year = string.sub(s, 1, 4)
month = string.sub(s, 6, 7)
day = string.sub(s, 9, 10)
hour = string.sub(s, 12, 13)
minutes = string.sub(s, 15, 16)
seconds = string.sub(s, 18, 19)
 
commandArray = {}
 
t2 = os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds}
difference = (os.difftime (t1, t2))
if (otherdevices['State - IemandMisschienThuis'] == 'Off' and difference > 120 and difference < 180) then
    commandArray['State - IemandThuis']='Off'
    print('Nobody home, switching off')
elseif (otherdevices['State - IemandMisschienThuis'] == 'On' and difference > 60 and difference < 120) then
    commandArray['State - IemandThuis']='On'
    print('Somebody home, switching on')
end 
 
return commandArray
CreatoX
Posts: 8
Joined: Wednesday 22 March 2017 15:41
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by CreatoX »

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.
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

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 ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest