Geofence for Domoticz

Moderator: leecollings

Post Reply
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Geofence for Domoticz

Post by nayr »

sorry but I doubt any open source android developers are interested in buying a windows phone.. I think its safe to presume there are no plans for that.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

After some feedback I just released a new version with a clearer unit of measurement on the geofence radius (it is in meters) and a extra button to get and enter the current gps location into the latitude and longitude fields.
ErwinH
Posts: 2
Joined: Friday 05 February 2016 10:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by ErwinH »

When my wife is calling, the app thinks she is leaving the perimiter and the app sends a "leave" message. Do you know how this is possible and can you solve this?
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

ErwinH wrote:When my wife is calling, the app thinks she is leaving the perimiter and the app sends a "leave" message. Do you know how this is possible and can you solve this?
Not sure but maybe when she is calling, she gets 'assigned' to another gsm-tower and Google Play might think her location has changed. What you could try is to see in the location history ( https://maps.google.com/locationhistory/b/0 ) and see if it changes when she is calling. If not let me know and I will try to investigate further.
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: Geofence for Domoticz

Post by Evelen »

Don't work for me, not http, not https.
Testet JSON on google chrome on mobile, that works.
gf.png
gf.png (131.8 KiB) Viewed 3431 times
Domoticz V2.4538
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

Can you try setting http ? Usually https is used with port 443 and http with 80 (or 8080)
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: Geofence for Domoticz

Post by Evelen »

Appesteijn wrote:Can you try setting http ? Usually https is used with port 443 and http with 80 (or 8080)
error on http also
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

Could you try with your server's internal ip (when your connected to your wifi) and then http + port 8080 and https + port 443 ?
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: Geofence for Domoticz

Post by Evelen »

Appesteijn wrote:Could you try with your server's internal ip (when your connected to your wifi) and then http + port 8080 and https + port 443 ?
Image

https+443 giv the same error as in image 3 (just with https and 443 in text)
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

Ok I think I see what is going wrong, at your domoticz server under 'Settings', it should look like in the screenshot ("Basic-Auth"). Then http + 8080 should work. If you want httpS work you should forward a port (eg 8080) to internally 443.
Attachments
Screen Shot 2016-02-15 at 17.17.23.png
Screen Shot 2016-02-15 at 17.17.23.png (106.21 KiB) Viewed 3383 times
User avatar
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

Post by RoadXY »

Port used doesn't dictate protocol used.
One can run HTTPS fine on port 80 and HTTP on 443.
It just isn't what is specified by the standard...
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

True, but if you forward port external_ip:8080 to interal_ip:8080 it will not work with https, right? Domoticz https will listen (as default) on 443.
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: Geofence for Domoticz

Post by Evelen »

changed to Basic-Auth and now it works with http :)


(What is Basic-Auth btw?)
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

Basic auth is that your username and password are included in the message that is send to your server. If you go to your domoticz server with your browser you will get a different username/password pop-up.

Now you could try to forward the https port and use that one in the app. The port number is (on domoticz) 443.
User avatar
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

Post by RoadXY »

Appesteijn wrote:True, but if you forward port external_ip:8080 to interal_ip:8080 it will not work with https, right? Domoticz https will listen (as default) on 443.
Yup, SSL/HTTPS will not work on 8080.
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: Geofence for Domoticz

Post by Evelen »

worked fine, but the last days it don't work anymore, it only send json if i manual klikk the send button in the app...
Any ideas?

Happend after a reboot of the phone.
(tryd have the app open in backround, don't work)
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

Evelen wrote:worked fine, but the last days it don't work anymore, it only send json if i manual klikk the send button in the app...
Any ideas?

Happend after a reboot of the phone.
(tryd have the app open in backround, don't work)
Try to remove the geofence and re-add it.

The app listens to a possible reboot of your phone and tries to add an existing geofence, but sometimes the Google client isn't ready yet.
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

Re: Geofence for Domoticz

Post by Evelen »

Appesteijn wrote:
Evelen wrote:worked fine, but the last days it don't work anymore, it only send json if i manual klikk the send button in the app...
Any ideas?

Happend after a reboot of the phone.
(tryd have the app open in backround, don't work)
Try to remove the geofence and re-add it.

The app listens to a possible reboot of your phone and tries to add an existing geofence, but sometimes the Google client isn't ready yet.
Did not work
EDIT: Well, it sendt a "home" massange now, after 15min+ home...
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Geofence for Domoticz

Post by nayr »

after restarting your phone indoors it can take a while for your phone to get a GPS fix it knows is accurate..
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Appesteijn
Posts: 134
Joined: Friday 10 April 2015 23:53
Target OS: Linux
Domoticz version:
Contact:

Re: Geofence for Domoticz

Post by Appesteijn »

Evelen wrote:
Try to remove the geofence and re-add it.

The app listens to a possible reboot of your phone and tries to add an existing geofence, but sometimes the Google client isn't ready yet.
Did not work
EDIT: Well, it sendt a "home" massange now, after 15min+ home...
If you use WiFi your phone should get a fix within a few minutes max. Do you live remotely? That might influence how fast you get a location fix.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest