Announcement

Collapse
No announcement yet.

PHLocation V2 Discussion

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by The Profit View Post
    Thanks Randy. Something else, I've entered more known locations and put a check mark in the box to enable, the plugin used to show time and distance for each of those locations, was that changed in this version? I don't see any of the locations show up as devices so I assume it now just shows if you are at or close to those known locations?
    Correct. I wrote about that change at the beginning of this thread. There are no longer known locations per device, they are global. You can trigger an Event of of entry or exit of any known location. They are also logged to the database under "History"
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      Originally posted by rprade View Post
      You probably created them under .40. Nathan created them under .41 if I read his post correctly.
      Originally posted by The Profit View Post
      When did you create them? I created mine at two different times in two different versions of the plugin so I'm guessing that Paul made a change...but not sure.
      I created them all yesterday morning with the version that Paul had released on Friday. I just updated to .41.
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        I just created one under .41 and it does now show as "Inside" and "Outside".
        HS 4.2.8.0: 2134 Devices 1252 Events
        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

        Comment


          Originally posted by sparkman View Post



          I created them all yesterday morning with the version that Paul had released on Friday. I just updated to .41.
          It looks like it changed in .41. I just deleted one of mine and recreated. It was created with Inside and Outside.

          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment


            Randy/Paul,

            In PHLocation 1, I had a known place of type User-Place which I used to detect when I was on the way home. Is there a way to do this in PHLocation 2? I've been digging around, but can't find it.

            BTW, I'm using Backitude and it works great. I just had to update the server URL to the new API and change my Custom Field 1 to reflect the new device ID of the PHLocation 2 user.

            Here are some screenshots of the old config and an event.

            Known User-Place

            Click image for larger version  Name:	phlocation1-user-place.PNG Views:	2 Size:	7.3 KB ID:	1275920

            Known User-Place Edit

            Click image for larger version  Name:	phlocation1-user-place-edit.PNG Views:	2 Size:	37.8 KB ID:	1275921

            HS device created by above known place

            Click image for larger version  Name:	phlocation1-user-place-device.PNG Views:	1 Size:	75.7 KB ID:	1275923

            Event using this device

            Click image for larger version  Name:	phlocation1-event-approaching.PNG Views:	2 Size:	47.7 KB ID:	1275922

            Comment


              Also, in PHLocation 1, I had multiple known places which I've added to PHLocation 2, however, I'm not seeing the new child devices under my user like I did in 1. Is there a way to update the existing users as more known locations are added?

              Here is the original device in PHLocation 1 showing a child device for "Near" for both known locations of home and Vortex.

              Click image for larger version

Name:	phlocation1-user-device.PNG
Views:	126
Size:	55.5 KB
ID:	1275926

              Here are the new locations in PHLocation 2

              Click image for larger version

Name:	phlocation2-known-locations.PNG
Views:	129
Size:	8.0 KB
ID:	1275927

              Here is the PHLocation 2 user device which was created before the Vortex known location was created. There is no reference to the new known location "Vortex", just the Home, and there is no "Near" child device. I used the Near device to tell when I was at a specific location and would fire an event based upon that device.

              Click image for larger version

Name:	phlocation2-user-device.PNG
Views:	157
Size:	103.3 KB
ID:	1275928

              Event using the PHLocation 1 "Near" child device

              Click image for larger version

