Announcement

Collapse
No announcement yet.

PHLocation V2 Discussion

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

  • MNB
    replied
    Gaurave, I tried your extract and replaced the DSR with my Long/Lat device but something seems amiss I get to google map but I only see the Long value with a "no result found for your search which is obvious as it doesn't have the second value.. More clues please

    Randy, looking at both values (URL address and Log/Lat device) they seem to match so am I missing something, I will try using the URL also since I'm in the learning mode, Mike

    UPDATE: Using the URL address device produced a working Map which is good

    Leave a comment:


  • MNB
    replied
    Originally posted by dillalade View Post

    Extract of Message Body:
    Dad is <a href="http://maps.google.com/?q=$$DSR:XXX:,$$DSR:XXX:">Here</a>

    Where those DSR "values" return Longitude, Latitude.

    Within the Pushover message it appears in Blue highlight to depict a hyperlink (see Original Post above) - once clicked from within the Pushover message it opens up in Google Maps App on my droid. Beautifully.

    Thinking outside the box really comes into it's own with HS3 & these powerful Plugins.
    Gaurave, "U Da Man!" many thanxs for the comeback and education I occasionally use Pushover for a few events but I really liked your example which now makes me want to do a little more "Thinking outside the box" now that I have PHL2 up and running on all cylinder.. isn't kind of late your time? Mike

    Leave a comment:


  • dillalade
    replied
    Originally posted by rprade View Post
    You can also use the replacement variable for the “Address URL” child that PHL provides.
    I tried this but it's not as accurate as Long and Latitude in my tests, which is near enough pin point. I trialled with majority of the child values.

    Sent from my Phone 2 using Tapatalk

    Leave a comment:


  • rprade
    replied
    You can also use the replacement variable for the “Address URL” child that PHL provides.

    Leave a comment:


  • dillalade
    replied
    Originally posted by MNB View Post
    Gaurave, thanxs for sharing your example above, slow question within the message body how are you using to pull the current values for dad is Here and the remaining items I'm assuming your using $$DSR:XXX: values?

    I've confirm that it is in deed Replacement Values but in particular what does the Dad is Here highlight do? Mike



    Extract of Message Body:
    Dad is <a href="http://maps.google.com/?q=$$DSR:XXX:,$$DSR:XXX:">Here</a>

    Where those DSR "values" return Longitude, Latitude.

    Within the Pushover message it appears in Blue highlight to depict a hyperlink (see Original Post above) - once clicked from within the Pushover message it opens up in Google Maps App on my droid. Beautifully.

    Thinking outside the box really comes into it's own with HS3 & these powerful Plugins.

    Leave a comment:


  • MNB
    replied
    Gaurave, thanxs for sharing your example above, slow question within the message body how are you using to pull the current values for dad is Here and the remaining items I'm assuming your using $$DSR:XXX: values?

    I've confirm that it is in deed Replacement Values but in particular what does the Dad is Here highlight do? Mike

    Leave a comment:


  • dillalade
    replied
    Good morning from sunny England,

    Firstly I've been using HS3 for the passed 5 years, albeit for relatively novice situations.

    However the passed week I've stepped my game up severely.

    This plugin took me all over 24hours to read, comprehend, deploy, test & perfect across 3 devices/users.

    Wanted to use this for Home occupancy & more, it's doing the job well.

    Prior to this form of fencing I was using IFTT Location Fence to turn On/Off a Virtual Device in HS3 for my occupancy.

    I still have IFTT recipe invoked.

    With pushover messages from both Entered/Excited triggers for both PL2 & IFTT methods.

    This way over the next week or two I can perhaps determine if one method is faster then the other.

    So far in only my 24hours usage I can't say much other then IFTT seems to trigger it's action 5-10 seconds faster then PL2. This could be down to the polling interval I have set in PL2 which is set at 2minutes.

    Honestly though what a superb plugin.
    Moreso what a great write up in the user guide.

    Example of what I get sent to Pushover, when I ask Google Home to: "Turn on Dad's Location" which is a Virtual device...

    Which will invoke an Event to create a static image of his location and uses various PHLocation Values to provide a verbose of his status. As well as supply a HREF hyperlink html referencing the locatoion (which pulls up Google maps - niceeeeeee)
    The same details are Announced out aloud over my Google Home with her native tongue (using the amazing Chromecast plugin.)



    Leave a comment:


  • sooty
    replied
    Originally posted by MNB View Post

    I figure I would add the actual screen captures to show what I'm seeing. The first screen is when I select "All users" and the second screen is when I select "History". Mike
    I'm not 100% confident because it isn't an issue here but it could be the apostrophe in "Mike's iPhone X" that's causing it.
    Can you try removing the apostrophe from the root device's name, hit the Save Changes button and try running the map again.

    If it still doesn't work then can you:
    1. Try running a history map for Mike's iPhone X as per your screenshot 2.
    2. Note down the HS3 deviceRef (numerical value) for Mike's iPhone X.
    3. Got to \HS3\html\PHLocation2\Maps and look for a file named xxxx_history.html where xxxx is the numerical value from stage 2 above.

    If that file exists and the timestamp matches up with when you generated the map in stage 1, please zip up and email or pm me the file.

    If the file doesn't exist or has an old timestamp (e.g. from before you generated the map in stage 1 above) and there are no errors in the HS3 log then I will need to send you a debug version of the plug-in so we can try and establish the cause.

    Paul..

    Leave a comment:


  • MNB
    replied
    Another Map question when I use PHL2 Map and I select "All Users" I get a map of my current location when I select "History" I get a blue text "Showing history for Mike's iPhoneX (26 points)'" but the previous map is replaced with a white map area, I was expecting the previous map with 26 bread crumb being displayed what am I missing? Mike
    I figure I would add the actual screen captures to show what I'm seeing. The first screen is when I select "All users" and the second screen is when I select "History". Mike
    Attached Files

    Leave a comment:


  • MNB
    replied
    Originally posted by sooty View Post

    If its showing the blue text "26 points" then it should be displaying the map.

    1. Which dynamic map provider do you have set?
    2. On the Config>Mapping tab Dynamic Map (Built-In Viewer) Settings what is the Initial Max Zoom Level set to?

    Paul..
    Sorry for taking a few days to respond.. was out of commission with Flu. I attached a image of both my API and Mapping tab to answer your question. Mike

    Attached Files

    Leave a comment:


  • The Profit
    replied
    Originally posted by sooty View Post

    Can't be 100% but I'm pretty sure nothing has changed in that code since .49.

    The plug-in does not record the location on every poll, only if the location has changed.
    I'll check the code but the time at location device should only reset to 0 when a new location is recorded for that user.

    What I was initially suspecting is that during the night when your phone was polled, it returned a low accuracy position which was allowed through because of the >2000 metres setting. Obviously 2000m is more than 0.5 miles so it would have recorded it as a new location therefore resetting the time at location to 0. Some time later it received a high accuracy location that caused another update, hence resetting the time at location device again.
    If that were the case then it should have recorded both changes and you would see them in the history.

    In your case it appears that it took from 10:48am on the 3rd until 4:04am on the 4th to detect that you were at home. When you observed that the time at location was 8 minutes, was this at 4:12am?

    P.S. It would be good practice to set the max accuracy to less than the min dist to move to prevent the above scenario so if you have min dist to move at 0.5 miles then try setting the max accuracy to 750 metres.

    Paul..
    Ok, I have made a few changes:
    In the iPHone iCloud Device
    1) Set Minimum Distance to Move from .5 mi to .25 miles
    2) Set Ignore locations with accuracy > 400 metres
    In the Known Locations
    1) Set Home & Work Radius from .5 miles to .25 miles

    We’ll see how that goes for the next 24 hours or so.

    Thank you for your help!


    Sent from my iPad using Tapatalk

    Leave a comment:


  • sooty
    replied
    Originally posted by The Profit View Post

    The setting for "Ignore location with accuracy >" is 2000 meters.

    I looked in the Plug-Ins>PHL2>History Viewer and selected my iPhone with a durration of 48 hours, there are only 14 entries over that time period which I thought was a little strange. I have it polled every 5 minutes.

    There is an entry on Feb. 3rd at 10:48am that is at an address away from home and then the next entry is on Feb. 4th at 4:04am at my home address then the next two entries show two polls on my way to work. (takes 10 min to get to work)

    So it never logged me at home until 17 hours later? I don't have any PHL2 errors in the HS log.

    P.S. - I'm on version .49 so if this is something that you have corrected in a later version, maybe that's my issue?
    Can't be 100% but I'm pretty sure nothing has changed in that code since .49.

    The plug-in does not record the location on every poll, only if the location has changed.
    I'll check the code but the time at location device should only reset to 0 when a new location is recorded for that user.

    What I was initially suspecting is that during the night when your phone was polled, it returned a low accuracy position which was allowed through because of the >2000 metres setting. Obviously 2000m is more than 0.5 miles so it would have recorded it as a new location therefore resetting the time at location to 0. Some time later it received a high accuracy location that caused another update, hence resetting the time at location device again.
    If that were the case then it should have recorded both changes and you would see them in the history.

    In your case it appears that it took from 10:48am on the 3rd until 4:04am on the 4th to detect that you were at home. When you observed that the time at location was 8 minutes, was this at 4:12am?

    P.S. It would be good practice to set the max accuracy to less than the min dist to move to prevent the above scenario so if you have min dist to move at 0.5 miles then try setting the max accuracy to 750 metres.

    Paul..

    Leave a comment:


  • The Profit
    replied
    Originally posted by sooty View Post

    Maybe your phone is jumping between cell / GPS / WiFi locations.

    What setting do you have for Ignore locations with accuracy > on the user device?
    Have a look on the history page and see if there are any locations recorded through the night with a high accuracy that would put you more than 0.5 mi from home.

    Paul..
    The setting for "Ignore location with accuracy >" is 2000 meters.

    I looked in the Plug-Ins>PHL2>History Viewer and selected my iPhone with a durration of 48 hours, there are only 14 entries over that time period which I thought was a little strange. I have it polled every 5 minutes.

    There is an entry on Feb. 3rd at 10:48am that is at an address away from home and then the next entry is on Feb. 4th at 4:04am at my home address then the next two entries show two polls on my way to work. (takes 10 min to get to work)

    So it never logged me at home until 17 hours later? I don't have any PHL2 errors in the HS log.

    P.S. - I'm on version .49 so if this is something that you have corrected in a later version, maybe that's my issue?

    Leave a comment:


  • sooty
    replied
    Originally posted by MNB View Post
    Another Map question when I use PHL2 Map and I select "All Users" I get a map of my current location when I select "History" I get a blue text "Showing history for Mike's iPhoneX (26 points)'" but the previous map is replaced with a white map area, I was expecting the previous map with 26 bread crumb being displayed what am I missing? Mike
    If its showing the blue text "26 points" then it should be displaying the map.

    1. Which dynamic map provider do you have set?
    2. On the Config>Mapping tab Dynamic Map (Built-In Viewer) Settings what is the Initial Max Zoom Level set to?

    Paul..

    Leave a comment:


  • sooty
    replied
    Originally posted by MNB View Post

    Yes you've made it more clearer, based on what you've said I should normally use the checkbox to "Include on All Users Map" within the User / Device and use the Configuration>Mapping tab settings for both static and dynamic maps unless I'm looking for a User / Device usage type map
    Clear as mud, I know. I'll try and do a proper explanation in the user guide.

    Whenever a "position based" user/device gets a new location it causes an internal trigger within the plug-in which looks to see if the (Build a new map when location changes) flag is set for that user. This is done for both static and dynamic types.
    If those flags are set then it will generate maps based on the settings on the PHL2 tab for that user.

    Next, it will then check to see if the (Include this device on the All Users map) flag is set for either map type for that user. If it is, then it will cause the "All Users" maps to be updated. When this happens it will look through all other "position based" users that have the flag set and get their locations, then regenerate the maps.
    The settings it uses for the (All Users) maps, with the exception of the marker character and marker colour are taken from the Config>Mapping options because they are not specific to any user.

    In addition you can generate both types of maps whenever you want using the plug-in event actions. Each event action has it's own settings with the exception of the marker character and color which is user specific.

    Paul..

    Leave a comment:

Working...
X