Announcement

Collapse
No announcement yet.

PHLocation V2 Discussion

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

  • sooty
    replied
    Originally posted by w.vuyk View Post

    Randy,

    Paul indeed pointed me to this option. I had it set in the old version and just copied it over while setting the icloud options. Disabling the option immediatly enabled picking a device for me. But as you described my ipad is still in the list, also on the old version. But if I understood Paul correctly, it will no longer scan its position and other (new) devices will not be added to this list, nor scanned for position?

    Wim
    When an iCloud account is polled with (Ignore Unknown Devices) OFF, any discovered devices that are NOT already included in the plug-in are added to an internal list of (Heard Devices). The drop down device selector on the iDevice PHL2 tab within an iDevice type is populated from this (Heard Devices) list.

    When a device is selected from the list and the Save Changes button is clicked, that device will be removed from the (Heard List) and added to the (Known List).

    With (Ignore Unknown Devices) ON, any devices returned in the poll that are NOT in the (Known List) will be ignored.

    The (Heard List) is only cleared at plug-in start-up so, even with (Ignore Unknown Devices) ON, devices will remain in the list until either they are added as iDevices or the plug-in is re-started.

    To try and explain how the polling of an iCloud account works.
    1. The plug-in logs into your your iCloud account and asks for information. This is done at ACCOUNT level NOT at DEVICE level.
    2. iCloud reaches out to each device registered on the account to get up to date information from that device.
    3. iCloud returns information for ALL devices registered to the account back to the plug-in.
    The returned information contains lots of data which includes device related data like battery level, charging state etc in addition to location information.
    4. The plug-in processes the data for each device.

    Given the above above sequence of events:
    If for example the user has an iMac on their account that spends much of it's time switched off and never moves from the office, then when iCloud reaches out to that device (stage 2 above) and it is switched OFF it will return an "Off-Line" status and depending if location services are enabled on that device may return nothing for the location or data that is outdated.

    When iCloud reaches out (stage 2 above) to say an iPhone, even if the iPhone is ON and connected to the internet, it can take some time for it to respond with the latest info. e.g. it is trying to get a location fix. It may also be temporarily disconnected from the internet for some reason so could return an Off-Line status.

    When the plug-in processes the returned data (stage 4 above) and sees that a device is Off-Line or has "Outdated Location Data" then this could just be because the device is still obtaining a location fix or just wasn't reachable at the time iCloud requested info from it.

    I won't go into all the details here but the plug-in uses various logic based on the returned data to decide if to re-poll the account. It will re-poll up to 6 times if necessary within a single polling interval before giving up and waiting for the next polling interval.

    So, onto the point:
    When the (Ignore Unknown Devices) option is ON, it won't use data from any devices that are not in the (Known List) to decide if to re-poll.
    This significantly speeds up the polling process on accounts that have multiple devices when some of those devices are not required in the plug-in.
    In cases when there are devices that are frequently unreachable (e.g. iMac that is switched off 90% of the time) then if these are not included in the plug-in and (Ignore Unknown Devices) option is ON then it will also improve battery life on the remaining devices as they don't have to be constantly re-polled because some other device on the account isn't responding.

    Paul..



    Leave a comment:


  • w.vuyk
    replied
    Originally posted by rprade View Post
    I was just reviewing Paul's first draft of the operator's guide and one thing occurred to me. On the iCloud account management page if you have "Ignore Unknown Devices" checked, it may not present the option to add new devices. While that is not the way I thought it would work, I have never tested to see. Mine still offers me the ability to add a new user/device with that box checked.


    Click image for larger version Name:	ServiceAccount_Icloud.jpg Views:	1 Size:	46.1 KB ID:	1279516
    From the manual;

    Ignore Unknown Devices

    DO NOT enable this option until you have added all the User devices that you want included in the plug-in as this option will prevent new devices being discovered.

    A single iCloud account may have many devices registered to it but you may only want to monitor some of them in the plug-in. Once all required devices have been added, enabling this option allows the plug-in to ignore the state of the non-included devices which speeds up the polling process considerably for accounts with multiple devices where only some of those devices are included in the plug-in.
    Randy,

    Paul indeed pointed me to this option. I had it set in the old version and just copied it over while setting the icloud options. Disabling the option immediatly enabled picking a device for me. But as you described my ipad is still in the list, also on the old version. But if I understood Paul correctly, it will no longer scan its position and other (new) devices will not be added to this list, nor scanned for position?

    Wim

    Leave a comment:


  • Skinnez
    replied
    Originally posted by sooty View Post

    The db format is different in V2, but I can look into putting together a script to convert and move it over.

    Paul..
    Thought they’d be different. No mad rush for it, I know you’ll be busy with this so when you get round to it. I’ll keep the db to one side.

    Cheers

    J

    Leave a comment:


  • sooty
    replied
    I've just uploaded .49
    See release notes post for details and added a 1st version of the user guide.

    Paul..

    Leave a comment:


  • sooty
    replied
    Originally posted by Skinnez View Post
    Just installed this last night. Excellent work as always. One question I have, are the database files the same format, I have a lot of years worth of data I would like to move over?

    Cheers

    J
    The db format is different in V2, but I can look into putting together a script to convert and move it over.

    Paul..

    Leave a comment:


  • Skinnez
    replied
    Just installed this last night. Excellent work as always. One question I have, are the database files the same format, I have a lot of years worth of data I would like to move over?

    Cheers

    J

    Leave a comment:


  • Spudjr
    replied
    Trying to change the polling time based on the time of day. I.E. reduce the polling time from 1 min to 60 minutes after 7:00 pm then increase it after 7:00 A.M. back to every minute. I'm sure it can be done but havent figure it out. Been playing with different stuff with 2 events but so far not successful. Any pointers from the experts. Thanks

    Leave a comment:


  • rprade
    replied
    Originally posted by w.vuyk View Post
    I must be missing something obvious here. I have added my icloud account. Now I am trying to understand where to add the iphones. I have been looking in the users/devices, no iphone users to be added. Then I saw a post mentioning you have to go to "the root device". When I go to the icloud account root device, no drop down. I have been waiting for more then an hour now, and see the account status change from Waiting to Polling regulary, so it seems all is working, but how to add the phones?

    Wim
    I was just reviewing Paul's first draft of the operator's guide and one thing occurred to me. On the iCloud account management page if you have "Ignore Unknown Devices" checked, it may not present the option to add new devices. While that is not the way I thought it would work, I have never tested to see. Mine still offers me the ability to add a new user/device with that box checked.


    Click image for larger version  Name:	ServiceAccount_Icloud.jpg Views:	1 Size:	46.1 KB ID:	1279516
    From the manual;

    Ignore Unknown Devices

    DO NOT enable this option until you have added all the User devices that you want included in the plug-in as this option will prevent new devices being discovered.

    A single iCloud account may have many devices registered to it but you may only want to monitor some of them in the plug-in. Once all required devices have been added, enabling this option allows the plug-in to ignore the state of the non-included devices which speeds up the polling process considerably for accounts with multiple devices where only some of those devices are included in the plug-in.

    Leave a comment:


  • sooty
    replied
    Originally posted by rprade View Post
    I don't think this should be necessary. I would prefer any fix, whether in the history report ot on a history map have the timestamp of when it was last acquired. It really doesn't matter to me if the date stamp of the starting point is from the day before. Other than the situation described below there is really no way for the plug-in to know when you actually start a day, only the time and date of the first position acquisition after you first start moving that day.
    I know we discussed this time thing during development Randy.
    You're quite right about the start time in that using location fixes only, there is no way to know at what time a trip actually started.

    The potential issue I see is with the end time but I'll need to go over the code for this on Sunday (busy tomorrow).
    Can't just remember off the top of my head how I did it but I put code in there to detect if a device had stopped moving.
    This was done so that it could override the min dist to move when the device had stopped.

    e.g.
    User has the min dist to move set at 0.2 miles.
    10:10:00 Position update happens to come in and is saved when device is 0.1 miles from home.
    10:15:00 Another position update comes in and device is now at home and stopped.
    With the 10:15:00 update the device has not moved more that the 0.2 mile min dist to move so point is not stored and plug-in incorrectly shows user 0.1 miles from where they actually are with a time stamp in the db of 10:10:00.

    Currently when the 10:15:00 update comes in and the plug-in detects that the user has stopped, it will delete the 10:10:00 point and replace it with the 10:15:00 one although I can't just remember the criteria I used to do this.

    What I noticed in my testing a couple of day ago is that if the update interval is long (say 10 minutes) it can sometimes take 2 or 3 updates for it to detect that the user has stopped. In the above example, if it took 3 updates for it to detect "Stopped" then it will replace the 10:10:00 point with one timed at 10:40:00 which is quite a way off what it would actually have been.

    Of course it would not be correct to use the 10:10:10 time either but I could maybe use the time from the 1st fix that comes in after the 10:10:00.

    I'll give it some more thought over the weekend.

    Paul..

    Leave a comment:


  • rprade
    replied
    Originally posted by sooty View Post

    To add to Randy's post.

    Yes, S=start E=end.

    To establish the start point for a trip, it uses the stored point immediately proceeding the time span start time.
    As an example you returned home at 6pm one evening (day 1), then left again at 7am the following day (day 2) with your first point on day 2 being recorded at 7:05 am 4 miles from home.
    You choose a map span of 2 hours from 7am to 9am on day 2.
    Disregarding dates and times. To map this correctly it uses the 6pm point from the previous day as the start point.

    As I see it there is not an easy solution without knowing the exact start / stop time of a trip. A possible solution is to have it use the start date time of the chosen time span.
    I don't think this should be necessary. I would prefer any fix, whether in the history report ot on a history map have the timestamp of when it was last acquired. It really doesn't matter to me if the date stamp of the starting point is from the day before. Other than the situation described below there is really no way for the plug-in to know when you actually start a day, only the time and date of the first position acquisition after you first start moving that day.

    In the case of my vehicle tracking units this issue can be negated because they send ignition on/off messages which can be used to detect the start / end of a trip.

    WRT end times.
    I won't go into all the detail but under certain circumstances the plug-in replaces the last recorded point when a new position comes in (if the user is in the same location) as opposed to adding a new point. The problem with this is that it also replaces the date/time hence the confusion.

    I'll change this so the date time is not replaced.

    Paul..

    Leave a comment:


  • dibble9012
    replied
    Files sent via PM

    Leave a comment:


  • w.vuyk
    replied
    Log has been send

    Thanks,

    Wim

    Leave a comment:


  • sooty
    replied
    Originally posted by w.vuyk View Post

    Do I have to stop the old plugin maybe to be sure there is only one Icloud service active? In the old plugin I can see devices selectable, But I have the new version running for almost a day, no errors, but no selectible iDevice in the list of users yet here.
    No, the 2 plug-ins can run at the same time.

    Go to the plug-in general config and set debug to file ON.
    Hit the poll button for your iCloud account.
    Switch OFF debug to file and then drop me the log file contents in an email.

    Paul..

    Leave a comment:


  • w.vuyk
    replied
    Originally posted by rprade View Post
    iCloud users are setup on the drop down under users/devices. It does take a few minutes after activating the account before iCloud shows up on the list.
    Do I have to stop the old plugin maybe to be sure there is only one Icloud service active? In the old plugin I can see devices selectable, But I have the new version running for almost a day, no errors, but no selectible iDevice in the list of users yet here.
    Attached Files

    Leave a comment:


  • sooty
    replied
    Originally posted by dibble9012 View Post
    For now, I've created the following event to fix polling, and I think it's working. I'll see when I go to work tomorrow.


    You shouldn't need events, it should be doing the polling within the plug-in.

    Can you:
    Set the polling interval on the problem account to 1 minute.
    Disable then re-enable the plug-in, then in the HS3 log you will see a bunch of entries from the plug-in start-up. The ones I'm interested in are contained between the 2 messages (Startup) Begins at.... and (Startup) Finished at....

    Once the plug-in is started, go to the general config file and set debug to file ON.
    Wait at least 2 minutes, then switch off the debug to file option.

    Send me the HS3 log messages and the log file in a PM or email and I'll investigate.

    Paul..

    Leave a comment:

Working...
X