aliyun-iot-mqtt
Aliyun IoT Hub MQTT client for Node.js
Installation
You can install it as dependency with npm.
$ # save into package.json dependencies with -S $ npm install aliyun-iot-mqtt -S
Usage
Aliyun IoT Hub mqtt client with authrozied by productKey & deviceName & deviceSecret.
GET Data
const Mqtt = ; const client = Mqtt; client client
TLS mqtts
var trustedCA = fs var options = productKey: "" deviceName: "" deviceSecret: "" regionId: "cn-shanghai" protocol: 'mqtts' ca: trustedCA keepalive:120 // mqtt options;
Subscribe Topic
client
Publish Message
clientclient
Receive Message
client