by Clifford Yee
Version 1 (July 9, 2016)
Download (212 downloads)
Purpose: This automation is use to mute or unmute phone base on a geocode location. This will loop and run continuously.
Address are stored in path: Documents/automation/mute File names will contain address of where the phone should be unmuted.
File names can be anything but there are 3 special files that have a specific purpose:
home.txt ==> any home location.
fitness.txt ==> any gym location to mute phone and Unmute media.
readme.txt ==> a readme files.
File format:
123 main street, city, state zip
987 1st street, city2, state2 zip2
Tested On:
Nexus 6p
Known issues:
* USE AT YOUR OWN RISK AND STRONGLY RECOMMEND THAT YOU DO NOT CONFIGURE WHILE DRIVING.Â
* Checks and recheck maybe off on timing due to location/activity failure: In some situation, sound may still mute such as driving (ie, gps voice may mute) when activity is not detected. Timer delay and failed to dectect location may result in sound.
* There is an initial delay of 5 on run to allow time to get in car and go before initial check. Â Â
* V7 delay in recheck if location fails or too many check on leaving area.
* Some addresses will not decode coordinates which can result in the automation not working and stops.
* In location raduis check is 50m.
Out location is 2000 m if driving or 600 m for all others. May get stuck here due to timing
* If fail to detect location "too many" times or something unknown then automation may loop indefinitely and not mute/unmute phone. If this occurs then clear log and restart automation. If this fails then reboot device and retry.
* Other errors not known yet.
Change log:
V8 attempt to make out of area check smarter. If car/bike activity then do not delay next recheck.
V7 not at listed location then get current location and check if we leave it.
Lower max gps age to 1 min.
V6 More optimization and cleanup some messages. Added ignore readme.txt file if it exist in path.
Separated car and bike activity. If car activity detected then will not check addresses.
If at location then monitor until out of area.
V5.5 checking special files (home.txt). Cannot handle multiple files. Added code to check for null line and null long/lat. Removed error block - does not seem to work.Â
V5 optimized monitor personal activity to determine delay on next check or some setting (is when driving music is not muted for GPS). Cleans up inefficiencies. Â Properly id personal activity values. Â
V4 personal activity check to determine delay. Without if/else cannot do this easily.Â
V3 added activity check, with power and acceleration. Media check does not work so switch to Bluetooth check. If Waze and Google maps detected then make sure Bluetooth and music audio on.
V2 added delay, acceleration and media playing check. Â Media playing does not seem to work (blocks still there but not connected). Headphone plugin check. Â
V1 initial release. Mute phone base on address location.