Page 4 of 20
Re: Geofence for Domoticz
Posted: Sunday 22 November 2015 22:55
by Appesteijn
jcjames13009 wrote:Still investigating on the different posible ways to use GeoFnce. I wonder if there is possibility to set-up several GeoFences or to have different Radius values to manage actions depending on how far we are from home.
Example:
- Switch heating on when I'm at 2km from home
- Open blinds when I'm at 200m from home
- Open garage door when I'm in front of my house
- etc...
Thanks for feedback
JC
It is possible to add multiple geofences, but I'm not sure if they can inside each other. Beside that I'm not sure how to keep the app super simple (UI wise) and support multiple geofences. I'll have a look at it.
Re: Geofence for Domoticz
Posted: Monday 23 November 2015 13:50
by jcjames13009
Appesteijn wrote: Beside that I'm not sure how to keep the app super simple (UI wise) and support multiple geofences. I'll have a look at it.
Hi
Always the same dilemma
Thanks Appesteijn for having alook at it. If you need help to test feel free to ask me.
JC
Re: Geofence for Domoticz
Posted: Monday 30 November 2015 20:49
by Appesteijn
At the moment I'm working on another app (too much idea's and too little time), so for now I won't be adding multiple geofences. Maybe in my vacation around christmas.
Re: Geofence for Domoticz
Posted: Monday 30 November 2015 20:57
by jcjames13009
Hi Appesteijn
No pb Christmas is not so far from now
I have enough to play with the present feature fro the moment
Thanks again
JC
Re: Geofence for Domoticz
Posted: Monday 07 December 2015 16:15
by free_nsc
Great work!
I am having problem getting this working. It looks like the switch command is not recognizing the switchlight parameters. Anyone else having this problem as well?
Code: Select all
2015-12-07 15:09:02.731 User: admin initiated a switch command
2015-12-07 15:09:02.732 Error: Switch command not send!, Hardware device disabled or not found!
I tried to issue the following API call and same error:
Code: Select all
/json.htm?type=command¶m=switchlight&idx=99&switchcmd=Off
Checked Idx is fine - it just doesn't know this api call from what I can see. I was able to get it on /off with the following command:
Code: Select all
/json.htm?type=command¶m=udevice&idx=501&svalue=On
Re: Geofence for Domoticz
Posted: Monday 07 December 2015 16:21
by Appesteijn
Did you create the right type of virtual switch ? It should be a:
' Create a virtual switch that DomoFence will trigger
Go to 'Setup -> Hardware' and add a 'Dummy device'
Go to 'Switches' and add a 'Manual light/switch'
Select the right 'Hardware' and 'On/Off' the rest doesn't matter.
Add the device
Now go to 'Setup -> Devices' and note the 'Idx' of the switch you just created. '
Re: Geofence for Domoticz
Posted: Monday 07 December 2015 22:12
by free_nsc
Ok, this is weird. I already had dummy hardware so just created new device for the x10 on/off switch and this did not work. I have however just tried to create new hardware and it worked straight in! Ignore the post
seems ok now
Re: Geofence for Domoticz
Posted: Tuesday 08 December 2015 15:30
by Appesteijn
free_nsc wrote:Ok, this is weird. I already had dummy hardware so just created new device for the x10 on/off switch and this did not work. I have however just tried to create new hardware and it worked straight in! Ignore the post
seems ok now
Hmm strange indeed, but good to hear it works!
Error: SSL handshake timed out
Posted: Sunday 20 December 2015 0:25
by neutreno
Thanks for making DomoFence.
I got the geofence working with HTTP, but obviously no Domoticz user should be sending the password to control their home by an insecure method, other than to test the system perhaps.
The issue I have is that HTTPS does not work, yet works fine in my mobile web browser. When I touch the test button, I get 'Error: SSL handshake timed out'. I'm using the new inbuilt Domoticz HTTPS setup (no nginx). Any ideas?
EDIT: DomoFence appears to be incompatible with the default inbuilt SSL setup in the latest version of Domoticz. I think there should at least be a note on the Wiki to make users aware of this. Using Nginx SSL reverse proxy works fine with Domofence and the latest Domoticz with its inbuilt SSL service disabled.
Re: Geofence for Domoticz
Posted: Monday 21 December 2015 7:37
by Appesteijn
Thanks for your research, I'll see what I can do to build support for this.
*edit: I just added this to the wiki page. I think you get this timeout because the certificate of
https://your-own-domoticz is issued for *.domoticz.com and not for your domain.
Is this also your case?
Re: Geofence for Domoticz
Posted: Thursday 24 December 2015 20:08
by RoadXY
Appesteijn wrote:Thanks for your research, I'll see what I can do to build support for this.
*edit: I just added this to the wiki page. I think you get this timeout because the certificate of
https://your-own-domoticz is issued for *.domoticz.com and not for your domain.
Is this also your case?
That's the default certificate when enabling SSL/HTTPS for Domoticz.
We're using
https://github.com/ge0rg/MemorizingTrustManager for this since Android doesn't trust 3rd party certificates (and it shouldn't do either).
Memorizing trust manager helped me with this.
Re: Geofence for Domoticz
Posted: Monday 28 December 2015 0:58
by nayr
EgiGeoZone working perfectly with my Domoticz behind an x509 nginx.. I have no auth in domo, client certificates required and a signed server cert.. If the device is loaded with a cert I sign then it can access the UI from anywhere without needing a password.
been modifying and setting up scripts for security sensors to notify me of changes only I am away from home, now I just need to remember to bring my phone with me.
ping scripts just were not cutting it, my phone would go to sleep at night for several hours.. im sure this is better for the battery consumption.
now to find something for my wife's iphone that can hang with x509 certs.
Thanks.
Re: Geofence for Domoticz
Posted: Wednesday 30 December 2015 10:09
by Appesteijn
OK I found a solution, I can automatically accept all certificates that have a hostname *.domoticz.com.
edit: It has been released.
Re: Geofence for Domoticz
Posted: Monday 11 January 2016 8:41
by niclasc
I cant get Domofence to send a "off" command.
If my virtual switch is "on" and at press the bottom right button then the switch turns on
But once its "on" I cant turn it "off". If I try to send the "off" command like this then it works:
/json.htm?type=command¶m=switchlight&idx=99&switchcmd=Off
And yes I use the right switch-idx
Even thou I'm 15 miles from home it still is "on"
Re: Geofence for Domoticz
Posted: Monday 11 January 2016 16:07
by Appesteijn
niclasc wrote:I cant get Domofence to send a "off" command.
If my virtual switch is "on" and at press the bottom right button then the switch turns on
But once its "on" I cant turn it "off". If I try to send the "off" command like this then it works:
/json.htm?type=command¶m=switchlight&idx=99&switchcmd=Off
And yes I use the right switch-idx
Even thou I'm 15 miles from home it still is "on"
When you enter the geofence it automatically should send a ON command and when you leave it should turn it OFF.
If you don't press the right button and turn the switch off (through the webpage) and enter your geofence, is the switch set to on? You can simulate entering a geofence by removing the geofence and then adding it. Your should get a notification that you have entered the geofence (of course you should be in the geofence)
Re: Geofence for Domoticz
Posted: Tuesday 12 January 2016 8:58
by niclasc
Appesteijn wrote:niclasc wrote:I cant get Domofence to send a "off" command.
If my virtual switch is "on" and at press the bottom right button then the switch turns on
But once its "on" I cant turn it "off". If I try to send the "off" command like this then it works:
/json.htm?type=command¶m=switchlight&idx=99&switchcmd=Off
And yes I use the right switch-idx
Even thou I'm 15 miles from home it still is "on"
When you enter the geofence it automatically should send a ON command and when you leave it should turn it OFF.
If you don't press the right button and turn the switch off (through the webpage) and enter your geofence, is the switch set to on? You can simulate entering a geofence by removing the geofence and then adding it. Your should get a notification that you have entered the geofence (of course you should be in the geofence)
How do I remove the geofence? And what does the right button do?
Re: Geofence for Domoticz
Posted: Tuesday 12 January 2016 10:43
by Appesteijn
niclasc wrote:
How do I remove the geofence? And what does the right button do?
The middle button is to add and remove a geofence. The small button on the right is to test your setup.
If you press the middle button it should say "Geofence added" of " Geofence removed". This is the primary button for the app.
If you press the button on the right, you should get a message that the switch is set (or you get an error message)
Re: Geofence for Domoticz
Posted: Tuesday 12 January 2016 10:51
by niclasc
Appesteijn wrote:niclasc wrote:
How do I remove the geofence? And what does the right button do?
The middle button is to add and remove a geofence. The small button on the right is to test your setup.
If you press the middle button it should say "Geofence added" of " Geofence removed". This is the primary button for the app.
If you press the button on the right, you should get a message that the switch is set (or you get an error message)
Does "Geofence added" and " Geofence removed" equals "on" and "off"?
Strange thing is that today it seams to work. But yesterday Geofence was "on" nomatter where I was
Re: Geofence for Domoticz
Posted: Tuesday 12 January 2016 13:49
by Appesteijn
niclasc wrote:
Does "Geofence added" and " Geofence removed" equals "on" and "off"?
Strange thing is that today it seams to work. But yesterday Geofence was "on" nomatter where I was
No, when you add a geofence, your phone will monitor when you enter the geofence (send on command) and when you leave the geofence (send off command). If you remove the geofence, your phone will stop monitoring and will never send on or off.
Good to hear it works now, if you need any help, just ask!
Re: Odp: Geofence for Domoticz
Posted: Saturday 16 January 2016 23:55
by dtech
Appesteijn wrote:I recently created a small app that flips a virtual switch on your domoticz server. It is a little basic, but it creates a geofence and once created, the geofence survives a possible reboot of your phone.
DomoFence
It is free, just let me know what you think of it
Just created a wiki-page:
http://www.domoticz.com/wiki/DomoFence
Hi,
Any plans that this will be available on Windows phone systems ?
Thx