GeoFancy GeoFencing Home Automation Integration

GeoFancy (GeoFencing & iBeacon)

Login or Register to see price!


This is Home Automation at its best!  GeoFancy is a free iOS Application that can be configured to send custom notifications when a device enters or leaves specific “GeoFences” (which is essentially a bubble around a given address).  With the GeoFancy Dash App you will be able to have your systems trigger macros whenever a specific device leaves or enters the given coordinates.


Sold by: Dash OS
SKU: locative-geofencing. Category: .

Product Description

What is a GeoFence?


A GeoFence is a virtual barrier that surrounds a specific GPS Location (such as an Address or GPS Coordinates).  Should the Barrier be crossed by a device that is capable of processing GeoFence it can trigger actions based on the events that have occurred.  For example, if the device was inside the barrier and crosses to the outside, an event can be triggered for “Device is Leaving the vicinity.”

For any Home Automation Platform to provide meaningful Automation Solutions, it needs to be capable of processing environmental data on many levels.  This may mean knowing the status of lighting, intelligently monitoring the temperature,  controlling & automating Garage Doors and Door Locks, or the many other things we all imagine when considering Home Automation.

GeoFencing through the GeoFancy Application provides another layer of intelligence & contextual awareness to your systems.  This Dash App provides extremely powerful functionality for your systems to know when your end-users are leaving or returning the location, as well as the general occupancy of the home.

With the GeoFancy Integration Dash App you can create one or many GeoFences for every device in the home and automatically trigger macros and query information about them when GeoFences are crossed.

Perhaps as your end-user gets 10 minutes from home you want the Lights to Turn On, the music to start playing lightly, and the HVAC to adjust to “Home” mode automatically.  When they are 1 minute from home you want to open the garage door after confirming they are who we expect them to be.

As your users leave the home, the GeoFancy Integration Dash App can process who has left, who is still present, and whether all programmed devices have been marked as “Away.”  This allows the home to intelligently enter various modes of hibernation, turn off specific users rooms automatically, the possibilities are endless!

Best of all, setup is extremely simple!  While many advanced features exist to make this Dash App one of the most powerful in the Dash Apps lineup, a simple GeoFence Setup can be accomplished in just a few minutes of programming!

Dash App Features
  • GeoFence Event Triggers – Trigger URC Macros when GeoFence Boundaries are crossed (separate “Coming” and “Leaving” options available).
  • Estimated Time of Arrival – Query a users Estimated Time of Arrival (including Traffic Conditions) in seconds after any GeoFence Event as they are “Coming” back to the project.
  • Multiple Users – Capable of handling multiple users & devices to increase the intelligence of the system accordingly.
  • User Status Query – Query the Current State of any device (Home, Away).
  • Multiple Location Events – Trigger GeoFence Events for multiple locations.  Triggers events when kids get to school (or leave it), when a user gets to their work (or leaves it), the choice is yours!
  • Security Built-In – With HTTP POST and Authentication controlled by you, it’s simple to build security protocols into the entire process to secure the actions that your events will trigger.

GeoFancy App with Integration by Dash OS

Available TCL Commands

  • (Query) GeoFence Event ID – Used to query in-depth information about GeoFence Events such as Seconds Until Arrival, Distance of the Event in Meters, Seconds Since Event Occurred, and more to come in the future.
  • (Query) Devices Occupancy – Query the current Occupancy of a Device on any given GeoFence that has been created.  You can query to see if the device is Present or Away as well as how many seconds since the Device changed to that status.
  • (Query) Locations Occupancy – When using the GeoFancy app on multiple devices, you can use this query to check if the location is occupied or not based on the status of all devices that have GeoFences programmed for that location.
  • (Query) Devices At or Away From Location – This query will return the alias and UUID of every device based on your selection.  For example, you can request all devices that are currently at “Home” and it may return “Mary,John,Jennifer” to your URC Variable.  You can then create IF/ELSE Statements that could say (IF myVariable includes “John”) to create customization based on who is and isn’t present.
  • (Query) All Currently Known Devices – Returns all currently known devices & aliases within the system.  Used by advanced programmers for error checking & self-healing purposes.
  • (Query) Seconds Since… – Various queries that allow you to retrieve the seconds since various events that have occurred.  For example, since a location become occupied or unoccupied or since the last GeoFence Event of any kind occurred.
  • (Setup) Map Device UUID to Alias – By default the “name” of your devices is a very long UUID Number.  By mapping those UUID’s to an Alias you can use the alias to create your TCL Commands & Device Events instead of having to always use the long UUID.

