No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts


    This is another Google Latitude script, inspired by wpiman's getPosition script. This script creates a hs device that lists in it's string all of the defined users, and their distance from a set lat/long (i.e., home). The status of the device reflects the occupancy status of the location -- "House Unoccupied" (3), "House Occupied" (4) and "Everybody Home" (2). The script also creates a hs device for every defined user and sets its status as "Home" (2), "Near"" (4) or "Away" (3). All users will need Google Latitude badges. All devices can be used to trigger hs events on status change.

    It will be obvious where to put the user's names and the Google latitude badges. The base hs device HC/DC can also be set, as well as the home latitude and longitude, which you can get from Google maps. Set "debugFlag" to 1 to get an information report in your log about the location of each user.

    I run the script as a recurring event every 2 minutes. You will need Google Latitude mobile installed on each user's mobile device to provide the position reports.

    Future versions may have the script trigger itself, so that the trigger interval can be varied based on how long the users have been in one place or by time of day (i.e., trigger only every 5 or ten minutes during the night)

    Thanks to wpiman -- I lifted his code for the distance calculation.

    Attached Files

    I'm planning on integrating google Latitude into my HS setup. How is this script working these days?

    I'd like to be able to define certain places and have them be location statuses for different users. Ie, user 1 has work, school, work 2, etc. user 2 has work, school, work 2 etc (which would be different locations).

    I'd also like to be able do specify if the user is at, near, or far from any of those locations. Can this be done w/this script? (I've noticed two Latitude scripts on the board, so I'm posting this question to both).

    BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.