Announcement

Collapse
No announcement yet.

PHLocation ideas

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PHLocation ideas

    I was asked about some Events I use in PHLocation. I thought it would be a good idea to start a fresh thread so that we could all contribute our ideas. I'll start with some simple ones. Using a Fence around work and home we trigger based on entry and exit of those geofences. When My wife leaves work a GeoFency based trigger runs this Event. The first action speaks "mommie left work" over the Sonos speakers. We don't have children at home, but Riley (our Border terrier) responds to this and waits by the door. The second action writes a log entry that can be filtered on for any number of purposes. The third action will initiate a poll of her iCloud account to force an immediate update.

    Click image for larger version  Name:	PHL1.PNG Views:	1 Size:	41.5 KB ID:	1276301

    When she arrives home another similar event is triggered. This one announces that "mommie is home", writes to the log, forces an iCloud update and starts a timer.

    Click image for larger version  Name:	PHL2.PNG Views:	1 Size:	44.6 KB ID:	1276302

    When she gets home, the garage door is opened for her. This Event checks that she just arrived home, is in her car, that the door didn't just open and that it will only happen within 5 minutes of arrival. There is an iBeacon generated fence that lets the system know who is in which car. There is a virtual device to disable the auto garage door. There are pair of dual mode motion sensors aimed downward at the driveway. The driveway will be occupied if either of them go to Motion, but they only see the driveway. Because they are both PIR and MW, they do not false trigger. I had to trigger on both the driveway occupancy and the fence location in case one occurs before the other. The fence almost always reports first.

    Click image for larger version  Name:	PHL3.PNG Views:	1 Size:	91.1 KB ID:	1276303

    The above Events are duplicated for both of us.

    We also vary the polling rate on our iCloud accounts based on if we just entered or left a known location and by time. This was very important with our phones 3 years ago, to conserve battery life. It really is not an issue with the new phones, but I have left it in place. When we leave a location the iCloud accounts are polled at an increased frequency for up to an hour.

    Click image for larger version