Available Device Events (Automated Macros)

  • Simple GeoFence Event – Program a Macro that will occur anytime any Device “Returns” or “Leaves” a GeoFence Boundary.
  • Advanced GeoFence Event – Program Macros that will occur based upon specific information received about any GeoFence Event(s).  For example, which location, which device, if the device is coming or going, and more.

Dash OS Cloud Logging

As is the case with all Dash Apps, GeoFancy Integration by Dash OS also includes advanced Cloud Logging capabilities that allow you to easily see what is going on within the programming and quickly troubleshooting & resolve issues while building your Geo-Location Automation.  In the screenshot below we see a device arriving to a location given the ID “Home” which triggers a Macro that queries data about the event.

Dash App Documentation Overview

This page will guide you through the installation, configuration, and programming of the specified Dash App.  You can navigate to various sections of the documentation by using the menu to the left.  New information is always being added to Dash’s Documentation so be sure to check back often to discover new ways to utilize your apps!

Download App:

Driver Location:

My > IP Database > AUX > Dash Apps > GeoFancy

Driver File:

Dash – GeoFancy.csd

Dash OS Update History

Whenever an update is available for a Dash App, a log of the major changes in the version will be provided below.  This does not necessarily reflect every change that was made as some minor changes may have been made that are undocumented, but it should reflect any changes that affect the operation of the Dash App.

Version 0.90

  • Initial Beta Release

Download & Import the Dash App

In order for the Dash App to become recognized by the URC Programming Software we will need to import the provided TCM File into the Software.  Once this has been done properly the Dash App should show up in the “Add Other Devices” programming step in the “Accelerator Location” provided on the overview tab.

Import TCM

In your Programming Software locate the “Import TCM Files” button in the File tab of the top menu toolbar.  Click it to open the Windows File Browsing window.  Browse to the TCM file you wish to import and select it.

Import Dialog

Based on the Dash App / Module you are importing, a dialog similar to the below will appear.  This window indicates what interfaces are supported by the TCM File you selected.  System Plugins may only show “Driver” and “Base Station Files” when no User Interface is provided by the module.

Restart

After Importing your TCM File it is always safe to quickly restart your Accelerator Software to make sure your changes are properly made.  While this isn’t required every time, it is a good step to make sure everything is changed as needed.

Confirm

Confirm that the Dash App was successfully imported.  You can do this by navigating to the driver where the Dash App is installed (see Overview Tab) and making sure a checkbox is provided for “8. Select 2-Way Modules for Network Remotes / Keypads”

Non URC Network Setup

The Port you define during this step is the port that will be used for your Server.  All commands should be sent to the configured port!

Network Setup is a step that is required regardless of if the module is communicating with a physical device.  This step will go over how your Network Setup should be configured for this Dash App.  You will generally find the Dash App under “Network Setup > Non URC Device” in your URC Program.

This Dash App does not require that a specific IP Address is setup for it to operate.  However, it should be assigned an “Instance ID.”  When a module does not require a specific IP Address be setup, you can assign any IP Address to the Dash App that is unique from any other device in the list.

Your IP Address will be used as an “Instance ID” which will separate it from any other Dash Apps or URC Modules you have setup.  This ID is helpful when you want to create jumps to the Dash App / Module in multiple rooms / areas of your programming.

In the example below we have added two Dash Apps, “System Monitor” and “Time Tools.”  Each has been given a unique value “0.0.0.1” and “0.0.0.2.”  If they were assigned the same value the Dash App would result in an error and would not start up properly.

