Light Tag
The Light Tag is a pick-by-light system from NIMMSTA. Each of the Light Tags store their location information on device and can be triggered using the location information. We call the process of defining the location information "Attach". If you reset the location, we call it "Detach".
The following documentation helps you to illuminate, attach a location, and reset a Light Tag location.
Prerequisites
Before starting to use Light Tag methods, you need to have a connection manager, you can use NimmstaConnectionManager to connect to a device.
Glossary
- Light Tag: A Light Tag device is a physical device that can be attached to a location and illuminated.
- Location: A location is a given name by end user to locate a Light Tag device later.
- Attach: The process of setting the location on a Light Tag.
- Detach: The process of resetting a Light Tags location to the default one.
- Illumination: A method to illuminate a Light Tag device.
- Group: A group is a collection of Light Tag devices.
- LedMode: A mode in which a Light Tag device can be illuminated.
- address: it is Light Tag device Mac Address.
Supported Configuration
Light Tag LED Mode Color (LTColor)
to get your desired color you can use the following predefined colors enum:
export enum LTColor {
RED = 0x01,
GREEN = 0x02,
BLUE = 0x03,
YELLOW = 0x04,
PURPLE = 0x05,
TURQUOISE = 0x06,
WHITE = 0x07,
ORANGE = 0x08,
VIOLET = 0x09,
FORESTGREEN = 0x0A,
MAGENTA = 0x0B,
LIME = 0x0C,
PINK = 0x0D,
EMERGENCY = 0xFF,
OFF = 0x00,
}
Light Tag LED Mode Intensity (LTIntensity)
this value should be something between 0 and 255. you can use LTIntensity to get your desired intensity.
Light Tag LED Blinking Pattern (LTBlinkingPattern)
this value should be one of the following values:
export enum LTBlinkingPattern {
DOUBLE = 0x01,
TRIPLE = 0x02,
BLINK = 0x00,
PULSE = 0x03,
OFF = 0xFF,
}
Attach Location
To attach a location to a LightTag device you can use the following method:
var deviceAddress = document.getElementById("deviceAddress").value;
var location = document.getElementById("location").value;
connectionManager.attachLocation(deviceAddress, location).then(() => {
console.log("Location attached");
}).catch((error) => {
console.error(JSON.stringify(error));
});
Reset Location
to remove location from a LightTag device you can use the following method:
var deviceAddress = document.getElementById("deviceAddress").value;
connectionManager.detachLocation(deviceAddress).then(() => {
console.log("Location reset");
}).catch((error) => {
console.error(JSON.stringify(error));
});
Illumination
To illuminate a LightTag device you can use the following methods:
function setDesiredLightTagDevices(
desiredDevices: [lightTag: string],
ledMode: string
): Promise<void> {}
function setDesiredLightTagsForGroup(
group: string,
ledMode: string,
desiredDevices:[lightTag: string]
): Promise<void> {}
desiredDevices is an array of LightTag device locations.
ledMode either Can be a Hex value of color or a predefined value from LedMode enum, intensity and predefined pattern; or sending an object with color, intensity and pattern.
Illuminate Light Tag
var device = document.getElementById("deviceName").value;
var ledMode = {
color: parseInt($('#color').val()),
pattern: parseInt($('#pattern').val()),
intensity: parseInt($('#intensity').val()) * 2.55,
};
connectionManager.setDesiredLightTagDevices([device], ledMode).then(() => {
console.log("Lighttag started");
}).catch((error) => {
console.error(JSON.stringify(error));
});
Stop of Light Tag Illumination
to stop illuminating devices you can use the following method: