Skip to main content

Lesson 2.8 - Standard Flows: Timers and Geofences

General timers are used to delay alarms. Like, if a door or window opens and isn’t closed again within a certain time, the alarm goes off. Same thing if the temperature passes a limit and doesn’t drop back down soon enough.

In this lesson, we’ll explore the standard flows. Since the Flow is not supported on the generic HTTP and MQTT integration it must be tried out with real device using a new connector such as LoraWAN. This put some constraints on especially the Geo Query flows since requires movement of the IoT nodes. There are some translators available that can be used to simulate movement of devices in and out of geofences but it is beyond the scope of this training.

Timers

To start using General Timers two items are required:

  1. The General Timer Flow: This is a special Flow that after translator service has executed checks if a timer should be started or not. If the timer expires the IoT node will get an update.
  2. The General Timer Translator or a customized variant of it: This is very similar to a normal Alarm Translator with built in alarm thresholds and hysteresis but instead of setting an alarm it controls the timer functionlality.

general timer flow

Common Use Cases

  • Garage doors that don’t close automatically like they’re supposed to.
  • People forgetting to shut doors or windows behind them
  • Levels that are allowed to temporaryily passed a threshold but needs to go back within a certain time.
  • Assets that are allowed to be inside or outside a geofence a certain time.
  • Check if assets are in use or not by starting a timer when no movement detected.

Setting one up is pretty easy:

General timer

  1. Change the Device Flow
    Set the flow of the device to general-timer., see flow for details.

  2. Add a general-timer translator
    Add it via the Translator menu in the device settings, or apply it to multiple devices using Select Many.

  3. Open Contextual Parameters
    Access contextual parameters either:

  4. Configure the General Timer Parameters
    Below is a breakdown of the available parameters:

ParameterDescription
timerTriggerFieldField to monitor as a trigger (e.g., door, motion, temperature)
timerDelayHow long (in milliseconds) the trigger must remain active before the timer expires
timerBooleanTriggerValueFor boolean fields—set this to true or false depending on your logic
timerHighTriggerLevelFor numeric fields—this is the upper threshold
timerLowTriggerLevelFor numeric fields—this is the lower threshold
timerTriggerHysteresisAdds hysteresis to avoid rapid toggling around the threshold

For instructions on how to create an Alarm Monitoring View, refer to the linked guide. Use the following fields:

  • timerStart – Indicates whether the timer has been started.
  • timerStartAt – The timestamp when the timer started. If no timer is running, this will be an empty string.
  • timerExpired – Indicates whether the timer has expired. This is the primary "alarm" field used to trigger alerts.

Use a suitable sensor, such as a Sensative Strip with a magnetic contact, to test the timer functionality.

  1. Set the trigger field to door and the timerBooleanTriggerValue to false.
  2. Configure the timerDelay to 30,000 ms (30 seconds), then open and close the door to observe how the timer behaves. The timer should reset if the door is closed before the delay period expires.

Geofences

To start using Geofences two items are minimum required:

  1. The General GeoQuery Flow: This is a special Flow that after translator service has executed checks if an IoT node is inside or outside geofences and if yes sends them an update event.
  2. Geofences with reference IoT nodes with either the General Geofence Translator or a customized variant of it.

Geofences are difficult to test in a short training session because they require physically moving assets. Use the following as a setup guide for a proof of concept (PoC) or full commercial installation instead of expecting to fully experiment during the lesson.

Typical use cases for geofences

Use CaseRequired TrackersGeofence PurposeBenefits
Airport Asset TrackingLoRaWAN or BLE trackersTerminals, gates, restricted areasTrack equipment and luggage carts; Prevent loss; Improve logistics
Hospital Asset TrackingBLE / NB-IoT trackersWards, operating rooms, equipment zonesMonitor critical equipment; Reduce misplacement; Improve response times
Railway Depot Asset TrackingLoRaWAN / GPS trackersTracks, maintenance yards, restricted zonesTrack rolling stock and tools; Prevent unauthorized movement; Improve efficiency
Warehouse Asset ManagementLoRaWAN or BLE trackersStorage zones, loading areasReal-time asset location; Zone-breach alerts; Optimize utilization
Personnel SafetyWearable BLE / NB-IoT trackersHazardous or restricted areasImmediate alerts; Compliance tracking; Reduce accidents
Fleet & Vehicle ManagementGPS-enabled LoRaWAN / NB-IoT trackersDepots, routes, restricted areasDetect route deviations; Unauthorized stop alerts; Improve efficiency
Smart Buildings / OfficesBLE / Wi-Fi badges or devicesOffices, meeting rooms, restricted areasAutomate HVAC/lighting; Occupancy analytics; Energy efficiency
Retail Customer TrackingBLE / Wi-Fi trackers in carts or appsEntrances, product sections, checkout areasTrigger offers; Track foot traffic; Optimize layout
Cold Chain MonitoringLoRaWAN / NB-IoT trackersCold rooms, refrigerated vehiclesMonitor asset movement; Trigger temperature alerts; Ensure compliance
Event Management / SecurityBLE / GPS trackersStages, backstage, entrancesTrack staff/equipment; Automate access; Reduce risks
Shipping / Port Asset TrackingLoRaWAN / GPS trackersDocks, container yards, restricted zonesReal-time cargo tracking; Prevent loss/theft; Optimize operations