Step 11. 3rd Party 2-Way Settings

Properly configuring the Dash App Parameters in your Automation Programming Software is important in order to make the App work as you want it to.  These Parameters will be used each time the App starts up to configure how the App will operate.  Below we will go over each available parameter.

At this time the Parameters are not in use.

Walkthroughs

Dash App Feature Tour / Walkthroughs

Welcome to the Dash App Feature Tour!   This page will go over the features available to you when using the Dash App within your Dash OS-powered systems.  These tours may include specific programming guides, file examples, drivers, or simply detailed explanations of the features listed on the Product Description tab.  Use the tabs to the left to select a feature that you would like to learn more about!  Enjoy!

These examples will require a basic understanding of TCL Commands and Device Events.

Configuring the Port Forwarding & DDNS for GeoFancy

In order for your GeoFence Events to be received by the URC Controller, you will need to setup Port Forwarding for a unique port (do not use the port that you have setup for Offsite Control).  You will also want to use a DDNS Service (you can use the Dash DDNS if you have it activated) so that the events will still work after your systems Public IP changes.

These examples will require a basic understanding of TCL Commands and Device Events.

Port Forwarding

By Default the GeoFancy Dash App will be listening on port 58521.  If you have not changed the port that will be used from this number then it is the port that will need to be forwarded to the URC Controller.  You should note that when setting up Port Forwarding you will need to set the URC Controller as DHCP Reservation or Static IP so that it is always available to receive events.

Should you want to define your own port number simply change the “Port” value in Non URC Device Network Settings.

TIP: You can always find the port you have programmed for that project by checking your GeoFancy Dash App Parameters.

Below you will find a screenshot of the Port Forwarding setup when using the Unifi Security Gateway as the primary router.  Most routers should have a similar interface for their port forwarding setup.

Dynamic DNS (DDNS)

When creating the URL that the GeoFancy App will call whenever a GeoFence is crossed you should always use a DDNS Service.  DDNS will translate a domain into the IP Address of the end-users Local Area Network.  Should the IP Address change, DDNS will be re-routed to the new IP without having to change settings within the GeoFancy App every time.

Dash OS already provides you with DDNS which can be setup in seconds or you can use any other DDNS Service you wish!  When using the Dash OS DDNS Service, you can always find the domain you have setup right on the project page.

If you only see the Public IP of the system here it would mean that the DDNS Service has not yet been setup.  You can setup DDNS by clicking on the “Project Menu” and selecting “DDNS” from the dropdown then following the instructions.

Mobile App: Create A GeoFence

Your first step with the GeoFancy Mobile App is going to be to create a GeoFence Event (or multiple).  This section will walk you through how to setup a GeoFence Event as well as giving you tips along the way.

Get the App
Overview

When you open the GeoFancy Application for the first time, you will be greeted by a screen such as the one above.  This is the “Create New GeoFence” screen allowing you to configure your first GeoFence.

Note: If this is not the first GeoFence you are creating you will use the “+” icon in the toolbar to create a new GeoFence in the future.

When creating your GeoFences you have quite a few options that GeoFancy has made available to you.  The given functionality makes this an extremely flexible & powerful solution for Home Automation.

When you first select to create a new GeoFence the application will attempt to use your mobile devices GPS to automatically generate a default GeoFence.  You may of course edit the settings as you wish.

GeoFence / iBeacon

GeoFancy is capable of working with any iBeacons that may be available as well.  iBeacon is a proximity-based technology that utilizes the power of Bluetooth 4.0 to provide some very powerful functionality.

This Walkthrough will discuss and go over the GeoFence option so make sure that is what you have selected for now.

Modify the Diameter

Next you will want to adjust the Diameter of your iBeacon.  You can see fairly accurately on the map where the iBeacon will be triggered from as you adjust the range.  At this time your GeoFences will always be circular at a set distance from the set location on the map.

Quick Tip: If you want to increase the diameter of your GeoFence past where the slider will allow you, first pinch on the map to zoom out, this will allow you to create a larger diameter spanning any distance you want!  Be careful though, a larger diameter means that it will be less accurate (they may not be coming home – rather just having got closer to the home).

It is highly recommended that you keep your GeoFences within a fairly close perimeter around the location you wish to monitor until you have used the solution enough to know how you can setup multiple locations to more accurately determine where your user is going in order to reduce false events!

Set the Location ID

Select the text input box for “Location” and set your Location ID.  You will be able to use the Location ID to differentiate specific events from each other when using multiple.

If you are going to be setting up multiple different devices with GeoFancy, make sure you use the exact same Location ID (Case Sensitive) when setting them up!

Set the HTTP Callback

Now it’s time to configure the most important part of your GeoFence Event.  Each time that the perimeter of the GeoFences you create is crossed, it will make one of the two calls you see in the image below.  You can see “Trigger on Arrival” and “Trigger on Departure” as options.

You will also notice that you can turn either one of the calls off for this Event if you only want it to send for one or the other.

To the left of the input field you will see “POST” or “GET.”  These can be changed by tapping on the area and selecting the HTTP Callout that you prefer to use.  While GET is a slightly simpler HTTP Call, POST is much more secure as it will not contain any sensitive information within the URL itself and is instead hidden in the “Body” of the message.

Unless you are having issues for some reason with the POST Method, I would stay with it and not use GET.

Once you have selected the HTTP Method you can select the text input to configure the URL that the App will call whenever the GeoFence Perimeter is crossed.

You can also configure this universally if the URL will always be the same (as likely is the case) in the “Settings” of the app.

In our examples we need to call the URC Controller that is on the homes network.  We have setup the Dash DDNS Service and are using that URL along with a port that we have forwarded to the URC Controller as shown in the Ubiquiti Unifi Screenshot below.

 

 

 

HTTP Basic Authentication

If you’d like to add a little bit of extra security to your GeoFence Events you can select to turn on HTTP Basic Authentication.  This will allow you to send a Login & Password with your Events that will be parsed and checked by the URC Controller before allowing the Event to trigger any custom automation.

Just tap the toggle to turn on the authentication and select the Login & Password you want to use.  When setting up your URC Device Events you will enter the Login & Password to accept – if they don’t match up, the event will be declined.

GeoFancy Application: Settings

This Walkthrough is Under Construction and should be available soon!

Get the App

my.GeoFancy.com Overview

This Walkthrough is Under Construction and should be available soon!

Get the App

Using & Setting Up Device Aliases

When working with multiple devices within a single system, it is highly recommended that you setup “Device Aliases” so that it becomes easier to specify which devices you want to query or create Device Event Macros for.  Device Aliases can be used in place of the UUID whenever you are asked to specify the “Device ID.

Device Aliases are also important because they allow the user to easily transfer to a new device all together while maintaining the programming.  If you hadn’t setup Aliases and the user got a new device you would need to reprogram all of the Event Macros & Queries that are specific to that users device (such as “Which Devices are Home” and “Trigger when ______ returns”).

In the guide below we will go over a few ways that you can map your Device’s UUID’s to an alias.  Keep in mind that each alias must be unique to a device!

These examples will require a basic understanding of TCL Commands and Device Events.

Method 1: URL Parameters

The fastest way to map a device to a specific alias is to use URL Parameters within the GeoFancy Event Calls.  This method doesn’t require you know the UUID of the Device in question.

However, there are times that using the TCL Command to Map UUID’s to an Alias are a better choice!  Make sure you read that part of the guide as well to make sure you are using the right method for your needs.

URL Parameters are formatted with a “?” followed by the name of the parameter, then “=”, then the value we want to define.

In our example, we are sending the events to http://dashbench.totaldash.com:58521 and our device should use the alias “Braden.”  To accomplish this, we will want to add the URL Parameters “?alias=Braden” to our HTTP Push Parameters.

You can see the screenshot provided to see how we have setup the GeoFancy HTTP Push Calls.

Method 2: TCL Command

The Second Method for creating an Alias is a bit more complex, but it does carry with it certain benefits.  The general idea is that you will send the TCL Command on startup to map a specific UUID to an alias.

