Skip to content

Power Saving

General information

Some of Kontakt.io devices have built-in features that allow them to automatically change their settings, resulting in lower power consumption when needed. These power savings come from increasing the advertising packets broadcasting interval, making beacons send their packets less often when there is no need to do this with normal frequency, e.g. at night, during non-business hours, etc., and/or disabling some packets that might be not needed all the time.

Enabling the Power Saving on a capable beacon via API is done the same way as changing any other setting – by creating a Config object and then syncing it with the beacon via Kontakt.io Administration App (or any other app based on our SDKs) or leaving that to Kontakt.io Gateways. An API call needs to specify what power saving features should be enabled and with what settings.

Power savings options are bundled in a powerSaving object within a Config object, so power saving-related options in a HTTP request need to formatted like this: powerSaving.<key>=<value>, e.g.:

curl -X "POST" "https://api.kontakt.io/config/create" \
     -H "Api-Key: YourSuperSecretAPIKey" \
     -H "Accept: application/vnd.com.kontakt+json;version=10" \
     -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" \
     --data-urlencode "uniqueId=Ueu1" \
     --data-urlencode "deviceType=beacon" \
     --data-urlencode "powerSaving.features=MOTION_DETECTION" \
     --data-urlencode "powerSaving.moveSuspendTimeout=90"

In order to disable Power Saving, create a config with an empty features list:

curl -X "POST" "https://api.kontakt.io/config/create" \
     -H "Api-Key: YourSuperSecretAPIKey" \
     -H "Accept: application/vnd.com.kontakt+json;version=10" \
     -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" \
     --data-urlencode "uniqueId=Ueu1" \
     --data-urlencode "deviceType=beacon" \
     --data-urlencode "powerSaving.features="

Power Saving modes

There is a number of different Power Saving modes available on Kontakt.io devices. Not all of them are available on each type of beacon and some are even designed only for a specific device only. Below is a list of all possible modes with their descriptions.

Please keep in mind that these Power Saving features are mutually exclusive - only one of the available modes can be enabled at a given time.

Motion detection

Beacons equipped with an accelerometer can take advantage of motion-triggered power saving. In this mode when no movement occurs for 60 seconds (this value is not configureable) beacons stop broadcasting all non-connectable advertising packets (iBeacon, Eddystone) as well as Kontakt.io Telemetry packet, if it is enabled. The only packet left is Kontakt.io Secure Profile, although its broadcast rate is slowed down according to these rules and depends on the normal advertising interval for non-connectable packets:

  • When interval is equal or less than 1000 ms, the power saving interval equals 2000 ms
  • If a beacon has an interval of more than 1000 ms, then the power saving interval will be equal to five times the normal interval, e.g. when a normal interval is 1500 ms, the power saving interval is 7500 ms (1500 ms * 5)
  • Power saving interval cannot be longer than the maximum interval value (10240 ms). If a multiplication of 5 times an interval would yield a higher number, the power saving interval will be capped at 10240 ms.

To enable this type of Power Saving, set powerSaving's features list in a new Config to MOTION_DETECTION.

Movement threshold configuration

The configuration that defines what constitutes a movement is shared between Power Saving and Telemetry monitoring. It means that whenever a Movement event would be reported in a Telemetry frame after a beacon has been physically moved, the same kind of actual movement would also "wake up" the same beacon from motion-triggered power saving.

Movement detection parameters are available for configuration via standard configuration creation endpoint in Kontakt.io API. Relevant fields are inside the move object, which is nested inside the accelerometer object. For more information, please refer to Move detection event section of the Telemetry frame configuration article.

Important

Motion Detection Power Saving requires the accelerometer has Movement event detection turned on. It means that features list in the accelerometer object has to include MOVE_DETECTION. Otherwise your beacon will enter the Power Saving mode, but it won't leave it until you enable Movement event detection.

Legacy implementation for Card Tag CT16-2

Card Tags CT16-2 are equipped with a simple motion sensor, not an accelerometer. Nonetheless, it allows them to reduce the frequency of advertising packets e.g. when a person that wears a Card Tag CT16-2 as an employee badge is not moving.

To enable Power Saving on Card Tags CT16-2, set powerSaving's features list in a new Config to MOTION_DETECTION. Additionally it's possible to customize the time (in seconds) that needs to pass when a Card Tag CT16-2 is not registering any motion in order to trigger Power Saving mode. To do that, set moveSuspendTimeout to a desired value between 1 and 3600. If nothing is changed, the default value of 60 seconds will be used.

CT16-2 Power Saving advertising rates

The value of the advertising interval in the Power Saving state depends on the original advertising interval value:

  • When interval is equal or less than 1000 ms, the power saving interval equals 2000 ms
  • If a beacon has an interval of more than 1000 ms, then the power saving interval will be equal to five times the normal interval, e.g. when a normal interval is 1500 ms, the power saving interval is 7500 ms (1500 ms * 5)
  • Power saving interval cannot be longer than the maximum interval value (10240 ms). If a multiplication of 5 times an interval would yield a higher number, the power saving interval will be capped at 10240 ms.