Name:	phlocation1-event-vortex-arrived.PNG
Views:	135
Size:	28.9 KB
ID:	1275929

              Comment


                It is not going to be the same. It was clumsy to create a known location for each known location and each device. There is now a pool of known locations for all devices. There is still a trigger and condition for each device as it relates to a global known location. The triggers are “Location Enter” and “Location Exit”. The conditions are “User at Location” and “User Not at Location”. The only things missing are direction and distance from location. Straight line distance to home is provided. So you can Trigger when you enter or leave the Vortex.

                Having known locations calculating driving distance, time and direction of travel was dependent on Google and required every device to have its own known locations. This plug-in has eliminated all reliance on Google and has centralized known locations so that every device relates to them.
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  Thanks, I'm able to re-create what I need for entering and leaving the Vortex using the new "Location Enter" and "Location Exit" triggers.

                  For approaching home, I'm going to experiment using the straight line distance and "time at location". If I check that a user is a certain distance away from home and their time at location is zero (and don't allow the event to re-fire for 5 minutes), that should roughly be what I want to achieve since I don't want Homeseer notifying every few minutes that someone is on the way home if they are stationary (time at location greater than zero) at the grocery store up the street.

                  I'll post back the event once I've had a few days to play around with it.

                  Comment


                    Originally posted by MNB View Post
                    Paul, looking in my HS3 log I noticed the following PHL2 error messages after an event (each one occurred separately);
                    Jan-13 3:24:33 PM PHLocation2 Error (UpdateFenceDevices) Error writing fence change to DB!
                    Jan-13 3:24:33 PM PHLocation2 Error (InsertFenceData) Exception: SQL logic error or missing database near "0": syntax error
                    Jan-13 3:29:28 PM PHLocation2 Error (UpdateFenceDevices) Error writing fence change to DB!
                    Jan-13 3:29:28 PM PHLocation2 Error (InsertFenceData) Exception: SQL logic error or missing database near "1": syntax error
                    --------------------------------------------------------------------------------------------------------
                    Jan-13 3:33:26 PM Event Event Trigger "Location PHL2 mapping - Mike"
                    Jan-13 3:33:25 PM PHLocation2 Warning (UpdateUserDevice) Primary elevation lookup failed, trying alternative provider.
                    Jan-13 3:33:25 PM PHLocation2 Error (GetElevationA) Error: Error. Empty response.
                    Jan-13 3:33:18 PM PHLocation2 Warning (UpdateUserDevice) Primary reverse geocode lookup failed, trying alternative provider!
                    Jan-13 3:33:18 PM PHLocation2 Error (GetReverseGeoQ) Error: Empty Response.
                    The first error is probably caused because there is something in the geofence data that it doesn't like.
                    Version .42 will be available later this evening. I have added some additional info the the error message so we can see exactly what's causing it to fail.

                    The second errors are because it failed to lookup Reverse Geocode and Elevation data using the primary provider. If this happens frequently, try altering the order of your providers and / or switch on the Suppress API Errors option on the API tab to stop it writing them to the HS log.

                    Paul..

                    Comment


                      Just to confirm:

                      Geofence value / status pairs are now:
                      0 = Inside
                      1= Outside

                      I can't remember exactly when it changed but anyone who has installed the plug-in since it was made available on this forum should see the above statuses.

                      It was changed because Near / Not Near doesn't properly relate to a geofence.

                      There is no problem changing the status text to whatever you like although any new fences that are added will take on the default status text.
                      In a future version I'll make the status text user configurable.

                      Paul..

                      Comment


                        Originally posted by slbuck View Post
                        Thanks, I'm able to re-create what I need for entering and leaving the Vortex using the new "Location Enter" and "Location Exit" triggers.

                        For approaching home, I'm going to experiment using the straight line distance and "time at location". If I check that a user is a certain distance away from home and their time at location is zero (and don't allow the event to re-fire for 5 minutes), that should roughly be what I want to achieve since I don't want Homeseer notifying every few minutes that someone is on the way home if they are stationary (time at location greater than zero) at the grocery store up the street.

                        I'll post back the event once I've had a few days to play around with it.
                        As Randy mentioned. In V1, every known location for a user would result in many 3rd party lookups to get the driving distance / time etc for each location. As an example a single user with say 10 known locations and frequent location changes would result in an awful lot of lookups per day.
                        This wasn't a problem before Google implemented limits on the free services.

                        In V2, to reduce the number of lookups, only driving time / distance is done and only for the home location.

                        A couple of folks have asked about the "Approaching / Leaving" a known location which was in V1, so I've added it to the "possible" list.
                        If it's added to V2 it will be a trigger / condition as opposed to having HS devices.

                        Paul..

                        Comment


                          Thank you Paul for putting out such a great plugin! Got it installed & setup with very little issue! Also, a big thank you to Randy for troubleshooting and helping out with support questions!

                          I hope that we all consider clicking on that “Donate” button for Paul. There are quite a few of us that are benefiting from the features in this plugin and Paul has contributed quite a bit of his personal time not just to develop it but also to troubleshoot and fix the issues we post.

                          He never requires a donation and I know we all have our own financial struggles but I’m sure anything you can give will show your appreciation for all that he does for us.


                          Sent from my iPad using Tapatalk
                          HS4 4.2.6.0 &HSTouch Designer 3.0.80
                          Plugin's:
                          BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
                          EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
                          weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

                          Comment


                            Originally posted by rprade View Post
                            For those of you posting from 3rd party apps like GeoFency, PHL2 does not use its own web server, it uses the HS built-in server. The posting is still the same as before with two changes 1) it now uses your HomeSeer web server port (usually 80) so create your port forwarding rules and structure the URL accordingly. 2) The api is now phl2api, with the original it was phlapi. The dtypes are the same as listed in the PHL documentation.


                            If you are posting to GeoFency for example it will be:

                            MYHS:
                            https://connected2.homeseer.com/phl2api?dtype=GF
                            Use your MyHS login credentials

                            Direct through port forwarding:
                            http://[ddns domain name]:[external port]/phl2api?dtype=GF
                            if you have "No Password Required for Local/Same Network Login (Web Browser/HSTouch)" no credentials are required, otherwise use your HS admin account credentials.

                            Direct through VPN:
                            http://[HS local IP]:[HS port - not required if 80]/phl2api?dtype=GF
                            if you have "No Password Required for Local/Same Network Login (Web Browser/HSTouch)" no credentials are required, otherwise use your HS admin account credentials.
                            Randy/ Paul,
                            As of this morning I have noticed that I've had two issues where IP addresses have been blocked in my HS log:
                            Jan-14 6:45:00 AM Web Server IP Address 76.238.229.242 has been blocked from further access to the system.
                            Jan-14 6:45:00 AM Web Server Web Server login failed from: 76.238.229.242 User: admin
                            Jan-14 6:45:00 AM Web Server Web Server login failed from: 76.238.229.242 User: admin
                            Jan-14 6:44:59 AM Web Server Web Server login failed from: 76.238.229.242 User: admin
                            Jan-14 6:44:59 AM Web Server Web Server login failed from: 76.238.229.242 User:
                            Jan-14 6:44:59 AM Web Server Web Server login failed from: 76.238.229.242 User: admin
                            Jan-14 6:44:59 AM Web Server Web Server login failed from: 76.238.229.242 User: admin
                            Jan-14 6:44:59 AM Web Server Web Server login failed from: 76.238.229.242 User: admin
                            Jan-14 8:07:20 AM Web Server IP Address 47.75.177.95 has been blocked from further access to the system.
                            Jan-14 8:07:16 AM Web Server Got data but was not PUT or GET, from: 47.75.177.95 Data: PROPFIND / HTTP/1.1
                            The only recent change that I've made is a change to my port forwarding when using the http://[ddns domain name]:[external port]/phl2api?dtype=GF to 80 and I'm wondering if that caused the issue? If so, you have any recommendations of what I can do to better protect my Hometroller? I assume there is a way to change the default port to something else? If so, once I change it what else has to be changed? Anything affect MyHS?
                            Last edited by randy; January 14, 2019, 09:20 PM. Reason: corrected URL
                            HS4 4.2.6.0 &HSTouch Designer 3.0.80
                            Plugin's:
                            BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
                            EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
                            weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

                            Comment


                              Originally posted by The Profit View Post

                              The only recent change that I've made is a change to my port forwarding when using the http://[ddns domain name]:[external port]/phl2api?dtype=GF to 80 and I'm wondering if that caused the issue? If so, you have any recommendations of what I can do to better protect my Hometroller? I assume there is a way to change the default port to something else? If so, once I change it what else has to be changed? Anything affect MyHS?
                              The port should be the same as what your HS server is on. I use a different external for PHLocation/Geofency and forward to port 80 on the inside. Since Geofency now talks directly to the HS server, did you create an account on the HS server for Geofency? With PHLocation1 it used a separate web server/account.
                              HS 4.2.8.0: 2134 Devices 1252 Events
                              Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                              Comment


                                Originally posted by sparkman View Post

                                The port should be the same as what your HS server is on. I use a different external for PHLocation/Geofency and forward to port 80 on the inside. Since Geofency now talks directly to the HS server, did you create an account on the HS server for Geofency? With PHLocation1 it used a separate web server/account.
                                I’m looking at my “Web Server Settings” on the Network tab of HS and it is set to the default port. Should I change this port? If I do what else will it affect?

                                How do I create an account on the HS server for Geofency? With PHL1 I used it’s server and had setup a random port number that ddns forwarded Geofency to, with PHL2 I have set it up with port 80 and then created a forwarding rule in my router for port 80.

                                Sorry for the lack of know how with this....still learning...


                                Sent from my iPad using Tapatalk
                                HS4 4.2.6.0 &HSTouch Designer 3.0.80
                                Plugin's:
                                BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
                                EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
                                weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

                                Comment

                                Working...
                                X