Note: If you use Method 1 to create an alias it will always overwrite the alias that you have setup with this command.  This allows your user to change their device and maintain all programming by simply specifying the proper alias.

So Why Use This Method? This method should be utilized any time that you will be using the more advanced TCL Commands / Queries that are available such as “Query Locations Occupancy” or “Query Devices Occupancy.”

After each restart the GeoFancy Integration Dash App will not be aware of any devices existence.  It does not save any values through downloads & resets.  Because of this, some of your commands will fail until the first time a device reports in.  By using this method the Dash App will be aware of which devices it should expect to exist so that the responses to your various queries are as accurate as possible!

Note: Even after using this command, your commands may not return optimum responses until each of your devices have reported as at or away from each location!

In order to map a UUID to a specific Alias, we will want to send a macro that will create our aliases for us.  Should you have Device Event Triggers or Dash Access you can place your TCL Command within their System Startup Macros.

We will also need to know the UUID of the Device(s) we would like to create create alias(es) for.  Your Device UUID will be reported to your GeoFancy Dash App Parameters for the project but can also be found in multiple other ways.

Lets start by creating a TCL Command and selecting “Map Device UUID to Alias.”

Now we can simply place our Devices UUID’s into the UUID fields and the desired alias into the alias field.  As a convenience you can map up to 4 devices with each TCL Command.  If you need to map more than 4 devices you can create additional TCL Commands as needed.

That’s It!  When this command goes through the Devices will be able to be specified by using the Alias OR the UUID throughout your programming!

Seeing Programmed Aliases

Once you have programmed Device Aliases you can check your GeoFancy Dash App Parameters to see the aliases that are currently be used for each Device UUID.

Creating a Simple GeoFence Device Event Macro

Now that we have gone over GeoFancy’s iOS Application as well as the web interface, it’s finally time to setup our URC Device Events which will react to any events that GeoFancy sends to the URC Controller.

This guide will assume you have already added the GeoFancy Dash App to your project tree and configured it as described in the Documentation.  Navigate to the Macros section and click on the “Automation Macros” section to follow along below.

These examples will require a basic understanding of TCL Commands and Device Events.

Select your Device Event

Create a new Device Event Macro and select GeoFancy from the dropdown list.  If GeoFancy does not show up then it is most likely an issue that occurred while importing or adding the GeoFancy Module to your project tree.

This guide will go over the “Simple GeoFence Event” so make sure that is the Event that you have selected from the “Available Event” dropdown menu.

Fill in any “Name” that you want.  This is just for your own organization.  I always start with an identifier of the Module that the device event is for then a description of what the event is.  In this case we will use “G: Device Returns

Query ID

The Query ID is an optional parameter that is used to query for more information about the event in the future.  For more information on how to use this parameter you can select the “Query ID” Walkthrough using the navigation to the left.

Device Action

Next you will need to select the “Device Action” that you would like to trigger the macro from.  Whenever the Device either “Enters” or “Leaves” the GeoFence Boundary it will send data to the URL you have defined in the GeoFancy App.  Within the URL it will tell us whether the device is currently Leaving or Entering the perimeter.

As you can see above, you can select when you would like to trigger the event.  Since we named our Event “G: Device Returns” – we will be selecting Returns for this example.

All Done!

Yep, that’s all there is to the Simple GeoFence Event!  Now anytime any device from any location reports that it is returning, your Device Event will trigger the macro that you program here.

When using multiple devices or locations it is going to be important to use the “Advance GeoFence Events” so that you can specify different actions to take place based on which device or location is being sent to the URC Controller.

As always, if you have any questions join our HipChat Community Support and join the “GeoFancy” room to get your questions answered 24 hours a day!

Creating an Advanced GeoFence Device Event Macro

The real magic of the GeoFancy Events comes when you start to specify more parameters that must first be true before your macros will trigger.  This allows you to configure hundreds of ways that your events can be triggered for different scenarios.

