Skip to content

MqttService

Method LwM2M request Description
getClientId get /1024//52
alias: /mqtt/client-id
Get mqtt relay client id
putClientId put /1024//52
alias: /mqtt/client-id
Set mqtt relay client id
getUsername get /1024//53
alias: /mqtt/username
Get mqtt relay login. For firmware version <= 1.86, use serial number (resource /3//2)
putUsername put /1024//53
alias: /mqtt/username
Write mqtt relay password id. For firmware version <= 1.86, use serial number (resource /3//2)
getBrokerHostname get /1024//50
alias: /mqtt/broker-hostname
Get mqtt broker hostname
putBrokerHostname put /1024//50
alias: /mqtt/broker-hostname
Write mqtt relay host
getBrokerPort get /1024//51
alias: /mqtt/broker-port
Get port of the mqtt broker
putBrokerPort put /1024//51
alias: /mqtt/broker-port
Write service name of the mqtt broker
getPassword get /1024//54
alias: /mqtt/password
Get the mqtt broker password
putPassword put /1024//54
alias: /mqtt/password
Write mqtt broker password
getRelayNetKey get /1024//55
alias: /mqtt/relay-net-key
Get the mqtt relay net key
putRelayNetKey put /1024//55
alias: /mqtt/relay-net-key
Write mqtt relay net key
putBrokerCertificate put /1024//57
alias: /mqtt/broker-certificate
Set MQTT broker certificate data
getTopicPrefix get /1024//58
alias: /mqtt/topic-prefix
Get MQTT relay topic prefix
putTopicPrefix put /1024//58
alias: /mqtt/topic-prefix
Put MQTT relay topic prefix
getRequestTopic get /1024//58
alias: /mqtt/request-topic
Get mqtt request topic
putRequestTopic put /1024//58
alias: /mqtt/request-topic
Put mqtt request topic
getResponseTopic get /1024//59
alias: /mqtt/response-topic
Get MQTT response topic
putResponseTopic put /1024//59
alias: /mqtt/response-topic
Put MQTT response topic

getClientId

Minimal Tap Firmware version: 1.86

Get mqtt relay client id

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getClientId();
const value = response.body();
console.log(`getClientId: ${value}`);

putClientId

Minimal Tap Firmware version: 1.86

Set mqtt relay client id

Parameters

Name Type Description Notes
url string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const url = ...;
const response = await tap.service.mqtt.putClientId(url);
const value = response.body();
console.log(`putClientId: ${value}`);

getUsername

Minimal Tap Firmware version: 1.86

Get mqtt relay login. For firmware version <= 1.86, use serial number (resource /3//2)

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getUsername();
const value = response.body();
console.log(`getUsername: ${value}`);

putUsername

Minimal Tap Firmware version: 1.86

Write mqtt relay password id. For firmware version <= 1.86, use serial number (resource /3//2)

Parameters

Name Type Description Notes
url string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const url = ...;
const response = await tap.service.mqtt.putUsername(url);
const value = response.body();
console.log(`putUsername: ${value}`);

getBrokerHostname

Minimal Tap Firmware version: 1.0

Get mqtt broker hostname

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getBrokerHostname();
const value = response.body();
console.log(`getBrokerHostname: ${value}`);

putBrokerHostname

Minimal Tap Firmware version: 1.0

Write mqtt relay host

Parameters

Name Type Description Notes
url string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const url = ...;
const response = await tap.service.mqtt.putBrokerHostname(url);
const value = response.body();
console.log(`putBrokerHostname: ${value}`);

getBrokerPort

Minimal Tap Firmware version: 1.0

Get port of the mqtt broker

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getBrokerPort();
const value = response.body();
console.log(`getBrokerPort: ${value}`);

putBrokerPort

Minimal Tap Firmware version: 1.0

Write service name of the mqtt broker

Parameters

Name Type Description Notes
url string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const url = ...;
const response = await tap.service.mqtt.putBrokerPort(url);
const value = response.body();
console.log(`putBrokerPort: ${value}`);

getPassword

Minimal Tap Firmware version: 1.0

Get the mqtt broker password

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getPassword();
const value = response.body();
console.log(`getPassword: ${value}`);

putPassword

Minimal Tap Firmware version: 1.0

Write mqtt broker password

Parameters

Name Type Description Notes
url string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const url = ...;
const response = await tap.service.mqtt.putPassword(url);
const value = response.body();
console.log(`putPassword: ${value}`);

getRelayNetKey

Minimal Tap Firmware version: 1.0

Get the mqtt relay net key

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getRelayNetKey();
const value = response.body();
console.log(`getRelayNetKey: ${value}`);

putRelayNetKey

Minimal Tap Firmware version: 1.0

Write mqtt relay net key

Parameters

Name Type Description Notes
netkey string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const netkey = ...;
const response = await tap.service.mqtt.putRelayNetKey(netkey);
const value = response.body();
console.log(`putRelayNetKey: ${value}`);

putBrokerCertificate

Minimal Tap Firmware version: 1.86

Set MQTT broker certificate data

Parameters

Name Type Description Notes
value Uint8Array Up to 16kB optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const value = ...;
const response = await tap.service.mqtt.putBrokerCertificate(value);
const value = response.body();
console.log(`putBrokerCertificate: ${value}`);

getTopicPrefix

Minimal Tap Firmware version: 1.86

Get MQTT relay topic prefix

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getTopicPrefix();
const value = response.body();
console.log(`getTopicPrefix: ${value}`);

putTopicPrefix

Minimal Tap Firmware version: 1.86

Put MQTT relay topic prefix

Parameters

Name Type Description Notes
topicPrefix string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const topicPrefix = ...;
const response = await tap.service.mqtt.putTopicPrefix(topicPrefix);
const value = response.body();
console.log(`putTopicPrefix: ${value}`);

getRequestTopic

Minimal Tap Firmware version: 1.86

Get mqtt request topic

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getRequestTopic();
const value = response.body();
console.log(`getRequestTopic: ${value}`);

putRequestTopic

Minimal Tap Firmware version: 1.86

Put mqtt request topic

Parameters

Name Type Description Notes
topic string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const topic = ...;
const response = await tap.service.mqtt.putRequestTopic(topic);
const value = response.body();
console.log(`putRequestTopic: ${value}`);

getResponseTopic

Minimal Tap Firmware version: 1.107

Get MQTT response topic

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.mqtt.getResponseTopic();
const value = response.body();
console.log(`getResponseTopic: ${value}`);

putResponseTopic

Minimal Tap Firmware version: 1.107

Put MQTT response topic

Parameters

Name Type Description Notes
topic string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const topic = ...;
const response = await tap.service.mqtt.putResponseTopic(topic);
const value = response.body();
console.log(`putResponseTopic: ${value}`);