Key Notes:

  • Geofences require trackers attached to assets, vehicles, or personnel.
  • Each geofence triggers events: enter, inside, and exit.
  • Events can be used to forward data, automate rules, or update dashboards.
  • Geofences improve operational efficiency, safety, security, and data-driven decision making.

Enabling Cloud-Supported Location Services

To enable a cloud-based location service for testing, add the translator enable-location-service to your device. This activates the default Traxmate connector (the URL https://lw.traxmate.io must be reachable).

When the platform receives an uplink containing valid GNSS, WiFi, or BLE data, it will request a location lookup through the service.

The General Geo Query Flow

The General Geo Query Flow works together with the Location Service—using GPS, Wi-Fi, or BLE data—to determine whether an IoT node is inside or outside a geofence. This query executes every time an IoT node (typically a tracker) reports a new location event.

Geofences can be both outdoor and indoor. Indoor geofences include a property called floorIndex, which maps to a specific floor level to help localize the tracker accurately.

general geo query flow

Enabling Geofence Capabilities

  1. Use General Geo Query Flows
    Assign the General Geo Query Flow to the IoT nodes that should participate in geofencing logic.

  2. Create Geofence Generic Nodes
    These nodes serve as reference points for geofences and help visualize how many trackers are within each one.
    Add the translator general-geofence to the geofence IoT nodes.

    General Geofence 2

  3. Create Geofences
    Define geofences directly on the map or through map widgets in dashboards that use geomapped floor plans. For details how to create a Geofence see Lesson 1.5 — The Map and Map Views Use the _id of the generic geofence node as the reference node in each geofence.

  4. Enable Indoor Localization (Optional)
    For indoor localization, Combain is the recommended provider.
    To improve accuracy and distinguish between floors, a Combain AI Indoor Survey must be performed.
    This survey maps Wi-Fi routers and BLE beacons’ RSSI levels for triangulation using the Combain mobile app.

    Combain Indoor

    Steps for a Combain trial:

    • Request a Combain account from your technical support contact.
    • Log in to the Combain Indoor Portal.
    • Create a new Place and choose it to be of the type Building in the portal and ensure Combain correctly recognizes the layout. If not, redo the process until it does.
    • Upload and align floor plans for each level of the building.
    • Perform a detailed survey using the Combain Android AI Indoor Survey App.
    • The more detailed your survey, the higher the localization accuracy.
    • Alternatively, if you know the locations of your Wi-Fi routers or BLE beacons, you can place them manually on the map.

    For exact details of the complete Combain process and tools see Combain Indoor Positioning Guide

  5. Create Map Views and Dashboards
    Visualize the locations of your geofences, geofence IoT nodes, and trackers within dashboards or map views.

General Geofence Translator

The 'general-geofence' translator is a sophisticated translator designed to handle 'enter', 'exit' and 'inside' events from geofences.

General Geofence 1

Its key functionalities include:

  • Count the number of trackers inside a geofence.
  • Count the total number of assets inside a geofence.
    • You can differentiate between asset categories and avoid counting all as trackers (e.g., in an airport, wheelchairs and baggage carts may considered trackers in different geofences).
  • Maintain a list of all assets currently inside the geofence.
  • Automatically remove idle assets after a certain time if an exit event is missed.
  • Forward data to the origin asset that triggered a geofence event.
  • Specify the identifier for the origin asset.
  • Select the type of data to forward to the origin asset (excluding access event data).
  • Optionally encode data in hex for the origin asset to accommodate hardware decoders.
  • Set an accuracy threshold for forwarding data.
    • Geolocation services return an accuracy figure (50% likelihood).
    • If the accuracy is too low, the asset may not actually be inside the geofence, and the data can be ignored.

General Geofence 3

Improve Geofencing with Wi-Fi RSSI Level Capability

When it’s important to count the number of trackers within a specific area, for example, to provide a KPI to stakeholders it is recommended to complement the geofencing capability with Wi-Fi Router RSSI level checks.

The idea is to use Wi-Fi RSSI thresholds to cover the main area where assets should be counted, while the geofence serves as a backup to capture devices located just outside the beacon’s range. Together, these two methods provide a more accurate and reliable result.

Enabling Wi-Fi RSSI Level Detection

To enable Wi-Fi RSSI-based detection, a customized translator is used. This translator monitors the signal strength (RSSI) of known Wi-Fi beacons and decides whether a tracker should be considered inside a specific area.

This approach is commonly used in large-scale infrastructure projects, like Airports or Hospitals, where asset tracking within storage zones or restricted areas is critical.

To improve the likelihood of accurate detection, apply the following settings:

  1. Increase Wi-Fi beacon broadcast frequency
    Change the beacon interval from the standard 100 ms to 40 ms for faster updates. This will significantly improve detection ratio.

  2. If normal WiFi environment use Wi-Fi Channel Auto, if really crowded WiFi environment try use Wi-Fi channel 0. Trackers typically start scanning from channel 0 and stop once their buffer is full. Using channel 0 ensures the highest chance of detection, in very busy Wi-Fi environments.

  3. Reduce Wi-Fi router transmit power
    Limit the transmission power to around 6–10 dB (instead of the maximum 26 dB). This helps avoid interference with other Wi-Fi infrastructure and isolates the beacon coverage to the desired area. You do not want the beacons that represents specific areas to overhear each other if it can be avoided.

  4. Use lowest bit rate
    Because trackers scan for Wi-Fi and BLE only briefly to conserve energy, it’s best to keep the bit rate at the standard 1 Mbit/s. With the transmission power set low, this minimizes interference with the building’s existing Wi-Fi infrastructure while maintaining reliable detection.

  5. Tune the RSSI levels
    Start with a permissible RSSI limit setting like -85 and see result, do opposite and test a restrictive setting of -70. Based on result set the expected limit and then do fine tune step by step until optimal setting has been identified.

By combining Wi-Fi RSSI thresholds with geofencing, the platform can achieve more precise indoor localization and reliable occupancy tracking across complex environments.

Hardware requirements for localisation services

Your tracker must support scanning the available IT infrastructure in the area. Currently, three tracker types are supported:

  1. GPS or other positioning satellites only

    • Requires a clear sky to see GPS satellites.
    • Example: Digital Matter Oyster.
  2. GPS + Wi-Fi 2.4 GHz only

    • Requires a 2.4 GHz Wi-Fi infrastructure (5 GHz scanning is not supported as of 2025).
    • Example: Sensative Square Tracker (supports scanning of up to 16 Wi-Fi beacons for maximum accuracy).
  3. GPS + BLE + Wi-Fi 2.4 GHz

    • Examples: Digital Matter and Abeeway trackers. Since these scans both BLE and Wi-Fi battery performance is worse than Wi-Fi only trackers.

Localization Service Integrations

To perform localization, a localisation service is required. The following cloud location services are currently supported by the platform:

  • Traxmate: LoRaWAN Cloud standard localization solution.
  • Combain: AI-based localization.
  • Combain Indoor: AI-based indoor positioning. Accuracy can be improved through building location surveys.
  • Platform built-in location service for predefined areas with known beacon placements. This is used for the platforms LoRaWAN Mesh solution.

Through the Munin service, AWS Location Service can also be supported.

Other service providers, for example Google, also offer location services, but these are not yet integrated. If you require integration with another provider, contact your technical support representative.

Commercial Use

The default Traxmate connector is API-rate-limited.

When moving to commercial deployment, request a quote from your support representative.
All localization services include costs based on the expected number of monthly localization pings.

Q&A: Why Timers Matter in an IoT Platform

Why use timers in alarm logic?

Can’t I just trigger an alarm the moment a value exceeds a threshold?

What’s a real-world example of using a timer?

Can timers help detect when a condition returns to normal?

How does the platform implement timers?

Are timers only useful for alarms?

Do I need to write code to use timers?

Q&A: Localization and Geofences

What is the typical accuracy of Wi-Fi based localization?

What benefits do I get if I add Wi-Fi becons with RSSI based thresholds to determine if assets within an area?

Do I need to write code to use geofences?

Do I need to write code to use geofences combined with Wi-Fi thresholds for area localization?

Why is the Sensative Tracker superior for asset tracking use cases?