For example, you may want to setup multiple locations and devices all triggering macros in different situations.  Perhaps you want a different macro to occur based on the device that is returning or leaving the location, or perhaps you just want to trigger a macro anytime any device leaves or returns to a specific location.  It’s all up to you with Advanced GeoFence Events!

This guide will assume you have already added the GeoFancy Dash App to your project tree and configured it as described in the Documentation.  Navigate to the Macros section and click on the “Automation Macros” section to follow along below.

These examples will require a basic understanding of TCL Commands and Device Events.

Select your Device Event

Create a new Device Event Macro and select GeoFancy from the dropdown list.  If GeoFancy does not show up then it is most likely an issue that occurred while importing or adding the GeoFancy Module to your project tree.

This guide will go over the “Advanced GeoFence Event” so make sure that is the Event that you have selected from the “Available Event” dropdown menu.

Fill in any “Name” that you want.  This is just for your own organization.  I always start with an identifier of the Module that the device event is for then a description of what the event is.  In this case we will use “G: Braden Returns Home

Query ID

The Query ID is an optional parameter that is used to query for more information about the event in the future.  For more information on how to use this parameter you can select the “Query ID” Walkthrough using the navigation to the left.

In this example we will use the Query ID “Braden Returns Home” so that we can query more information about this event in the future.

Device Action

Next you will need to select the “Device Action” that you would like to trigger the macro from.  Whenever the Device either “Returns” or “Leaves” the GeoFence Boundary it will send data to the URL you have defined in the GeoFancy App.

As you can see above, you can select when you would like to trigger the event.  Since we named our Event “G: Braden Returns Home” – we will be selecting Returns for this example.

Device ID (Optional)

Device ID is an optional parameter that allows you to specify a Device ID that will be required for the macro to trigger.  Your Device ID could be multiple things:

  • Device UUID: By default, your Device ID is the UUID of the Device in question.  If you haven’t assigned an alias to the device you will need to retrieve the UUID.  Your Devices UUID will be reported to your Dash App Parameters after the first time it reports in (see below).

  • Device Alias: If you have assigned an alias to the device you can use its alias to refer to it.  It is highly recommended that you setup aliases for all devices (see the walkthrough about using aliases for more information).  You can see the aliases mapped to your device(s) in Dash App Parameters along with the Device UUID (see below).

In the bottom example you can see that we have aliased the Device with UUID “ABEB46BB-0608-4E72-BA17-BD68518F1462” as “Braden.”  Both of those values are valid Device ID’s, however we recommend you always use aliases as the Device ID so we will fill in “Braden” for the Device ID field.  This means that only this device will trigger this macro so that we can program different automation to occur based on who’s device is crossing the GeoFence.

Location ID (Optional)

Location ID allows us to specify which GeoFence we want to create a macro for.  If we leave this empty it will not matter which location is sent to the controller and will always pass.

By default the Location ID will be a string that is long and resembles the UUID of your Device.  However, you can modify the ID that will be sent with the GeoFence you are setting up from within the GeoFence setup.  See the screenshot to the right where we are setting this GeoFence to use the ID “Home” for the Location ID.  This is what we will program into our Device Event Macro if we only want the macro to trigger if it is coming from this GeoFence.

Login & Password (Optional)

If you would like to secure your macro from triggering unless the user specifies a username & password, you can fill in the username & password that you would like to require on the second page of the Device Event Parameters.

It is recommended you always use authentication as a way of securing the system.  This is especially important if you are triggering sensitive macros!

When you setup your GeoFence you will need to enable Basic Authentication (as shown below) and type the login & password you specify within the Device Event Parameters or the Event Macro will not trigger.

 

All Done!

Yep, you’re done!  Now your Device Event Macro should trigger whenever all the filled in parameters are met!

As always, if you have any questions join our HipChat Community Support and join the “GeoFancy” room to get your questions answered 24 hours a day!

How to use the "Query ID" in URC Device Events & TCL Commands

Query ID’s can be used to retrieve further information about a GeoFence Event such as the seconds until the device should arrive home, the meters of the event, which device / alias triggered the event, and much more.  This guide will go over how it is used and will teach you how to use the TCL Commands to Query your Event.

