DeviceService¶
Method | LwM2M request | Description |
---|---|---|
getManufacturer | get /3//0 alias: /device/manufacturer |
Get manufacturer name |
getFirmwareFlavor | get /3//1 alias: /device/firmware-flavor |
Get device firmware flavor name |
getSerialNumber | get /3//2 alias: /device/serial-number |
Get device serial number |
getFirmwareVersion | get /3//3 alias: /device/firmware-version |
Get device firmware version |
reboot | post /3//4 alias: /device/reboot |
Reboot Tap device |
factoryReset | post /3//5 alias: /device/factory-reset |
Factory reset |
getAvailablePowerSource | get /3//6 alias: /device/available-power-source |
Get available power sources |
getPowerSourceVoltage | get /3//7 alias: /device/power-source-voltage |
Get power source voltage |
getMemoryFree | get /3//10 alias: /device/memory-free |
Get device memory free |
getLastErrorCode | get /3//11 alias: /device/last-error-code |
Get device last error code |
postLastErrorCode | post /3//11 alias: /device/last-error-code |
Set device last error code |
resetLastErrorCode | post /3//12 alias: /device/reset-last-error-code |
Reset device last error code |
getCurrentTime | get /3//13 alias: /device/current-time |
Get device current time |
putCurrentTime | put /3//13 alias: /device/current-time |
Set device current time |
getInternalStatus | get /3//15 alias: /device/internal-status |
Get device internal status |
getManufacturer¶
Minimal Tap Firmware version: 1.0
Get manufacturer name
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getManufacturer();
const value = response.body();
console.log(`getManufacturer: ${value}`);
getFirmwareFlavor¶
Minimal Tap Firmware version: 1.0
Get device firmware flavor name
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getFirmwareFlavor();
const value = response.body();
console.log(`getFirmwareFlavor: ${value}`);
getSerialNumber¶
Minimal Tap Firmware version: 1.0
Get device serial number
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getSerialNumber();
const value = response.body();
console.log(`getSerialNumber: ${value}`);
getFirmwareVersion¶
Minimal Tap Firmware version: 1.0
Get device firmware version
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getFirmwareVersion();
const value = response.body();
console.log(`getFirmwareVersion: ${value}`);
reboot¶
Minimal Tap Firmware version: 1.0
Reboot Tap device
Parameters¶
This endpoint does not need any parameter.
Returns¶
Nothing
Authorization¶
- Authorized profile: supervisor
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
await tap.login("supervisor", "your password");
const response = await tap.service.device.reboot();
const value = response.body();
console.log(`reboot: ${value}`);
factoryReset¶
Minimal Tap Firmware version: 1.0
Factory reset
Parameters¶
This endpoint does not need any parameter.
Returns¶
Nothing
Authorization¶
- Authorized profile: supervisor
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
await tap.login("supervisor", "your password");
const response = await tap.service.device.factoryReset();
const value = response.body();
console.log(`factoryReset: ${value}`);
getAvailablePowerSource¶
Minimal Tap Firmware version: 1.0
Get available power sources
Parameters¶
This endpoint does not need any parameter.
Returns¶
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getAvailablePowerSource();
const value = response.body();
console.log(`getAvailablePowerSource: ${value}`);
getPowerSourceVoltage¶
Minimal Tap Firmware version: 1.0
Get power source voltage
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getPowerSourceVoltage();
const value = response.body();
console.log(`getPowerSourceVoltage: ${value}`);
getMemoryFree¶
Minimal Tap Firmware version: 1.0
Get device memory free
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getMemoryFree();
const value = response.body();
console.log(`getMemoryFree: ${value}`);
getLastErrorCode¶
Minimal Tap Firmware version: 1.0
Get device last error code
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getLastErrorCode();
const value = response.body();
console.log(`getLastErrorCode: ${value}`);
postLastErrorCode¶
Minimal Tap Firmware version: 1.0
Set device last error code
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
errorcode | number | optional |
Returns¶
Nothing
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const errorcode = ...;
const response = await tap.service.device.postLastErrorCode(errorcode);
const value = response.body();
console.log(`postLastErrorCode: ${value}`);
resetLastErrorCode¶
Minimal Tap Firmware version: 1.0
Reset device last error code
Parameters¶
This endpoint does not need any parameter.
Returns¶
Nothing
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.resetLastErrorCode();
const value = response.body();
console.log(`resetLastErrorCode: ${value}`);
getCurrentTime¶
Minimal Tap Firmware version: 1.0
Get device current time
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getCurrentTime();
const value = response.body();
console.log(`getCurrentTime: ${value}`);
putCurrentTime¶
Minimal Tap Firmware version: 1.0
Set device current time
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
time | number | optional |
Returns¶
Nothing
Authorization¶
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.configurator.setupConfigMode();
const time = ...;
const response = await tap.service.device.putCurrentTime(time);
const value = response.body();
console.log(`putCurrentTime: ${value}`);
getInternalStatus¶
Minimal Tap Firmware version: 2.11
Get device internal status
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.device.getInternalStatus();
const value = response.body();
console.log(`getInternalStatus: ${value}`);