2.3.0 • Published 6 months ago
@iotize/device-com-mqtt.js v2.3.0
IoTize Device Com MQTT
Installation
Browser
Download latest version or use this link to load from jsdeliver.
<script src="https://cdn.jsdelivr.net/npm/@iotize/device-com-mqtt.js@latest/dist/iotize-device-com-mqtt.min.js" />
npm
npm install @iotize/device-com-mqtt.js
Usage
// Library name: IoTizeDeviceComMqtt
// Simple mqtt protocol
import { connect as mqttConnect, IClientOptions, MqttClient } from "mqtt";
let mqttProtocol = IoTizeDeviceComMqtt.MqttProtocol();
// Mqtt protocol for IoTize relay
let mqttRelayProtocol = IoTizeDeviceComMqtt.createClientMQTTRelayProtocol({
connect: (brokerUrl?: string | any, options?: IClientOptions): MqttClient => {
return mqttConnect(brokerUrl, options);
},
serialNumber: "your serial number",
netkey: "testnetkey",
broker: {
username: "broker username",
password: "broker password",
url: "ws://user.cloud.iotize.com:9001",
},
});
For more informations, read the documentation.
2.3.0
6 months ago
2.2.1
1 year ago
2.2.0
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.0.0-alpha.9
4 years ago
1.0.0-alpha.8
4 years ago
1.0.0-alpha.7
4 years ago
1.0.0-alpha.5
4 years ago
1.0.0-alpha.1
4 years ago
0.0.1-alpha.2
5 years ago
0.0.1-alpha.1
6 years ago