These examples will require a basic understanding of TCL Commands and Device Events.

Create Your Query ID

Your Query ID is setup when creating a Device Event.  Data about the event will be saved using the ID you specify for later querying.  You can use the same Query ID for multiple events, but keep in mind that the data will be overwritten if you do so when future events occur.

In the example below we have setup an Advanced GeoFence Event that will have its data saved into the Query ID “Braden Returns Home

Create a TCL Command

Once your event has been triggered you can use the Query ID to get more information about the event.  We do this using “TCL Commands” and these queries can be put into any macro.  We will save the values into a URC Variable for later processing with URC IF/ELSE Statements.

There are a few commands which will use Query ID’s to give us information.  Some will save into URC Integer Variables while others will save into URC String Variables.

The two commands from the list of available commands that use Query ID’s are:

  • (Query) GeoFence Event Integers
  • (Query) GeoFence Event Strings

Choose Your Query

There are quite a few values you can query about the event, and we will add more as new ideas come up.  For the “Query ID” field we will want to put the Query ID we setup, in this case “Braden Returns Home.”

We will go over specific ways you can use the various queries in other/future guides.  In this example we will just choose “Estimated Seconds Until Arrival.”

Save The Response

Next you will want to “Save the Result” into a URC Variable of your choice.  You must have already created the variable you wish to use.  When using Integers you must have created a URC Integer Variable and for Strings you must have already created a URC String Variable.  

In our example we are querying the “Estimated Seconds Until Arrival” so we have created a URC Integer Variable called “Seconds Until Arrival” and will save the response to our query into that variable.

Use Cloud Logging

Cloud Logging will show you what the module is responding with so you can easily troubleshoot your programming.  In the example we have created, we can see Cloud Logging has reported that the Device should arrive home in 121 seconds.  In this case our URC Variable “Seconds Until Arrival” will now be “121”

Querying Devices Occupancy for a Location

Sometimes we may want to know if a specific person/device is currently at or away from the various locations we have setup.  This can be useful in generating Home Automation that changes dynamically based on who is or isn’t home.

There are also many other ways we can use this for features that extend past the Home Automation Systems.  For example, there may be a time we would want to query if someone is at Work still, or if the kids are in school.  In the following guide we will go over the basics of querying for a Devices Occupancy at the given Location ID.

Note: After a download or reset this query will respond with an error until the first time it sees the device in question enter/leave the GeoFence with the appropriate Location ID.  For example, it will not know that the Device “Braden” is home after a reset until that user leaves then comes back again.

Note: When you want to query whether or not multiple devices are at a location the TCL Command “(Query) Devices At or Away from Location” is likely more convenient.  That query will save all Devices that match your parameters into a string variable allowing you to use IF (INCLUDE) Statements.  However, it may not always be accurate as it does not report errors if you want to ensure the Dash App is aware of a specific devices existence.

These examples will require a basic understanding of TCL Commands and Device Events.

Create a TCL Command

The Command we are looking for within the TCL Command Setup is called “(Query) Devices Occupancy.” We will be querying if the Device that has been given the alias “Braden” is currently at the location with ID “Home

Note: All Location ID’s and Aliases are Case Sensitive.

You will notice that you query two different values for Occupancy.  With the first option the response to your variable will be the current occupancy state while the second option will respond with the seconds that the device has been at it’s current status.

In this example we are saving the response into the URC Integer Variable that we have named “Is Braden at Home?

Tip: Your Variable will become -1 if it does not know the current status.  It’s generally a good idea to use -1 as the starting value of your URC Integer Variable that you will be saving your value into.

Create Your Macros

Now that we have updated our variable with the most recent occupancy state of the Device with alias “Braden” we can begin to use it within our URC Macros as desired.  Below you will find an example of a macro that first queries the occupancy of our device then uses IF/ELSE Statements to react to the response.

You will notice we check against all 3 responses that should be possible.  In the example we are using the “TEXT” Command to outline where your programming should go based on the result.