Device API
chevron down

Device API

Variable: me

Type: Device

The Device API provides information about the device where the application is running.

import { me as device } from "device";

console.log("type:             " + device.type);
console.log("model name:       " + device.modelName);
console.log("model ID:         " + device.modelId);
console.log("body color:       " + device.bodyColor);
console.log("firmware version: " + device.firmwareVersion);
console.log("last synced:      " + device.lastSyncTime);

Interface: Device

The Device API provides information about the device where the application is running.


readonly bodyColor

string or undefined

New in SDK 3.0

The primary color of the device body. Returns a name for the color that most represents the device. The color name does not necessarily match up with SVG color names. Example: silver

Below is a table of platforms with their possible color values.

Platform Colors
Ionic (higgs) undefined
Versa (meson) black
Versa Lite (gemini) silver
Versa 2 (mira) carbon

NOTE: Returns undefined for devices that are not aware of their own color (e.g. Ionic).

readonly firmwareVersion


Version of the device firmware. Usually represented as X.Y.Z where X, Y and Z are integers. Example: 22.53.4

readonly lastSyncTime


Time at which the device was last sync'ed.

readonly modelId


Device model identifier. Developer-facing device model ID.

NOTE: the model identifier is always the same for a given device, even when the model name may change.

readonly modelName


Device model name. User-facing device model name as displayed in the Fitbit mobile application. Example: Ionic

NOTE: the model name may change over time for a given device as it may be different before and after a device is released commercially. Once a device is released commercially, the model name remains the same.

readonly screen

{ readonly width: number; readonly height: number; }

Device screen information.

readonly type


Device type. Standard device types include WATCH for smart watches and TRACKER for trackers.