Skip to content

DeviceService

Method LWM2M request Description
factoryReset POST /3//5
alias: /device/factory-reset
Factory reset
getAvailablePowerSource GET /3//6
alias: /device/available-power-source
Get available power sources
getCurrentTime GET /3//13
alias: /device/current-time
Get device current time
getFirmwareVersion GET /3//3
alias: /device/firmware-version
Get device firmware version
getLastErrorCode GET /3//11
alias: /device/last-error-code
Get device last error code
getManufacturer GET /3//0
alias: /device/manufacturer
Get manufacturer name
getMemoryFree GET /3//10
alias: /device/memory-free
Get device memory free
getModelName GET /3//1
alias: /device/model-name
Get device model name
getPowerSourceVoltage GET /3//7
alias: /device/power-source-voltage
Get power source voltage
getSerialNumber GET /3//2
alias: /device/serial-number
Get device serial number
postLastErrorCode POST /3//11
alias: /device/last-error-code
???
putCurrentTime PUT /3//13
alias: /device/current-time
Set device current time
reboot POST /3//4
alias: /device/reboot
Reboot device
resetLastErrorCode POST /3//12
alias: /device/reset-last-error-code
Reset device last error code

factoryReset

Minimal Tap Firmware version: >= 1.0

Factory reset

Example

let myService = new DeviceService();

try{
    let call = myService.factoryReset();
    let value = (await call).body();
    console.log(`factoryReset: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Void> call = myService.factoryReset();
    Response<Void> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#factoryReset");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.device.factoryReset();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required

getAvailablePowerSource

Minimal Tap Firmware version: >= 1.0

Get available power sources

Example

let myService = new DeviceService();

try{
    let call = myService.getAvailablePowerSource();
    let value = (await call).body();
    console.log(`getAvailablePowerSource: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<AvailablePowerSource> call = myService.getAvailablePowerSource();
    Response<AvailablePowerSource> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getAvailablePowerSource");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<AvailablePowerSource> = try tap.service.device.getAvailablePowerSource();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

AvailablePowerSource

Authorization

No authorization required

getCurrentTime

Minimal Tap Firmware version: >= 1.0

Get device current time

Example

let myService = new DeviceService();

try{
    let call = myService.getCurrentTime();
    let value = (await call).body();
    console.log(`getCurrentTime: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<String> call = myService.getCurrentTime();
    Response<String> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getCurrentTime");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<String> = try tap.service.device.getCurrentTime();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

No authorization required

getFirmwareVersion

Minimal Tap Firmware version: >= 1.0

Get device firmware version

Example

let myService = new DeviceService();

try{
    let call = myService.getFirmwareVersion();
    let value = (await call).body();
    console.log(`getFirmwareVersion: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<String> call = myService.getFirmwareVersion();
    Response<String> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getFirmwareVersion");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<String> = try tap.service.device.getFirmwareVersion();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

No authorization required

getLastErrorCode

Minimal Tap Firmware version: >= 1.0

Get device last error code

Example

let myService = new DeviceService();

try{
    let call = myService.getLastErrorCode();
    let value = (await call).body();
    console.log(`getLastErrorCode: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Integer> call = myService.getLastErrorCode();
    Response<Integer> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getLastErrorCode");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Integer> = try tap.service.device.getLastErrorCode();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

Integer

Authorization

No authorization required

getManufacturer

Minimal Tap Firmware version: >= 1.0

Get manufacturer name

Example

let myService = new DeviceService();

try{
    let call = myService.getManufacturer();
    let value = (await call).body();
    console.log(`getManufacturer: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<String> call = myService.getManufacturer();
    Response<String> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getManufacturer");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<String> = try tap.service.device.getManufacturer();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

No authorization required

getMemoryFree

Minimal Tap Firmware version: >= 1.0

Get device memory free

In bytes

Example

let myService = new DeviceService();

try{
    let call = myService.getMemoryFree();
    let value = (await call).body();
    console.log(`getMemoryFree: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Integer> call = myService.getMemoryFree();
    Response<Integer> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getMemoryFree");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Integer> = try tap.service.device.getMemoryFree();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

Integer

Authorization

No authorization required

getModelName

Minimal Tap Firmware version: >= 1.0

Get device model name

Example

let myService = new DeviceService();

try{
    let call = myService.getModelName();
    let value = (await call).body();
    console.log(`getModelName: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<String> call = myService.getModelName();
    Response<String> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getModelName");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<String> = try tap.service.device.getModelName();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

No authorization required

getPowerSourceVoltage

Minimal Tap Firmware version: >= 1.0

Get power source voltage

Example

let myService = new DeviceService();

try{
    let call = myService.getPowerSourceVoltage();
    let value = (await call).body();
    console.log(`getPowerSourceVoltage: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Integer> call = myService.getPowerSourceVoltage();
    Response<Integer> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getPowerSourceVoltage");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Integer> = try tap.service.device.getPowerSourceVoltage();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

Integer

Authorization

No authorization required

getSerialNumber

Minimal Tap Firmware version: >= 1.0

Get device serial number

Example

let myService = new DeviceService();

try{
    let call = myService.getSerialNumber();
    let value = (await call).body();
    console.log(`getSerialNumber: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<String> call = myService.getSerialNumber();
    Response<String> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#getSerialNumber");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<String> = try tap.service.device.getSerialNumber();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

No authorization required

postLastErrorCode

Minimal Tap Firmware version: >= 1.0

???

Example

let myService = new DeviceService();

try{
    let call = myService.postLastErrorCode();
    let value = (await call).body();
    console.log(`postLastErrorCode: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Void> call = myService.postLastErrorCode();
    Response<Void> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#postLastErrorCode");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.device.postLastErrorCode();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required

putCurrentTime

Minimal Tap Firmware version: >= 1.0

Set device current time

Example

let myService = new DeviceService();

try{
    let call = myService.putCurrentTime();
    let value = (await call).body();
    console.log(`putCurrentTime: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Void> call = myService.putCurrentTime();
    Response<Void> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#putCurrentTime");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.device.putCurrentTime();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required

reboot

Minimal Tap Firmware version: >= 1.0

Reboot device

Example

let myService = new DeviceService();

try{
    let call = myService.reboot();
    let value = (await call).body();
    console.log(`reboot: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Void> call = myService.reboot();
    Response<Void> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#reboot");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.device.reboot();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required

resetLastErrorCode

Minimal Tap Firmware version: >= 1.0

Reset device last error code

Example

let myService = new DeviceService();

try{
    let call = myService.resetLastErrorCode();
    let value = (await call).body();
    console.log(`resetLastErrorCode: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DeviceService;

ServiceFactory serviceFactory = ...;
DeviceService myService = serviceFactory.create(DeviceService.class);


try {
    Call<Void> call = myService.resetLastErrorCode();
    Response<Void> response = call.execute();
    if (response.isSuccessful()){
        System.out.println(response.body());
    }
    else{
        System.out.println(DeviceResponseError.createErrorMessage(response));
    }
} catch (ApiException e) {
    System.err.println("Exception when calling DeviceService#resetLastErrorCode");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.device.resetLastErrorCode();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required