Light Sensor

Every Beacon Pro BP16-3 comes with a Light Sensor built-in. It can be used to enable Power Saving when a light intensity drops below a certain threshold, and switch back to normal operations when the brightness come back to standard levels.

To enable Power Saving on Beacon Pros BP16-3, set powerSaving's features list in a new Config to LIGHT_SENSOR.

Light Sensor configuration

There are two additional settings related to a light sensor that you can use to customize the light sensor-based Power Saving:

  • lightSensorThreshold – sets a brightness level (in percent) that will trigger Power Saving. Default value is 50.
  • lightSensorHysteresis – a buffer used to avoid frequent switches between Power Saving enabled or disabled when the raw brightness levels reported hover around threshold. It's represented by a number of percentage points that brightness need to deviate from the threshold to actually trigger a Power Saving state switch. Default value is 5.
    Example: Let's assume lightSensorThreshold is set to 50%, lightSensorHysteresis is 2% and Power Saving is engaged (light intensity reported by a light sensor is below 50%). When the light starts becoming brighter, the Power Saving is not going to be turned off the moment the light sensor reports any value above 50%. Instead a Beacon Pro BP16-3 will wait until the measurements reaches 52% and only then disable Power Saving. If a reported brightness level later drops below 52% but stays above the switching point (that is threshold adjusted for hysteresis, but in the opposite direction), the Power Saving will stay disabled.

In order to ensure proper operations, these two settings have to follow two additional rules:

  • The sum of lightSensorThreshold and lightSensorHysteresis has to be equal or less than 100
  • The result of subtraction of lightSensorHysteresis from lightSensorThreshold has to be equal or greater than 0

Power Saving state

The value of the advertising interval in the light-based Power Saving state on Beacon Pros BP16-3 depends on their original advertising interval value – in general Power Saving advertising interval is a normal interval multiplied by 3, with two exceptions:

  • If a multiplied interval is below 2000 ms, the Power Saving interval will be set to 2000 ms
  • If a multiplied interval is above 10240 ms, the Power Saving interval will be set to 10240 ms

When a Beacon Pro BP16-3 goes into the Power Saving mode, it completely stops broadcasting standard, non-connectable iBeacon and Eddystone packets, leaving only the Kontakt.io packet being broadcasted at a slower rate.

Time-based Power Saving

Most of nRF52-based Kontakt.io devices are equipped with a Real-Time Clock (RTC). It allows them to precisely schedule time when beacons should broadcast normally and when they should enter the Power Saving mode.

Important

In order to ensure proper operations on RTC-based Power Saving, the RTC has to have correct time. We synchronize RTC during the production of a beacon and every time a beacon is configured via our mobile apps and apps based on our official SDKs. But please keep in mind that every time a beacon restarts due to e.g. removing the battery, the clock will go out-of-sync. Before enabling this Power Saving mode please make sure the RTC has correct value, and don't remove batteries after you enable it.

When it's time for the Power Saving mode, beacons stop broadcasting all non-connectable advertising packets (iBeacon, Eddystone) as well as Kontakt.io Telemetry packet, if it is enabled. The only packet left is Kontakt.io Secure Profile, although its broadcast rate is slowed down Power Saving advertising interval is a normal interval multiplied by 3, with two exceptions:

  • If a multiplied interval is below 2000 ms, the Power Saving interval will be set to 2000 ms
  • If a multiplied interval is above 10240 ms, the Power Saving interval will be set to 10240 ms

To enable this type of Power Saving, set powerSaving's features list in a new Config to RTC and provide a list of hours for each day of the week when the Power Saving mode should be enabled. For more details please refer to our API reference.

Burst Mode

This mode makes beacons to broadcast normally for a specified time and then sleep for a different period of time. After that the sequence repeats itself.

During normal operation beacons broadcast all frames they have enabled. When they're in the sleep mode, no packets are broadcasted, but it doesn't mean a beacon is completely shut down during that time. Instead, it still detects accelerometer events, and register and reacts to button clicks.

If a beacon is equipped with a button it can be woken up from the sleep mode by pressing this button. This event resets the sleep/wake cycle - it will broadcast normally for a specified time, starting from the moment of a button click, and then sleep for a different period of time.

To enable this type of Power Saving, set powerSaving's features list in a new Config to BURST_MODE. Additionally, there are two more configuration fields in the powerSaving object that help with customization of this Power Saving mode:

  • burstOnTime - number of seconds between 15 and 65535 that a beacon should broadcast normally
  • burstOffTime - number of minutes between 1 and 10080 that a beacon should be in the sleep mode

Note

In order to prevent artificial congestion of the radio spectrum, the burstOffTime will be automatically and randomly adjusted by ±10% every time a beacon enters the sleep mode.