Name:	PHL4.PNG
Views:	155
Size:	129.3 KB
ID:	1276432

    When we are at home or work, the polling is decreased to 45 minutes after we have been there for an hour.

    Click image for larger version  Name:	PHL5.PNG Views:	1 Size:	85.1 KB ID:	1276305

    Home Occupancy is determined by geofence. There are virtual devices for home/away for each of us. If we are away by both iPhone and Geofency, the virtual device is set to Away. If we are home by either iPhone or Geofency the device is set to Home.

    Click image for larger version  Name:	PHL7.PNG Views:	1 Size:	110.4 KB ID:	1276306

    Home occupancy is determined the same way, if either of us are home the house is Occupied, if both of us are away it is Away. This single Occupancy control has 4 modes.

    Click image for larger version  Name:	PHL8.PNG Views:	1 Size:	14.2 KB ID:	1276307

    Greater than Away are either Home Asleep or Home Awake. These Events control this

    Click image for larger version  Name:	PHL6.PNG Views:	1 Size:	108.9 KB ID:	1276308

    Maps are generated for each iPhone when a new location is triggered. We generate a daily history map for each phone. Its filename is determined by replacement variables such that each days map is replaced with a new one as new locations are entered, with a new map started each day. We also generate a current location map at the same time. This map always have the same name, so there will only be one copy - the most current. These maps are embedded in web pages for our family's use.

    Click image for larger version  Name:	PHL9.PNG Views:	1 Size:	55.4 KB ID:	1276309

    Here is an example of one of the history maps. Bear in mind that drilling down will not work properly because of Google API limitations, but it does work on our private websites.

    http://www.prades.net/map.html
    HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

    #2
    Firstly thank-you Randy for taking the time to educate/share. I would hope that other's will also share their solutions as I know "there's more than one way to skin a cat" I was hoping this thread would be similar to your other informational/educational threads else where but would address PHLocate particulars as this plugin has both complexities and intriguing solutions. Mike
    Computer: CUK Intel NUC7i7BNH
    Op System: Windows10 Pro - Work Station
    HS Version: HS4 Pro Edition 4.2.17.2

    Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

    Comment


      #3
      Randy, I see that you have script command to write to a log via
      Code:
      &nhs.WriteLog("Location","Fence - Michelle is Home ")
      where is this being written to ?
      Computer: CUK Intel NUC7i7BNH
      Op System: Windows10 Pro - Work Station
      HS Version: HS4 Pro Edition 4.2.17.2

      Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

      Comment


        #4
        Originally posted by MNB View Post
        Randy, I see that you have script command to write to a log via
        Code:
        &nhs.WriteLog("Location","Fence - Michelle is Home ")
        where is this being written to ?
        The HomeSeer log.
        HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Thanxs
          Computer: CUK Intel NUC7i7BNH
          Op System: Windows10 Pro - Work Station
          HS Version: HS4 Pro Edition 4.2.17.2

          Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

          Comment


            #6
            Randy, I'm looking at on of you event lines "AND IF user: Randy iPhone is not at: HOME." what command did you use for this item? Mike
            Computer: CUK Intel NUC7i7BNH
            Op System: Windows10 Pro - Work Station
            HS Version: HS4 Pro Edition 4.2.17.2

            Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

            Comment


              #7
              Originally posted by MNB View Post
              Randy, I'm looking at on of you event lines "AND IF user: Randy iPhone is not at: HOME." what command did you use for this item? Mike
              The only PHLocation2 Condition. Look at post #10 in the PHL2 discussion thread.

              https://forums.homeseer.com/forum/te...02#post1274702
              HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

              Comment


                #8
                Randy, thanxs… I was pulling my hair out, but to compound the issue I had also disable the PHL2 PI (trying to multiplex by installing update) which doesn't allow PHLocation2 command to be available in the drop down, alls well! problem muddled through. Mike
                Computer: CUK Intel NUC7i7BNH
                Op System: Windows10 Pro - Work Station
                HS Version: HS4 Pro Edition 4.2.17.2

                Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                Comment


                  #9
                  Randy I've finished studying your examples and have two more questions can help with what's going on in these two events. It looks like there is another event that is being called "Location Controls Increased Polling Rate" via Easy Trigger command.

                  In the second line where did "Location Michell - Decreased polling rate" come from? everything else I believe I understand. Mike
                  Attached Files
                  Computer: CUK Intel NUC7i7BNH
                  Op System: Windows10 Pro - Work Station
                  HS Version: HS4 Pro Edition 4.2.17.2

                  Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                  Comment


                    #10
                    Great. Now all I have to do is get an iPhone and clean out the garage. The dog part works fine.

                    JK of course, thanks again Randy for an excellent tutorial.

                    Comment


                      #11
                      Originally posted by MNB View Post
                      Randy I've finished studying your examples and have two more questions can help with what's going on in these two events. It looks like there is another event that is being called "Location Controls Increased Polling Rate" via Easy Trigger command.

                      In the second line where did "Location Michell - Decreased polling rate" come from? everything else I believe I understand. Mike
                      The first line sets the polling rate to a virtual device. I use the virtual device to set the increased polling rate. Currently it is at 1 minute. I also use a virtual device for decreased polling rate. The event that does that is called in the third line. The second line cancels the delayed event if we enter or exit a fence before the 1 hour delay was up. I have to use a delayed Event, because an Easy Trigger Action cannot be delayed. The delayed Event sets the polling rate to the other virtual device. The polling rate is also reduced when we are more than 25 miles from home or if the batteries are below 60%. It is always reduced to 45 minutes at a known location. As I wrote above, this is no longer a big issue. It is at the end of the day both of our phones still have an 85-90% charge.

                      Click image for larger version  Name:	PHL10.PNG Views:	1 Size:	26.1 KB ID:	1276430

                      Click image for larger version  Name:	PHL11.PNG Views:	1 Size:	31.7 KB ID:	1276431
                      HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        #12
                        As Randy has so well documented, we use PHL2 for similar events. We also use PHL2 along with the Blue Iris PI to Disable/Enable cameras based on where we are. In the future, when provided by the PI author, we’ll use Hide/Unhide so we can continue to record - it is a feature request being added.

                        Click image for larger version  Name:	508F4B85-D97F-44B7-928C-63ED73494E3F.png Views:	1 Size:	259.2 KB ID:	1276460

                        This event changes our camera displays. We don’t want to look at ourselves when at home.

                        Click image for larger version  Name:	C35825AF-DFC8-457B-A00B-94835F87B9E1.png Views:	1 Size:	176.3 KB ID:	1276461
                        Michael

                        Comment


                          #13
                          Randy
                          How are you setting up the virtual devices (decreased/increased) to contain/display the values are there events associated with them? Also what is the "Dynamic Interval" used for? Mike

                          HELP! - "The first line sets the polling rate to a virtual device. I use the virtual device to set the increased polling rate. Currently it is at 1 minute. I also use a virtual device for decreased polling rate." I'm not getting how you accomplished this.. I know PIA!




                          • Edit
                          • Quote
                          • F


                          Computer: CUK Intel NUC7i7BNH
                          Op System: Windows10 Pro - Work Station
                          HS Version: HS4 Pro Edition 4.2.17.2

                          Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                          Comment


                            #14
                            The Dynamic Interval device is to control whether the polling varies or not. If it is Off, the Events to increase or decrease polling intervals are disabled. The polling remains at the "Default" which is currently my decreased polling interval device value. The Virtual Devices mimic the settings of the iCloud account Interval devices. The Easy Trigger action sets the PHL2 interval device to the Virtual Device.

                            I actually have a number of Virtual Devices to control iCloud polling. The rapid location updates devices can be used to poll the devices even faster than the 1 minute available on the interval device. They cause the account to poll once every 20 seconds. As you can see from the last change dates, I haven't used those since 2017. Once a minute is fast enough for any purpose other than to simulate a "real time" driving map. I will probably be deleting them and the Events.

                            Click image for larger version  Name:	PHL20.png Views:	1 Size:	68.2 KB ID:	1276726

                            Click image for larger version  Name:	PHL17.png Views:	1 Size:	76.4 KB ID:	1276722

                            Click image for larger version  Name:	PHL18.png Views:	1 Size:	95.1 KB ID:	1276723
                            HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

                            Comment


                              #15
                              Thanxs Randy for the tutorial, I would not have figured this out any time soon...
                              Computer: CUK Intel NUC7i7BNH
                              Op System: Windows10 Pro - Work Station
                              HS Version: HS4 Pro Edition 4.2.17.2

                              Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                              Comment

                              Working...
                              X