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.

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.

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.

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.

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

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.

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.

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

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.

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
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.
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.
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.
When we are at home or work, the polling is decreased to 45 minutes after we have been there for an hour.
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.
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.
Greater than Away are either Home Asleep or Home Awake. These Events control this
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.
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
Comment