Announcement

Collapse
No announcement yet.

PHLocation V2 Discussion

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

    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

    Comment


      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

      Comment


        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..

        Comment


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

          Paul..

          Comment


            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

            Comment


              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
              -- Wim

              Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

              1210 devices/features ---- 392 events ----- 40 scripts

              Comment


                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..



                Comment


                  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
                  Yes, that is how I understand it. With that selected, any iOS devices that are not added to the plug-in will be skipped during polling.
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    I installed .49 and went straight for the user guide. Thank you! Now, is there any advantage to using both Geofence and Tracking? I'm lost here because there are three
                    places to enter the connected2 URL in a EGZ server profile.

                    1. URL FHEM Geofancy
                    or
                    2.URL zone entered
                    URL zone exited

                    then further down there is
                    3. URL zone for tracking

                    Do I put the first one in FHEM and the second one in spot #3 OR do I create another server profile>
                    https://connected2.homeseer.com/phl2api?dtype=EG&
                    https://connected2.homeseer.com/phl2api?dtype=ET&androidid=${androidId}&lat=${realLatitude}&lon=${realLongitu de}&acc=${accuracy}&date=${localLocationDate}&phlid=1234

                    Comment


                      Originally posted by racerfern View Post
                      I installed .49 and went straight for the user guide. Thank you! Now, is there any advantage to using both Geofence and Tracking? I'm lost here because there are three
                      places to enter the connected2 URL in a EGZ server profile.

                      1. URL FHEM Geofancy
                      or
                      2.URL zone entered
                      URL zone exited

                      then further down there is
                      3. URL zone for tracking

                      Do I put the first one in FHEM and the second one in spot #3 OR do I create another server profile>
                      https://connected2.homeseer.com/phl2api?dtype=EG&
                      https://connected2.homeseer.com/phl2api?dtype=ET&androidid=${androidId}&lat=${realLatitude}&lon=${realLongitu de}&acc=${accuracy}&date=${localLocationDate}&phlid=1234
                      You only need 1 server profile to make it work.
                      The url ending in EG& goes in FHEM and the longer one goes in URL for tracking.

                      The ones for zone entry / exit are not needed with the plug-in but can be used when a different url needs to be called for each transition type.

                      Paul..

                      Comment


                        Originally posted by racerfern View Post
                        .....Is there any advantage to using both Geofence and Tracking?
                        These are two different use cases. Geofence will track the entry too and exit from known locations that you setup. Tracking will track and can also store the history of the current location of a device. So if my daughter says she going over to Emily's and then the library. I can see that she actually first went to the mall and then over to Ben's. If all you are interested in is GeoFences then don't put anything into the tracking URL.

                        HS3 SEL running Pro Edition 3.0.0.531 on Ubuntu 18.04, mono 5.20, 656 devices, 209 events.
                        Plug-Ins: Chromecast, Device History, EasyTrigger, Ecobee, JowiHue, LutronCaseta, MeiUnifi, PHLocation2, Pushover 3P, SDJ-Health, Sonos, WeatherFlow, weatherXML
                        Scripts: SparkMan's Lock Event, 5 of Jon00 scripts.

                        Comment


                          If all you are interested in is GeoFences then don't put anything into the tracking URL.
                          Actually, I "think" all I'm interested in is tracking since that will have timestamps.

                          Comment


                            Questions...

                            V2 removed Walking/Driving Distance... Why? I thought driving distance was useful.

                            Will you be posting in the HS3 Updater? Would make it so much easier for users to install/update.

                            thx for the fantastic work.

                            Comment


                              Originally posted by Ltek View Post
                              Questions...

                              V2 removed Walking/Driving Distance... Why? I thought driving distance was useful.

                              Will you be posting in the HS3 Updater? Would make it so much easier for users to install/update.

                              thx for the fantastic work.
                              V2 will remain a manual update until this early beta is finished. Paul hopes to get it into the updater when it is in full production. The first draft of the user manual was just completed yesterday. V2 has driving time and driving distance to Home. They were added around V42. If you created your position devices on an earlier version, go to the root and "Rebuild Child Devices" under the PHL tab.

                              Click image for larger version

Name:	Capture.PNG
Views:	94
Size:	22.3 KB
ID:	1280113

                              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                              Comment


                                thx, the online docs said no miles/mins just installed V2 .49

                                sooty ... one suggestion. It is very confusing to use name 'DeviceID' to mean both the Unique User ID (Fences) and HS3 Device (Tracking). Changing the UI (and docs) to name them differently might be good

                                Comment

                                Working...
                                X